summaryrefslogtreecommitdiff
path: root/private/komodo/komodo.scm
blob: b9b72a59f62bfa0c3d0aad95217598fb62ff8a10 (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
133
134
135
136
137
138
139
(define-module (komodo)
  #:use-module (cpprestsdk)
  #:use-module (gnu packages)
  #:use-module (gnu packages boost)
  #:use-module (gnu packages calendar)
  #:use-module (gnu packages check)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages cpp)
  #:use-module (gnu packages crypto)
  #:use-module (gnu packages game-development)
  #:use-module (gnu packages logging)
  #:use-module (gnu packages pretty-print)
  #: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 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))

(define-public libsodium-komodo
  (package
   (inherit libsodium)
   (build-system cmake-build-system)
   (arguments
    (list
     #:phases
     #~ (modify-phases
	 %standard-phases
	 (add-after
	  'unpack
	  'add-cmakelists
	  (lambda _
	    (copy-recursively
	     #+ (local-file "komodo-libsodium-cmakelists.txt")
	     "CMakeLists.txt")
	    (copy-recursively
	     #+ (local-file "komodo-libsodium-sodiumconfig.cmake.in")
	     "sodiumConfig.cmake.in"))))))))

(define-public komodo-wallet
  (let ((build-path-expected "../build/_deps/expected-src")
	(build-path-jl777-coins "../build/_deps/jl777-coins-src")
	(build-path-mm2 "../build/_deps/mm2-src")
	(version "0.7.0-beta"))
    (let ()
      (let ((komodo-wallet-arguments
	     (list
	      #:phases
	      #~ (modify-phases
		  %standard-phases
		  (add-after
		   'unpack
		   'delete-vcpkg
		   (lambda _
		     (substitute*
		      "CMakeLists.txt"
		      (("include\\(vcpkg_prerequisites\\)")
		       (string-append
			"\nfile(MAKE_DIRECTORY \"" #+ build-path-expected "\")\n"
			"file(MAKE_DIRECTORY \"" #+ build-path-jl777-coins "\")\n"
			"file(MAKE_DIRECTORY \"" #+ build-path-mm2 "\")\n"
			"file(COPY "
			#+ (origin
			    (uri
			     (git-reference
			      (url
			       "https://github.com/TartanLlama/expected")
			      (commit "v1.1.0")
			      (recursive? #t)))
			    (method git-fetch)
			    (hash
			     (content-hash
			      "17akrv80h0n4cfmxwvlvbb8ycqza7y3qqygjyphv95rrabqm9r02"))
			    (file-name (git-file-name "libexpected" "1.1.0"))
			    (patches
			     (search-patches "libexpected-use-provided-catch2.patch")))
			"/ " " DESTINATION " #+ build-path-expected
			" NO_SOURCE_PERMISSIONS"
			" FOLLOW_SYMLINK_CHAIN)\n"
			"file(ARCHIVE_EXTRACT INPUT "
			#+ (origin
			    (uri "https://github.com/KomodoPlatform/coins/archive/master.zip")
			    (method url-fetch)
			    (hash
			     (content-hash
			      "1icbd6f8nridzc93vz7hsr5dnkrf328zfsw6rrzifc7nvsr559w8")))
			" DESTINATION " #+ build-path-jl777-coins " )\n"
			"file(COPY " #+ build-path-jl777-coins "/coins-master/ "
			"DESTINATION " #+ build-path-jl777-coins ")\n"
			"file(ARCHIVE_EXTRACT INPUT "
			#+ (origin
			    (uri
			     "https://sdk.devbuilds.komodo.earth/main/mm2_b0fd99e-linux-x86-64.zip")
			    (method url-fetch)
			    (hash
			     (content-hash
			      "1bn2sjcrp9ih44h3p96prnwg74aids7fgzcnlv3c68nan6y2lysi")))
			" DESTINATION " #+ build-path-mm2 " )\n"))))))
	      #:configure-flags
	      #~ (list "-Wno-dev" "-DFETCHCONTENT_FULLY_DISCONNECTED=ON")))
	    (komodo-wallet-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."))
	    (komodo-wallet-native-inputs
	     (list
	      boost cpprestsdk date doctest entt fmt git libsodium-komodo nlohmann-json
	      openssl qtcharts qtdeclarative-5 qttools-5 qtsvg-5 qtwebengine-5
	      range-v3 spdlog zlib))
	    (komodo-wallet-origin
	     (origin
	      (uri
	       (git-reference
		(url
		 "https://github.com/KomodoPlatform/komodo-wallet-desktop")
		(commit version)))
	      (method git-fetch)
	      (hash
	       (content-hash
		"0pfkgas0xkixf99zqzyri80ksp89b7dw7hbcgpp60ni2cnchxk2n")))))
	(package
	 (name "komodo-wallet")
	 (version version)
	 (source komodo-wallet-origin)
	 (build-system qt-build-system)
	 (arguments komodo-wallet-arguments)
	 (native-inputs komodo-wallet-native-inputs)
	 (synopsis "Komodo Wallet Desktop GUI")
	 (description komodo-wallet-description)
	 (license license:gpl2)
	 (home-page "https://atomicdex.io/"))))))