diff options
author | Marek Paśnikowski <marek@marekpasnikowski.pl> | 2024-03-26 01:30:10 +0100 |
---|---|---|
committer | Marek Paśnikowski <marek@marekpasnikowski.pl> | 2024-03-26 01:30:10 +0100 |
commit | 5f6fcb633b5b907694545722ca6327aa9f114645 (patch) | |
tree | 4b1f8432073b9858b4dce28bccefc86e7ec2f0da | |
parent | 6704462b1132dfb424254d6946cfdd82889b4a15 (diff) |
qolm: implement package: dependency of qaterial, needed for komodo
-rw-r--r-- | packages/komodo/komodo.scm | 102 | ||||
-rw-r--r-- | packages/komodo/qolm.scm | 69 |
2 files changed, 76 insertions, 95 deletions
diff --git a/packages/komodo/komodo.scm b/packages/komodo/komodo.scm index 26f0ffe..4abf2ca 100644 --- a/packages/komodo/komodo.scm +++ b/packages/komodo/komodo.scm @@ -29,6 +29,9 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) + #:use-module (komodo-vcpkg-ports) + #:use-module (libsodium) + #:use-module (qaterial) #:use-module (refl-cpp) #:use-module (sortfilterproxymodel) #:use-module (spdlog) @@ -75,30 +78,6 @@ (define komodo-wallet-version "0.7.1-beta") -(define libsodium-files-source - "ports/libsodium/") - -(define libsodium-files-target - ".") - -(define libsodium-komodo-hash - "0yk9pyj7bl421hb20lg9yaysqvcgrk7860613674la0gk5glq34d") - -(define libsodium-komodo-files-commit - "main") - -(define libsodium-komodo-files-url - "https://github.com/KomodoPlatform/vcpkg-custom-ports.git") - -(define libsodium-komodo-files-hash - "0nw78mmncjbgl7cjpbcy9wkch7hlqaavr03n9ls6nkjacx3klyy6") - -(define libsodium-komodo-git-reference-commit - "1.0.18") - -(define libsodium-komodo-git-reference-url - "https://github.com/jedisct1/libsodium") - (define mm2-hash "1bn2sjcrp9ih44h3p96prnwg74aids7fgzcnlv3c68nan6y2lysi") (define mm2-src "mm2-src/") @@ -159,21 +138,6 @@ (method url-fetch) (hash jl777-coins-content-hash))) -(define komodo-vcpkg-ports - (package (name "komodo-vcpkg-ports") - (version "main") - (source (origin (uri (git-reference (url - "https://github.com/KomodoPlatform/vcpkg-custom-ports.git") - (commit "main"))) - (method git-fetch) - (sha256 (base32 "0nw78mmncjbgl7cjpbcy9wkch7hlqaavr03n9ls6nkjacx3klyy6")))) - (build-system copy-build-system) - (arguments (list #:install-plan '(list (list "ports/libsodium/" ".")))) - (synopsis "Komodo VCPKG port files") - (description "Komodo VCPKG port files") - (license license:expat) - (home-page "https://github.com/KomodoPlatform/vcpkg-custom-ports/tree/main"))) - (define komodo-wallet-origin (origin (uri komodo-wallet-git-reference) (method git-fetch) @@ -186,12 +150,6 @@ ;;; ABSTRACTION LAYER -6 -(define libsodium-files - `(list ,libsodium-files-source ,libsodium-files-target)) - -(define libsodium-komodo-inputs - (list komodo-vcpkg-ports)) - (define prepare-build-paths `(string-append "file(MAKE_DIRECTORY \"" ,build-path-expected "\")\n" "file(MAKE_DIRECTORY \"" ,build-path-jl777-coins "\")\n" @@ -214,13 +172,6 @@ ;;; ABSTRACTION LAYER -5 -(define libsodium-komodo-clause-create-cmakelists - '(lambda _ - (let ((source-directory ".") - (vcpkg-port-libsodium-directory "/gnu/store/dh1dnil0kixzwg87gwbalhay8zmp924y-komodo-vcpkg-ports-main")) - (copy-recursively vcpkg-port-libsodium-directory - source-directory)))) - (define vcpkg-replacement `(string-append "\n" ,prepare-build-paths @@ -247,17 +198,6 @@ (("STD") "STD\n#include <nlohmann/json.hpp>"))) -(define libsodium-komodo-phases-create-cmakelists - `(add-after 'unpack - 'create-cmakelists - ,libsodium-komodo-clause-create-cmakelists)) - -(define libsodium-komodo-probe - `(add-before 'configure - 'probe - (lambda _ - (invoke "ls" "-al" ".")))) - (define link-libraries `(substitute* "cmake/dependencies.cmake" (("ALIAS refl-cpp\\)") @@ -293,18 +233,6 @@ (define entt-komodo-content-hash-get (content-hash (base32 entt-komodo-hash))) -(define libsodium-komodo-phases - `(modify-phases %standard-phases - ,libsodium-komodo-phases-create-cmakelists - ,libsodium-komodo-probe)) - -(define libsodium-komodo-sha256 - (base32 libsodium-komodo-hash)) - -(define libsodium-komodo-uri - (git-reference (url "https://github.com/jedisct1/libsodium") - (commit "1.0.19"))) - (define entt-komodo-git-reference-get (git-reference (url entt-komodo-git-reference-url) (commit entt-komodo-version))) @@ -316,15 +244,6 @@ (method git-fetch) (hash entt-komodo-content-hash-get))) -(define libsodium-komodo-arguments - (list #:phases libsodium-komodo-phases - #:tests? #f)) - -(define libsodium-komodo-origin - (origin (uri libsodium-komodo-uri) - (method git-fetch) - (sha256 libsodium-komodo-sha256))) - (define modify-cmake-configuration `(add-after 'unpack 'delete-vcpkg @@ -372,14 +291,6 @@ (replace 'build (lambda _ (invoke "ninja" "install"))))) -(define libsodium-komodo - (package (inherit libsodium) - (name "libsodium-komodo") - (source libsodium-komodo-origin) - (build-system cmake-build-system) - (arguments libsodium-komodo-arguments) - (inputs libsodium-komodo-inputs))) - ;;; ABSTRACTION LAYER 0 (define komodo-wallet-arguments @@ -391,9 +302,10 @@ (define komodo-wallet-inputs (list boost cpprestsdk date-komodo doctest doom-meta entt-komodo fmt git - libsodium-komodo ninja nlohmann-json openssl perl python qtcharts - qtdeclarative-5 qttools-5 qtsvg-5 qtwebengine-5 range-v3 refl-cpp - sortfilterproxymodel spdlog-1.8 strong-type taskflow-2 wally zlib)) + libsodium-komodo ninja nlohmann-json openssl perl python qaterial + qtcharts qtdeclarative-5 qttools-5 qtsvg-5 qtwebengine-5 range-v3 + refl-cpp sortfilterproxymodel spdlog-1.8 strong-type taskflow-2 wally + zlib)) (define komodo-wallet-synopsis (string-concatenate komodo-wallet-synopsis-lines)) diff --git a/packages/komodo/qolm.scm b/packages/komodo/qolm.scm new file mode 100644 index 0000000..ca68f9e --- /dev/null +++ b/packages/komodo/qolm.scm @@ -0,0 +1,69 @@ +(define-module (qolm) + #:use-module (gnu packages qt) + #:use-module (guix build-system cmake) + #:use-module (guix git-download) + #:use-module ((guix licenses) + #:prefix license:) + #:use-module (guix packages)) + +;; DATA LAYER + +(define description + (string-append "qolm::QOlm object based on QAbstractListModel that provide a " + "list of QObject based class to qml and c++. The model " + "dynamically update views by reacting to insert, remove, move " + "operations.")) + +(define hash + (base32 "1rxw6lwv3gbgscnlz7njrs8yd21svqq0qpwiggnyrlbk5j85n7d7")) + +(define home-page + "https://olivierldff.github.io/QOlm/") + +(define inputs + (list qtbase-5 qtdeclarative-5)) + +(define name + "qolm") + +(define synopsis + "🧱 QAbstractListModel subclass that provide List of QObject to C++ and Qml.") + +(define tests? + #f) + +(define url + "https://github.com/OlivierLDff/QOlm.git") + +(define version + "v3.2.1") + +;; ABSTRACTION LAYER -1 + +(define uri + (git-reference (url url) + (commit version))) + +;; ABSTRACTION LAYER -0 + +(define arguments + (list #:tests? tests?)) + +(define source + (origin (uri uri) + (method git-fetch) + (sha256 hash))) + +;; SURFACE LAYER + +(define-public qolm + (package (name name) + (version version) + (source source) + (build-system cmake-build-system) + (arguments arguments) + (inputs inputs) + (synopsis synopsis) + (description description) + (license license:expat) + (home-page home-page))) |