summaryrefslogtreecommitdiff
path: root/packages/komodo
diff options
context:
space:
mode:
authorMarek Paśnikowski <marek@marekpasnikowski.pl>2024-03-22 06:40:30 +0100
committerMarek Paśnikowski <marek@marekpasnikowski.pl>2024-03-22 06:40:30 +0100
commitda3bdc47a5284f0d349f42a515adaab064c09a72 (patch)
treed361c29c0cb0ffc3f0fc27c7da5975e7822eb991 /packages/komodo
parent37517f5c92c846e336126fbcc349889c871624f9 (diff)
komodo-wallet: reorganize the module: abstraction layering
Diffstat (limited to 'packages/komodo')
-rw-r--r--packages/komodo/komodo.scm104
1 files changed, 55 insertions, 49 deletions
diff --git a/packages/komodo/komodo.scm b/packages/komodo/komodo.scm
index 5538cd3..3de56a9 100644
--- a/packages/komodo/komodo.scm
+++ b/packages/komodo/komodo.scm
@@ -23,40 +23,74 @@
#:use-module (guix packages)
#:use-module (libsodium-komodo))
-(define komodo-wallet-version "0.7.0-beta")
+;;; BOTTOM LAYER
+
+(define build-deps-prefix "../build/_deps/")
-;;; Git References
+(define expected-file-name
+ (git-file-name "libexpected" "1.1.0"))
(define expected-git-reference
(git-reference (url "https://github.com/TartanLlama/expected")
(commit "v1.1.0")
(recursive? #t)))
-(define komodo-wallet-git-reference
- (git-reference (url "https://github.com/KomodoPlatform/komodo-wallet-desktop")
- (commit komodo-wallet-version)))
-
-;;; Hashes
-
(define expected-hash
(content-hash "17akrv80h0n4cfmxwvlvbb8ycqza7y3qqygjyphv95rrabqm9r02"))
+(define expected-patches
+ (search-patches "libexpected-use-provided-catch2.patch"))
+
+(define expected-src "expected-src/")
+
+(define fix-date
+ `(substitute* "cmake/dependencies.cmake"
+ (("date-tz")
+ "date")))
+
+(define fix-doom-meta
+ `(substitute* (list "vendor/antara-gaming_sdk/modules/event/CMakeLists.txt"
+ "vendor/antara-gaming_sdk/modules/ecs/CMakeLists.txt")
+ (("doom::meta")
+ "doom")))
+
(define jl777-coins-hash
(content-hash "1icbd6f8nridzc93vz7hsr5dnkrf328zfsw6rrzifc7nvsr559w8"))
+(define jl777-coins-src "jl777-coins-src/")
+
+(define komodo-wallet-configure-flags
+ '(list "-DFETCHCONTENT_FULLY_DISCONNECTED=ON"
+ "-Wno-dev"))
+
(define komodo-wallet-hash
(content-hash "0pfkgas0xkixf99zqzyri80ksp89b7dw7hbcgpp60ni2cnchxk2n"))
+(define komodo-wallet-description
+ (string-append "Komodo Wallet is a secure wallet and non-custodial "
+ "decentralized exchange rolled into one application. Store "
+ "your coins, trade peer-to-peer with minimal fees and never "
+ "give up control over your digital assets."))
+
+(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 spdlog zlib))
+
+(define komodo-wallet-version "0.7.0-beta")
+
(define mm2-hash
(content-hash "1bn2sjcrp9ih44h3p96prnwg74aids7fgzcnlv3c68nan6y2lysi"))
-;;; Package Origins
+(define mm2-src "mm2-src/")
-(define expected-file-name
- (git-file-name "libexpected" "1.1.0"))
+;;; ABSTRACTION LAYER -7
-(define expected-patches
- (search-patches "libexpected-use-provided-catch2.patch"))
+(define komodo-wallet-git-reference
+ (git-reference (url "https://github.com/KomodoPlatform/komodo-wallet-desktop")
+ (commit komodo-wallet-version)))
+
+;;; ABSTRACTION LAYER -6
(define expected-origin
(origin (uri expected-git-reference)
@@ -80,15 +114,7 @@
(method url-fetch)
(hash mm2-hash)))
-;;; Path Constructors
-
-(define build-deps-prefix "../build/_deps/")
-
-(define expected-src "expected-src/")
-
-(define jl777-coins-src "jl777-coins-src/")
-
-(define mm2-src "mm2-src/")
+;;; ABSTRACTION LAYER -5
(define build-path-mm2
(string-append build-deps-prefix
@@ -102,7 +128,7 @@
(string-append build-deps-prefix
expected-src))
-;;; Phase Definitions
+;;; ABSTRACTION LAYER -4
(define prepare-build-paths
`(string-append "file(MAKE_DIRECTORY \"" ,build-path-expected "\")\n"
@@ -124,6 +150,8 @@
`(string-append "file(ARCHIVE_EXTRACT INPUT " ,mm2-origin " "
"DESTINATION " ,build-path-mm2 ")\n"))
+;;; ABSTRACTION LAYER -3
+
(define vcpkg-replacement
`(string-append "\n"
,prepare-build-paths
@@ -132,27 +160,14 @@
,prepare-mm2-src
"\n"))
-(define fix-date
- `(substitute* "cmake/dependencies.cmake"
- (("date-tz")
- "date")))
-
-(define fix-doom-meta
- `(substitute* (list "vendor/antara-gaming_sdk/modules/event/CMakeLists.txt"
- "vendor/antara-gaming_sdk/modules/ecs/CMakeLists.txt")
- (("doom::meta")
- "doom")))
+;;; ABSTRACTION LAYER -2
(define replace-vcpkg
`(substitute* "CMakeLists.txt"
(("include\\(vcpkg_prerequisites\\)")
,vcpkg-replacement)))
-;;; Build Arguments
-
-(define komodo-wallet-configure-flags
- '(list "-DFETCHCONTENT_FULLY_DISCONNECTED=ON"
- "-Wno-dev"))
+;;; ABSTRACTION LAYER -1
(define komodo-wallet-phases
#~ (modify-phases %standard-phases
@@ -163,22 +178,13 @@
#+ fix-date
#+ fix-doom-meta))))
-;;; Komodo-wallet Package Definitions
+;;; ABSTRACTION LAYER 0
(define komodo-wallet-arguments
(list #:phases komodo-wallet-phases
#:configure-flags komodo-wallet-configure-flags))
-(define komodo-wallet-description
- (string-append "Komodo Wallet is a secure wallet and non-custodial "
- "decentralized exchange rolled into one application. Store "
- "your coins, trade peer-to-peer with minimal fees and never "
- "give up control over your digital assets."))
-
-(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 spdlog zlib))
+;;; SURFACE LAYER
(define-public komodo-wallet
(package (name "komodo-wallet")