From 7ccdd7f9af9399c93b57e7566f0a6f6767abaaf1 Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Sat, 23 Mar 2024 17:29:59 +0100 Subject: komodo: implement wally package: dependency of komodo-wallet --- packages/komodo/komodo.scm | 64 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 62 insertions(+), 2 deletions(-) (limited to 'packages/komodo') diff --git a/packages/komodo/komodo.scm b/packages/komodo/komodo.scm index daa942d..a21dc7f 100644 --- a/packages/komodo/komodo.scm +++ b/packages/komodo/komodo.scm @@ -2,6 +2,7 @@ #:use-module (cpprestsdk) #:use-module (doom-meta) #:use-module (gnu packages) + #:use-module (gnu packages autotools) #:use-module (gnu packages boost) #:use-module (gnu packages calendar) #:use-module (gnu packages check) @@ -10,10 +11,12 @@ #:use-module (gnu packages game-development) #:use-module (gnu packages logging) #:use-module (gnu packages pretty-print) + #:use-module (gnu packages python) #:use-module (gnu packages qt) #:use-module (gnu packages tls) #:use-module (gnu packages version-control) #:use-module (guix build utils) + #:use-module (guix build-system gnu) #:use-module (guix build-system qt) #:use-module (guix download) #:use-module (guix gexp) @@ -60,6 +63,23 @@ (define mm2-src "mm2-src/") +(define wally-description-lines + (list "Wally is a cross-platform, cross-language collection of useful " + "primitives for cryptocurrency wallets.")) + +(define wally-git-url "https://github.com/KomodoPlatform/libwally-core.git") + +(define wally-hash "1c3w3qdg4l30wvijzi1rf4p0jynwdpb99x717h4v2i6fw140sz7f") + +(define wally-home-page "https://github.com/ElementsProject/libwally-core") + +(define wally-name "wally") + +(define wally-synopsis-lines + (list "Useful primitives for wallets")) + +(define wally-version "release_0.7.7") + ;;; ABSTRACTION LAYER -8 (define expected-file-name @@ -157,7 +177,6 @@ ,prepare-mm2-src "\n")) - ;;; ABSTRACTION LAYER -4 (define fix-date @@ -176,6 +195,11 @@ (("include\\(vcpkg_prerequisites\\)") ,vcpkg-replacement))) +(define wally-git-commit wally-version) + +(define wally-hash-get + (content-hash (base32 wally-hash))) + ;;; ABSTRACTION LAYER -3 (define cmake-modification @@ -184,13 +208,37 @@ ,fix-date ,fix-doom-meta)) +(define wally-git-reference-get + (git-reference (url wally-git-url) + (commit wally-git-commit))) + ;;; ABSTRACTION LAYER -2 +(define get-wally-name wally-name) + +(define get-wally-origin + (origin (uri wally-git-reference-get) + (method git-fetch) + (hash wally-hash-get))) + +(define get-wally-version wally-version) + (define modify-cmake-configuration `(add-after 'unpack 'delete-vcpkg ,cmake-modification)) +(define wally-description-get + (string-concatenate wally-description-lines)) + +(define wally-home-page-get wally-home-page) + +(define wally-native-inputs-get + (list autoconf automake libtool python python-2)) + +(define wally-synopsis-get + (string-concatenate wally-synopsis-lines)) + ;;; ABSTRACTION LAYER -1 (define komodo-wallet-configure-flags @@ -201,6 +249,17 @@ #~(modify-phases %standard-phases #+modify-cmake-configuration)) +(define wally + (package (name get-wally-name) + (version get-wally-version) + (source get-wally-origin) + (build-system gnu-build-system) + (native-inputs wally-native-inputs-get) + (synopsis wally-synopsis-get) + (description wally-description-get) + (license license:expat) + (home-page wally-home-page-get))) + ;;; ABSTRACTION LAYER 0 (define komodo-wallet-arguments @@ -213,7 +272,8 @@ (define komodo-wallet-native-inputs (list boost cpprestsdk date doctest doom-meta entt fmt git libsodium-komodo nlohmann-json openssl qtcharts qtdeclarative-5 qttools-5 qtsvg-5 - qtwebengine-5 range-v3 refl-cpp spdlog strong-type taskflow-2 zlib)) + qtwebengine-5 range-v3 refl-cpp spdlog strong-type taskflow-2 wally + zlib)) (define komodo-wallet-synopsis (string-concatenate komodo-wallet-synopsis-lines)) -- cgit v1.2.3