summaryrefslogtreecommitdiff
path: root/private/komodo/komodo.scm
blob: bc155edc30525aaeba389cc16d9aab41f1a37d0a (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
(define-module (komodo)
  #:use-module (cmake)
  ;; #:use-module (gnu packages commencement)
  #:use-module (gnu packages compression)
  ;; #:use-module (gnu packages cpp)
  #:use-module (gnu packages curl)
  #:use-module (gnu packages ncurses)
  #:use-module (gnu packages ninja)
  ;; #:use-module (guix build utils)
  ;; #:use-module (guix build-system copy)
  #:use-module (guix build-system cmake)
  ;; #:use-module (guix build-system qt)
  ;; #:use-module (guix download)
  ;; #:use-module (guix gexp)
  #:use-module (guix git-download)
  #:use-module ((guix licenses)
		#:prefix license:)
  #:use-module (guix packages)
  ;; #:use-module (nonguix build-system binary)
  #:use-module (vcpkg)
  )

(define-public komodo-wallet
  (let ((version "0.7.0-beta"))
    (package
     (name "komodo-wallet")
     (version version)
     (source
      (origin
       (uri
	(git-reference
	 (url
	  "https://github.com/KomodoPlatform/komodo-wallet-desktop")
	 (commit version)
	 (recursive? #t)))
       (method git-fetch)
       (hash
	(content-hash
	 "148fxnhsvqpgfc6jmj7qzz5504k3yqvn1jxqkqdxqmk0ch0abpd7"))))
     (build-system cmake-build-system)
     (arguments
      `(#:configure-flags '("-DCMAKE_USE_SYSTEM_CPPDAP=OFF")
	#:phases
	#~ (modify-phases
	    %standard-phases
	    (add-after
	     'unpack
	     'unpack-vcpkg-tool
	     (lambda _
	       (invoke "mkdir" "ci_tools_atomic_dex/vcpkg-repo/downloads")
	       (copy-recursively
		#+ (origin
		    (uri
		     (string-append
		      "https://github.com/microsoft/vcpkg-tool/archive/"
		      "2023-11-16"
		      ".tar.gz"))
		    (method url-fetch)
		    (hash
		     (content-hash
		      "0gy04mlc8s2560zm9ngjx7p3rbrckk9zxb2g1z0hidkbhgv49lcy")))
		"ci_tools_atomic_dex/vcpkg-repo/downloads/2023-11-16.tar.gz")))
	    (add-after
	     'unpack-vcpkg-tool
	     'patch-vcpkg-tool
	     (lambda _
	       (invoke
		"chmod" "+w"
		"ci_tools_atomic_dex/vcpkg-repo/downloads/2023-11-16.tar.gz")
	       (invoke
		"gunzip"
		"ci_tools_atomic_dex/vcpkg-repo/downloads/2023-11-16.tar.gz")
	       (invoke
		"tar" "-xf"
		"ci_tools_atomic_dex/vcpkg-repo/downloads/2023-11-16.tar"
		"-C" "ci_tools_atomic_dex/vcpkg-repo/downloads"
		"vcpkg-tool-2023-11-16/cmake/Findfmt.cmake"
		"vcpkg-tool-2023-11-16/cmake/FindCMakeRC.cmake")
	       (invoke
		"tar" "--delete" "-f"
		"ci_tools_atomic_dex/vcpkg-repo/downloads/2023-11-16.tar"
		"vcpkg-tool-2023-11-16/cmake/Findfmt.cmake"
		"vcpkg-tool-2023-11-16/cmake/FindCMakeRC.cmake")
	       (substitute*
		"ci_tools_atomic_dex/vcpkg-repo/downloads/vcpkg-tool-2023-11-16/cmake/Findfmt.cmake"
		(("the fmt library\" OFF")
		 "the fmt library\" ON"))
	       (substitute*
		"ci_tools_atomic_dex/vcpkg-repo/downloads/vcpkg-tool-2023-11-16/cmake/FindCMakeRC.cmake"
		(("resource compiler\" OFF")
		 "resource compiler\" ON"))
	       (invoke
		"tar" "-rf"
		"ci_tools_atomic_dex/vcpkg-repo/downloads/2023-11-16.tar"
		"ci_tools_atomic_dex/vcpkg-repo/downloads/vcpkg-tool-2023-11-16/cmake/Findfmt.cmake"
		"ci_tools_atomic_dex/vcpkg-repo/downloads/vcpkg-tool-2023-11-16/cmake/FindCMakeRC.cmake")
	       (invoke
		"gzip"
		"ci_tools_atomic_dex/vcpkg-repo/downloads/2023-11-16.tar")))
	    (add-after
	     'unpack
	     'prepare-vcpkg-bootstrap
	     (lambda _
	       (invoke
		"chmod" "+x"
		"ci_tools_atomic_dex/vcpkg-repo/scripts/bootstrap.sh")
	       (substitute*
		"ci_tools_atomic_dex/vcpkg-repo/scripts/bootstrap.sh"
		(("vcpkgDownloadTool=\"ON\"")
		 "vcpkgDownloadTool=\"OFF\"")
		(("\\$actualHash")
		 "$expectedHash"))))
	    (add-before
	     'configure
	     'bootstrap-vcpkg
	     (lambda _
	       (invoke
		"ci_tools_atomic_dex/vcpkg-repo/bootstrap-vcpkg.sh"
		"--disableMetrics"))))))
     (native-inputs
      (list
       cmake curl ncurses ninja unzip vcpkg-tool-cmrc
       vcpkg-tool-fmt zip))
     (synopsis "Komodo Wallet Desktop GUI")
     (description
      (string-append
       "Komodo Wallet is a secure wallet and non-custodial "
       "decentralized exchange rolled into one application. Store "
       "your coind, trade peer-to-peer with minimal fees and never "
       "give up control over your digital assets."))
     (license license:gpl2)
     (home-page "https://atomicdex.io/"))))