gnu: monero: Update to 0.14.1.0.
[jackhill/guix/guix.git] / gnu / packages / finance.scm
CommitLineData
20c6b9da 1;;; GNU Guix --- Functional package management for GNU
fe7fa353 2;;; Copyright © 2015, 2016 Andreas Enge <andreas@enge.fr>
136ff9a2 3;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
d3699b31 4;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
cb0866c3 5;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
9475fd92 6;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
8514662b 7;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
14e09e90 8;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com>
9859800f 9;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
5424f9bc 10;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
3da86c52 11;;; Copyright © 2018 Adriano Peluso <catonano@gmail.com>
8f4d15f1 12;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
948e888d 13;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
fc54da1d 14;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
20c6b9da
AE
15;;;
16;;; This file is part of GNU Guix.
17;;;
18;;; GNU Guix is free software; you can redistribute it and/or modify it
19;;; under the terms of the GNU General Public License as published by
20;;; the Free Software Foundation; either version 3 of the License, or (at
21;;; your option) any later version.
22;;;
23;;; GNU Guix is distributed in the hope that it will be useful, but
24;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26;;; GNU General Public License for more details.
27;;;
28;;; You should have received a copy of the GNU General Public License
29;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
30
31(define-module (gnu packages finance)
fa4f95a7
CB
32 #:use-module ((guix licenses) #:prefix license:)
33 #:use-module (guix packages)
34 #:use-module (guix download)
730553d7 35 #:use-module (guix git-download)
fa4f95a7
CB
36 #:use-module (guix build-system gnu)
37 #:use-module (guix build-system cmake)
38 #:use-module (guix build-system python)
5424f9bc 39 #:use-module (gnu packages)
fa4f95a7
CB
40 #:use-module (gnu packages base)
41 #:use-module (gnu packages boost)
42 #:use-module (gnu packages check)
fc54da1d 43 #:use-module (gnu packages compression)
0a551443 44 #:use-module (gnu packages crypto)
fa4f95a7
CB
45 #:use-module (gnu packages databases)
46 #:use-module (gnu packages documentation)
47 #:use-module (gnu packages dns)
48 #:use-module (gnu packages emacs)
255d1bbe 49 #:use-module (gnu packages dbm)
df724c9c 50 #:use-module (gnu packages gnupg)
fa4f95a7
CB
51 #:use-module (gnu packages graphviz)
52 #:use-module (gnu packages groff)
53 #:use-module (gnu packages libedit)
54 #:use-module (gnu packages libevent)
55 #:use-module (gnu packages libunwind)
96f5e2e9 56 #:use-module (gnu packages libusb)
fa4f95a7
CB
57 #:use-module (gnu packages linux)
58 #:use-module (gnu packages multiprecision)
0a551443 59 #:use-module (gnu packages networking)
fa4f95a7
CB
60 #:use-module (gnu packages pkg-config)
61 #:use-module (gnu packages protobuf)
62 #:use-module (gnu packages python)
cc6f4912 63 #:use-module (gnu packages python-crypto)
589e3f4e 64 #:use-module (gnu packages python-web)
44d10b1f 65 #:use-module (gnu packages python-xyz)
fa4f95a7 66 #:use-module (gnu packages qt)
1d0865c1 67 #:use-module (gnu packages readline)
9d0c291e 68 #:use-module (gnu packages sphinx)
fa4f95a7
CB
69 #:use-module (gnu packages texinfo)
70 #:use-module (gnu packages textutils)
71 #:use-module (gnu packages tls)
72 #:use-module (gnu packages upnp)
fc54da1d 73 #:use-module (gnu packages version-control)
fa4f95a7
CB
74 #:use-module (gnu packages web)
75 #:use-module (gnu packages xml)
76 #:use-module (gnu packages gnuzilla))
20c6b9da
AE
77
78(define-public bitcoin-core
79 (package
80 (name "bitcoin-core")
0a59cc6e 81 (version "0.17.1")
20c6b9da
AE
82 (source (origin
83 (method url-fetch)
84 (uri
0a59cc6e 85 (string-append "https://bitcoincore.org/bin/bitcoin-core-"
14ea30e4 86 version "/bitcoin-" version ".tar.gz"))
20c6b9da
AE
87 (sha256
88 (base32
0a59cc6e 89 "0am4pnaf2cisv172jqx6jdpzx770agm8777163lkjbw3ryslymiy"))))
20c6b9da
AE
90 (build-system gnu-build-system)
91 (native-inputs
92 `(("pkg-config" ,pkg-config)
e49e74f5 93 ("python" ,python) ; for the tests
0193812a
MB
94 ("util-linux" ,util-linux) ; provides the hexdump command for tests
95 ("qttools" ,qttools)))
20c6b9da 96 (inputs
fe7fa353 97 `(("bdb" ,bdb-5.3) ; with 6.2.23, there is an error: ambiguous overload
20c6b9da 98 ("boost" ,boost)
14ea30e4 99 ("libevent" ,libevent)
20c6b9da
AE
100 ("miniupnpc" ,miniupnpc)
101 ("openssl" ,openssl)
102 ("protobuf" ,protobuf)
0193812a 103 ("qtbase" ,qtbase)))
20c6b9da
AE
104 (arguments
105 `(#:configure-flags
106 (list
107 ;; We use a bdb version newer than 4.8.
108 "--with-incompatible-bdb"
109 ;; Boost is not found unless specified manually.
110 (string-append "--with-boost="
0193812a
MB
111 (assoc-ref %build-inputs "boost"))
112 ;; XXX: The configure script looks up Qt paths by
113 ;; `pkg-config --variable=host_bins Qt5Core`, which fails to pick
114 ;; up executables residing in 'qttools', so we specify them here.
115 (string-append "ac_cv_path_LRELEASE="
116 (assoc-ref %build-inputs "qttools")
117 "/bin/lrelease")
118 (string-append "ac_cv_path_LUPDATE="
119 (assoc-ref %build-inputs "qttools")
120 "/bin/lupdate"))
20c6b9da
AE
121 #:phases
122 (modify-phases %standard-phases
99629e5a
CD
123 (add-before 'configure 'make-qt-deterministic
124 (lambda _
125 ;; Make Qt deterministic.
126 (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")
127 #t))
20c6b9da
AE
128 (add-before 'check 'set-home
129 (lambda _
0e9600cb
DM
130 (setenv "HOME" (getenv "TMPDIR")) ; Tests write to $HOME.
131 #t)))))
20c6b9da
AE
132 (home-page "https://bitcoin.org/en/")
133 (synopsis "Bitcoin peer-to-peer client")
134 (description
135 "Bitcoin is a digital currency that enables instant payments to anyone
136anywhere in the world. It uses peer-to-peer technology to operate without
137central authority: managing transactions and issuing money are carried out
138collectively by the network. Bitcoin Core is the reference implementation
139of the bitcoin protocol. This package provides the Bitcoin Core command
140line client and a client based on Qt.")
141 (license license:expat)))
d3699b31
AG
142
143(define-public ledger
144 (package
145 (name "ledger")
9859800f 146 (version "3.1.3")
8b7ac58c
TGR
147 (source
148 (origin
149 (method git-fetch)
150 (uri (git-reference
151 (url "https://github.com/ledger/ledger.git")
152 (commit (string-append "v" version))))
153 (file-name (git-file-name name version))
154 (sha256
9859800f 155 (base32 "0bfnrqrd6wqgsngfpqi30xh6yy86pwl25iwzrqy44q31r0zl4mm3"))))
d3699b31
AG
156 (build-system cmake-build-system)
157 (arguments
f90ed028 158 `(#:configure-flags
d3699b31
AG
159 `("-DBUILD_DOCS:BOOL=ON"
160 "-DBUILD_WEB_DOCS:BOOL=ON"
d3699b31 161 "-DUSE_PYTHON:BOOL=ON"
f90ed028 162 "-DCMAKE_INSTALL_LIBDIR:PATH=lib")
d3699b31
AG
163 #:phases
164 (modify-phases %standard-phases
165 (add-before 'configure 'install-examples
166 (lambda* (#:key outputs #:allow-other-keys)
167 (let ((examples (string-append (assoc-ref outputs "out")
168 "/share/doc/ledger/examples")))
169 (install-file "test/input/sample.dat" examples)
170 (install-file "test/input/demo.ledger" examples))
171 #t))
172 (add-after 'build 'build-doc
1f3c4ba8 173 (lambda _ (invoke "make" "doc")))
d3699b31
AG
174 (add-before 'check 'check-setup
175 ;; One test fails if it can't set the timezone.
176 (lambda* (#:key inputs #:allow-other-keys)
177 (setenv "TZDIR"
178 (string-append (assoc-ref inputs "tzdata")
179 "/share/zoneinfo"))
f90ed028
RW
180 ;; Skip failing test BaselineTest_cmd-org.
181 ;; This is a known upstream issue. See
182 ;; https://github.com/ledger/ledger/issues/550
183 (setenv "ARGS" "-E BaselineTest_cmd-org")
184 #t)))))
d3699b31
AG
185 (inputs
186 `(("boost" ,boost)
187 ("gmp" ,gmp)
188 ("libedit" ,libedit)
189 ("mpfr" ,mpfr)
190 ("python" ,python-2)
191 ("tzdata" ,tzdata)
192 ("utfcpp" ,utfcpp)))
193 (native-inputs
f90ed028 194 `(("groff" ,groff)
d3699b31 195 ("texinfo" ,texinfo)))
b53a0c88 196 (home-page "https://ledger-cli.org/")
d3699b31
AG
197 (synopsis "Command-line double-entry accounting program")
198 (description
199 "Ledger is a powerful, double-entry accounting system that is
200accessed from the UNIX command-line. This may put off some users, since
201there is no flashy UI, but for those who want unparalleled reporting
202access to their data there are few alternatives.
203
204Ledger uses text files for input. It reads the files and generates
205reports; there is no other database or stored state. To use Ledger,
206you create a file of your account names and transactions, run from the
207command line with some options to specify input and requested reports, and
208get output. The output is generally plain text, though you could generate
209a graph or html instead. Ledger is simple in concept, surprisingly rich
210in ability, and easy to use.")
211 ;; There are some extra licenses in files which do not presently get
212 ;; installed when you build this package. Different versions of the GPL
213 ;; are used in the contrib and python subdirectories. The bundled version
214 ;; of utfcpp is under the Boost 1.0 license. Also the file
215 ;; `tools/update_copyright_year` has an Expat license.
216 (license (list license:bsd-3
217 license:asl2.0 ; src/strptime.cc
218 (license:non-copyleft
219 "file://src/wcwidth.cc"
f90ed028 220 "See src/wcwidth.cc in the distribution.")))))
cb0866c3 221
0df201c0
RW
222(define-public emacs-ledger-mode
223 ;; There have been no new releases since 2016.
224 (let ((commit "253a20dc62e137ed0ed8e1dd8614ecba116610ea")
225 (revision "1"))
226 (package
227 (name "emacs-ledger-mode")
228 (version (git-version "3.1.1" revision commit))
229 (source
230 (origin
231 (method git-fetch)
232 (uri (git-reference
233 (url "https://github.com/ledger/ledger-mode.git")
234 (commit commit)))
235 (file-name (git-file-name name version))
236 (sha256
237 (base32 "06wrgkqpgvk17vibrk2qikdlqn8y63jg86marp1wgmram92mb3jk"))))
238 (build-system cmake-build-system)
239 (arguments
240 `(#:modules ((guix build cmake-build-system)
241 (guix build utils)
242 (guix build emacs-utils))
243 #:imported-modules (,@%cmake-build-system-modules
244 (guix build emacs-utils))
245 #:tests? #f ; there are none
246 #:phases
247 (modify-phases %standard-phases
1c0dd730
PN
248 (add-before 'build 'patch-path
249 (lambda* (#:key inputs #:allow-other-keys)
250 (let ((ledger (assoc-ref inputs "ledger")))
251 (make-file-writable "ledger-exec.el")
252 (emacs-substitute-variables "ledger-exec.el"
253 ("ledger-binary-path" (string-append ledger "/bin/ledger"))))
254 #t))
0df201c0
RW
255 (add-after 'build 'build-doc
256 (lambda* (#:key outputs #:allow-other-keys)
257 (let ((target (string-append (assoc-ref outputs "out")
258 "/share/info")))
259 (mkdir-p target)
260 (invoke "makeinfo" "-o" target
261 "../source/doc/ledger-mode.texi"))
262 #t))
263 (add-after 'install 'relocate-elisp
264 (lambda* (#:key outputs #:allow-other-keys)
265 (let* ((site-dir (string-append (assoc-ref outputs "out")
266 "/share/emacs/site-lisp"))
267 (guix-dir (string-append site-dir "/guix.d"))
268 (orig-dir (string-append site-dir "/ledger-mode"))
269 (dest-dir (string-append guix-dir "/ledger-mode")))
270 (mkdir-p guix-dir)
271 (rename-file orig-dir dest-dir)
272 (emacs-generate-autoloads ,name dest-dir)
273 #t))))))
1c0dd730
PN
274 (inputs
275 `(("ledger" ,ledger)))
0df201c0
RW
276 (native-inputs
277 `(("emacs-minimal" ,emacs-minimal)
278 ("texinfo" ,texinfo)))
279 (home-page "https://ledger-cli.org/")
280 (synopsis "Command-line double-entry accounting program")
281 (description
282 "Ledger is a powerful, double-entry accounting system that is
283accessed from the UNIX command-line. This may put off some users, since
284there is no flashy UI, but for those who want unparalleled reporting
285access to their data there are few alternatives.
286
287Ledger uses text files for input. It reads the files and generates
288reports; there is no other database or stored state. To use Ledger,
289you create a file of your account names and transactions, run from the
290command line with some options to specify input and requested reports, and
291get output. The output is generally plain text, though you could generate
292a graph or html instead. Ledger is simple in concept, surprisingly rich
293in ability, and easy to use.
294
295This package provides the Emacs mode.")
296 (license license:gpl2+))))
297
cb0866c3
HG
298(define-public geierlein
299 (package
300 (name "geierlein")
1c21e734 301 (version "0.9.13")
cb0866c3
HG
302 (source
303 (origin
1fd71120
TGR
304 (method git-fetch)
305 (uri (git-reference
306 (url "https://github.com/stesie/geierlein.git")
307 (commit (string-append "V" version))))
308 (file-name (git-file-name name version))
cb0866c3 309 (sha256
1fd71120 310 (base32 "00zpwr3lk2vdmd60fgdwdk0xxs52wvnm19ln2m75yfphydvkglic"))))
cb0866c3
HG
311 (build-system gnu-build-system)
312 (arguments
1fd71120 313 `(#:tests? #f ; would require npm, python and a lot more
cb0866c3
HG
314 #:phases
315 (modify-phases %standard-phases
1c21e734 316 (delete 'configure) ; no configure script
cb0866c3
HG
317 (add-after 'unpack 'override-target-directory-and-tool-paths
318 (lambda* (#:key inputs outputs #:allow-other-keys)
319 (substitute* "Makefile"
320 (("prefix := .*")
321 (string-append "prefix := " (assoc-ref outputs "out") "\n"))
322 ;; Required for tests, unused for now:
323 ;;(("PYTHON := .*")
324 ;; (string-append (which "python") "\n")))
325 (("INSTALL := .*")
326 (string-append "INSTALL := " (which "install") "\n")))
327 (substitute* "bin/xgeierlein.in"
328 ;; Use icecat as XULRUNNER
329 (("^for search ")
330 (string-append "XULRUNNER=" (which "icecat") "\n"
331 "for search ")))
332 #t)))))
333 (inputs
334 `(("icecat" ,icecat)))
1e41bb1b 335 (home-page "https://stesie.github.io/geierlein/")
cb0866c3
HG
336 (synopsis "Free Elster client, for sending Germany VAT declarations")
337 (description
338 "Geierlein is a free Elster client, i.e. an application that
339allows to send VAT declarations to Germany's fiscal authorities.
340
341Currently it is *not* possible to send returns that are due annually
342(especially the income tax return) since the fiscal authority doesn't
343allow to do that off the ERiC library (which is proprietary however).
344It's not clear at the moment whether one day it will be possible to
345do so.")
346 (license license:agpl3+)))
9475fd92
CZ
347
348(define-public electrum
349 (package
350 (name "electrum")
7b725203 351 (version "3.3.6")
9475fd92
CZ
352 (source
353 (origin
354 (method url-fetch)
355 (uri (string-append "https://download.electrum.org/"
356 version "/Electrum-"
357 version ".tar.gz"))
358 (sha256
7b725203 359 (base32 "0am5ki3z0yvhrz16vp2jjy5fkxxqph0mj9qqpbw3kpql65shykwz"))
9475fd92
CZ
360 (modules '((guix build utils)))
361 (snippet
362 '(begin
363 ;; Delete the bundled dependencies.
364 (delete-file-recursively "packages")
365 #t))))
366 (build-system python-build-system)
367 (inputs
47bd32d9
CZ
368 `(("python-pyaes" ,python-pyaes)
369 ("python-pysocks" ,python-pysocks)
370 ("python-sip" ,python-sip)
371 ("python-pyqt" ,python-pyqt)
372 ("python-ecdsa" ,python-ecdsa)
373 ("python-pbkdf2" ,python-pbkdf2)
374 ("python-requests" ,python-requests)
375 ("python-qrcode" ,python-qrcode)
376 ("python-protobuf" ,python-protobuf)
81d59f44
VC
377 ("python-aiohttp" ,python-aiohttp)
378 ("python-aiohttp-socks" ,python-aiohttp-socks)
379 ("python-aiorpcx" ,python-aiorpcx)
380 ("python-certifi" ,python-certifi)
47bd32d9
CZ
381 ("python-dnspython" ,python-dnspython)
382 ("python-jsonrpclib-pelix" ,python-jsonrpclib-pelix)))
9475fd92 383 (arguments
47bd32d9 384 `(#:tests? #f ;; package doesn't have any tests
9475fd92
CZ
385 #:phases
386 (modify-phases %standard-phases
387 (add-before 'build 'patch-home
388 (lambda* (#:key outputs #:allow-other-keys)
389 (substitute* "setup.py"
390 (("~/.local/share")
391 (string-append (assoc-ref outputs "out") "/local/share"))))))))
392 (home-page "https://electrum.org/")
393 (synopsis "Bitcoin wallet")
394 (description
395 "Electrum is a lightweight Bitcoin client, based on a client-server
396protocol. It supports Simple Payment Verification (SPV) and deterministic key
397generation from a seed. Your secret keys are encrypted and are never sent to
398other machines/servers. Electrum does not download the Bitcoin blockchain.")
399 (license license:expat)))
8514662b 400
a0bb0217
VC
401(define-public electron-cash
402 (package
403 (inherit electrum)
404 (name "electron-cash")
7a70e7ca 405 (version "4.0.7")
a0bb0217
VC
406 (source
407 (origin
408 (method url-fetch)
409 (uri (string-append "https://electroncash.org/downloads/"
410 version
4e86e9d7 411 "/win-linux/Electron-Cash-"
a0bb0217
VC
412 version
413 ".tar.gz"))
414 (sha256
415 (base32
7a70e7ca 416 "0xswmr68cm1c77lzisi3z812jzqczm9dfrshfhdq42zz5kaz4gnn"))
a0bb0217
VC
417 (modules '((guix build utils)))
418 (snippet
419 '(begin
420 ;; Delete the bundled dependencies.
421 (delete-file-recursively "packages")
422 #t))))
423 (home-page "https://electroncash.org/")
424 (synopsis "Bitcoin Cash wallet")
425 (description
426 "Electroncash is a lightweight Bitcoin Cash client, based on a client-server
427protocol. It supports Simple Payment Verification (SPV) and deterministic key
428generation from a seed. Your secret keys are encrypted and are never sent to
429other machines/servers. Electroncash does not download the Bitcoin Cash blockchain.")
430 (license license:expat)))
431
8514662b
TF
432(define-public monero
433 ;; This package bundles easylogging++ and lmdb.
fc54da1d
GLV
434 ;; The bundled easylogging++ is modified, and the changes will not be
435 ;; upstreamed.
8514662b
TF
436 ;; The devs deem the lmdb driver too critical a consenus component, to use
437 ;; the system's dynamically linked library.
438 (package
439 (name "monero")
fc54da1d 440 (version "0.14.1.0")
8514662b
TF
441 (source
442 (origin
0a551443
TF
443 (method git-fetch)
444 (uri (git-reference
fc54da1d
GLV
445 (url "https://github.com/monero-project/monero.git")
446 (commit (string-append "v" version))
447 (recursive? #t)))
136ff9a2 448 (file-name (git-file-name name version))
0a551443 449 (patches (search-patches "monero-use-system-miniupnpc.patch"))
fc54da1d
GLV
450 (modules '((guix build utils)))
451 (snippet
452 '(begin
453 ;; Delete bundled dependencies.
454 (for-each
455 delete-file-recursively
456 '("external/miniupnp" "external/rapidjson"
457 "external/unbound"))
458 #t))
8514662b
TF
459 (sha256
460 (base32
fc54da1d 461 "1asa197fad81jfv12qgaa7y7pdr1r1pda96m9pvivkh4v30cx0nh"))))
8514662b
TF
462 (build-system cmake-build-system)
463 (native-inputs
464 `(("doxygen" ,doxygen)
fc54da1d 465 ("git" ,git)
8514662b 466 ("graphviz" ,graphviz)
fc54da1d
GLV
467 ("pkg-config" ,pkg-config)
468 ("qttools" ,qttools)))
8514662b 469 (inputs
fc54da1d 470 `(("boost" ,boost)
0a551443 471 ("cppzmq" ,cppzmq)
8514662b 472 ("expat" ,expat)
fc54da1d 473 ("hidapi" ,hidapi)
8514662b 474 ("libunwind" ,libunwind)
fc54da1d
GLV
475 ("libsodium" ,libsodium)
476 ("miniupnpc" ,miniupnpc)
8514662b
TF
477 ("openssl" ,openssl)
478 ("rapidjson" ,rapidjson)
fc54da1d
GLV
479 ("readline" ,readline)
480 ("unbound" ,unbound)
481 ("xz" ,xz)
482 ("zeromq" ,zeromq)))
8514662b
TF
483 (arguments
484 `(#:out-of-source? #t
fc54da1d
GLV
485 #:configure-flags '("-DARCH=default"
486 "-DBUILD_TESTS=ON"
8514662b
TF
487 "-DBUILD_GUI_DEPS=ON")
488 #:phases
489 (modify-phases %standard-phases
490 ;; tests/core_tests need a valid HOME
491 (add-before 'configure 'set-home
492 (lambda _
493 (setenv "HOME" (getcwd))
494 #t))
fc54da1d 495 (add-after 'set-home 'change-log-path
8514662b
TF
496 (lambda _
497 (substitute* "contrib/epee/src/mlog.cpp"
498 (("epee::string_tools::get_current_module_folder\\(\\)")
fc54da1d
GLV
499 "\".bitmonero\"")
500 (("return \\(")
501 "return ((std::string(getenv(\"HOME\"))) / "))
8514662b 502 #t))
fc54da1d 503 ;; Only try tests that don't need access to network or system
8514662b
TF
504 (replace 'check
505 (lambda _
fc54da1d 506 (invoke "make" "ARGS=-R 'hash|core_tests'" "test")))
8514662b
TF
507 (add-after 'check 'unit-tests
508 (lambda _
509 (let ((excluded-unit-tests
510 (string-join
511 '("AddressFromURL.Success"
512 "AddressFromURL.Failure"
513 "DNSResolver.IPv4Success"
514 "DNSResolver.DNSSECSuccess"
515 "DNSResolver.DNSSECFailure"
fc54da1d
GLV
516 "DNSResolver.GetTXTRecord"
517 ;; TODO: Find why portability_wallet test fails
518 ;; Maybe the Boost version used to create the test
519 ;; wallet and the current Boost version are not
520 ;; completely compatible?
521 "Serialization.portability_wallet"
522 "is_hdd.linux_os_root")
8514662b 523 ":")))
797445be
TF
524 (invoke "tests/unit_tests/unit_tests"
525 (string-append "--gtest_filter=-"
fc54da1d 526 excluded-unit-tests))))))))
8514662b
TF
527 (home-page "https://getmonero.org/")
528 (synopsis "Command-line interface to the Monero currency")
529 (description
fc54da1d
GLV
530 "Monero is a secure, private, untraceable currency. This package provides
531the Monero command line client and daemon.")
8514662b 532 (license license:bsd-3)))
79228a52 533
f7e24839 534(define-public monero-gui
79228a52 535 (package
f7e24839 536 (name "monero-gui")
3902bc5c 537 (version "0.12.2.0")
79228a52
TF
538 (source
539 (origin
3902bc5c
TF
540 (method git-fetch)
541 (uri (git-reference
f7e24839 542 (url "https://github.com/monero-project/monero-gui")
3902bc5c 543 (commit (string-append "v" version))))
398a96a2 544 (file-name (git-file-name name version))
79228a52
TF
545 (sha256
546 (base32
3902bc5c 547 "1cnrkwh7kp64lnzz1xfmkf1mhsgm5gls292gpqai3jr8jydpkahl"))))
79228a52
TF
548 (build-system gnu-build-system)
549 (native-inputs
550 `(("doxygen" ,doxygen)
551 ("graphviz" ,graphviz)
6915d20f
EF
552 ("pkg-config" ,pkg-config)
553 ("qttools" ,qttools)))
79228a52
TF
554 (inputs
555 `(("boost" ,boost)
556 ("libunwind" ,libunwind)
557 ("openssl" ,openssl)
6915d20f
EF
558 ("qtbase" ,qtbase)
559 ("qtdeclarative" ,qtdeclarative)
560 ("qtgraphicaleffects" ,qtgraphicaleffects)
561 ("qtquickcontrols" ,qtquickcontrols)
1d0865c1 562 ("readline" ,readline)
79228a52
TF
563 ("unbound" ,unbound)))
564 (propagated-inputs
565 `(("monero" ,monero)))
566 (arguments
567 `(#:phases
568 (modify-phases %standard-phases
569 (delete 'configure)
570 (delete 'check)
571 (add-before 'build 'fix-makefile-vars
572 (lambda _
573 (substitute* "src/zxcvbn-c/makefile"
574 (("\\?=") "="))
575 #t))
576 (add-after 'fix-makefile-vars 'fix-library-paths
577 (lambda* (#:key inputs #:allow-other-keys)
578 (substitute* "monero-wallet-gui.pro"
579 (("-L/usr/local/lib") "")
580 (("-L/usr/local/opt/openssl/lib")
581 (string-append "-L"
582 (assoc-ref inputs "openssl")
583 "/lib"))
584 (("-L/usr/local/opt/boost/lib")
585 (string-append "-L"
586 (assoc-ref inputs "boost")
587 "/lib")))
588 #t))
589 (add-after 'fix-library-paths 'fix-monerod-path
590 (lambda* (#:key inputs #:allow-other-keys)
591 (substitute* "src/daemon/DaemonManager.cpp"
592 (("QApplication::applicationDirPath\\(\\) \\+ \"/monerod")
593 (string-append "\""(assoc-ref inputs "monero")
594 "/bin/monerod")))
595 #t))
6915d20f
EF
596 (add-after 'fix-monerod-path 'fix-qt-paths
597 (lambda* (#:key inputs #:allow-other-keys)
598 (let* ((qttools (assoc-ref inputs "qttools"))
599 (lrelease (string-append qttools "/bin/lrelease"))
600 (lupdate (string-append qttools "/bin/lupdate")))
601 (substitute* "monero-wallet-gui.pro"
602 (("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease") lrelease)
603 (("\\$\\$\\[QT_INSTALL_BINS\\]/lupdate") lupdate))
604 #t)))
79228a52
TF
605 (replace 'build
606 (lambda _
88d5ee44 607 (invoke "./build.sh")))
79228a52
TF
608 (add-after 'build 'fix-install-path
609 (lambda* (#:key outputs #:allow-other-keys)
610 (substitute* "build/Makefile"
611 (("/opt/monero-wallet-gui")
612 (assoc-ref outputs "out")))
613 #t))
614 (add-before 'install 'change-dir
615 (lambda _
6915d20f
EF
616 (chdir "build")))
617 (add-after 'install 'wrap-executable
618 (lambda* (#:key inputs outputs #:allow-other-keys)
619 (let ((out (assoc-ref outputs "out")))
620 (wrap-program (string-append out "/bin/monero-wallet-gui")
621 `("QT_PLUGIN_PATH" ":" prefix
622 ,(map (lambda (label)
623 (string-append (assoc-ref inputs label)
624 "/lib/qt5/plugins"))
625 '("qtbase" "qtdeclarative")))
626 `("QML2_IMPORT_PATH" ":" prefix
627 ,(map (lambda (label)
628 (string-append (assoc-ref inputs label)
629 "/lib/qt5/qml"))
630 '("qtdeclarative" "qtgraphicaleffects"
631 "qtquickcontrols"))))
632 #t))))))
79228a52
TF
633 (home-page "https://getmonero.org/")
634 (synopsis "Graphical user interface for the Monero currency")
635 (description
636 "Monero is a secure, private, untraceable currency. This package provides the
637Monero GUI client.")
638 (license license:bsd-3)))
00d3f022 639
f7e24839
TF
640(define-public monero-core
641 (deprecated-package "monero-core" monero-gui))
642
00d3f022
DM
643(define-public python-trezor-agent
644 (package
645 (name "python-trezor-agent")
37cff994 646 (version "0.13.1")
00d3f022
DM
647 (source
648 (origin
39a7b720
TGR
649 (method git-fetch)
650 (uri (git-reference
651 (url "https://github.com/romanz/trezor-agent.git")
652 (commit (string-append "v" version))))
653 (file-name (git-file-name name version))
00d3f022 654 (sha256
37cff994 655 (base32 "0q99vbfd3h85s8rnjipnmldixabqmmlk5w9karv6f0rhyi54f4zv"))))
00d3f022
DM
656 (build-system python-build-system)
657 (arguments
658 `(#:phases
659 (modify-phases %standard-phases
df724c9c
VC
660 (add-after 'unpack 'remove-requires-backports-shutil-which
661 ;; Remove requires on backport of shutil_which, as python 3.4+ has
662 ;; a built-in implementation supported in python-trezor-agent.
663 (lambda _
664 (substitute* "setup.py"
665 (("'backports.shutil_which>=3.5.1',") ""))
666 #t))
00d3f022
DM
667 (delete 'check)
668 (add-after 'install 'check
669 (lambda* (#:key outputs inputs #:allow-other-keys)
39a7b720 670 ;; Make installed package available for running the tests.
00d3f022
DM
671 (add-installed-pythonpath inputs outputs)
672 (invoke "py.test"))))))
673 (propagated-inputs
df724c9c
VC
674 `(("python-configargparse" ,python-configargparse)
675 ("python-daemon" ,python-daemon)
676 ("python-docutils" ,python-docutils)
677 ("python-ecdsa" ,python-ecdsa)
00d3f022 678 ("python-ed25519" ,python-ed25519)
df724c9c
VC
679 ("python-mnemonic" ,python-mnemonic)
680 ("python-pymsgbox" ,python-pymsgbox)
00d3f022 681 ("python-semver" ,python-semver)
df724c9c
VC
682 ("python-unidecode" ,python-unidecode)
683 ("python-wheel" ,python-wheel)))
00d3f022 684 (native-inputs
df724c9c
VC
685 `(("gnupg" ,gnupg)
686 ("python-mock" ,python-mock)
00d3f022
DM
687 ("python-pytest" ,python-pytest)))
688 (home-page "https://github.com/romanz/trezor-agent")
df724c9c 689 (synopsis "Use hardware wallets as SSH and GPG agent")
00d3f022
DM
690 (description
691 "@code{libagent} is a library that allows using TREZOR, Keepkey and
692Ledger Nano as a hardware SSH/GPG agent.")
693 (license license:lgpl3)))
694
695(define-public python2-trezor-agent
696 (package-with-python2 python-trezor-agent))
6e9749ef
DM
697
698(define-public python-mnemonic
699 (package
700 (name "python-mnemonic")
701 (version "0.18")
702 (source
703 (origin
704 (method url-fetch)
705 (uri (pypi-uri "mnemonic" version))
706 (sha256
707 (base32
708 "07bzfa5di6nv5xwwcwbypnflpj50wlfczhh6q6hg8w13g5m319q2"))))
709 (build-system python-build-system)
710 (propagated-inputs
711 `(("python-pbkdf2" ,python-pbkdf2)))
712 (home-page "https://github.com/trezor/python-mnemonic")
713 (synopsis "Implementation of Bitcoin BIP-0039")
714 (description "@code{mnemonic} is a library that provides an implementation
715of Bitcoin BIP-0039.")
716 (license license:expat)))
717
718(define-public python2-mnemonic
719 (package-with-python2 python-mnemonic))
96f5e2e9
DM
720
721(define-public python-ledgerblue
722 (package
723 (name "python-ledgerblue")
724 (version "0.1.16")
725 (source
726 (origin
727 (method url-fetch)
728 (uri (pypi-uri "ledgerblue" version))
729 (sha256
730 (base32
731 "010mghaqh1cmz3a0ifc3f40mmyplilwlw7kpha2mzyrrff46p9gb"))))
732 (build-system python-build-system)
733 (propagated-inputs
734 `(("python-ecpy" ,python-ecpy)
735 ("python-future" ,python-future)
736 ("python-hidapi" ,python-hidapi)
737 ("python-pillow" ,python-pillow)
738 ("python-protobuf" ,python-protobuf)
739 ("python-pycrypto" ,python-pycrypto)))
740 (home-page "https://github.com/LedgerHQ/blue-loader-python")
741 (synopsis "Python library to communicate with Ledger Blue/Nano S")
742 (description "@code{ledgerblue} is a Python library to communicate with
743Ledger Blue/Nano S.")
744 (license license:asl2.0)))
745
746(define-public python2-ledgerblue
747 (package-with-python2 python-ledgerblue))
748
1dca32e3
DM
749(define-public python-trezor
750 (package
751 (name "python-trezor")
61497aa4 752 (version "0.11.3")
1dca32e3
DM
753 (source
754 (origin
755 (method url-fetch)
756 (uri (pypi-uri "trezor" version))
757 (sha256
758 (base32
61497aa4 759 "0211m027vlvyqy83kwbjjjxalb04xgf1klv0h0y0f0yhj07516n7"))))
1dca32e3 760 (build-system python-build-system)
b4c698c8
VC
761 (arguments
762 `(#:phases
763 (modify-phases %standard-phases
764 ;; Default tests run device-specific tests which fail, only run specific tests.
765 (replace 'check
766 (lambda* (#:key inputs outputs #:allow-other-keys)
8c16b8a4
VC
767 ;; Delete tests that require network access.
768 (delete-file "trezorlib/tests/unit_tests/test_tx_api.py")
769 (invoke "python" "-m" "pytest" "--pyarg" "trezorlib.tests.unit_tests"))))))
1dca32e3 770 (propagated-inputs
b4c698c8 771 `(("python-click" ,python-click)
8c16b8a4 772 ("python-construct" ,python-construct)
b4c698c8 773 ("python-ecdsa" ,python-ecdsa)
b4c698c8 774 ("python-libusb1" ,python-libusb1)
1dca32e3 775 ("python-mnemonic" ,python-mnemonic)
b4c698c8
VC
776 ("python-pyblake2" ,python-pyblake2)
777 ("python-requests" ,python-requests)
8c16b8a4 778 ("python-typing-extensions" ,python-typing-extensions)))
1dca32e3 779 (native-inputs
61497aa4
TGR
780 ;; For tests.
781 `(("protobuf" ,protobuf)
782 ("python-black" ,python-black)
783 ("python-protobuf" ,python-protobuf)
784 ("python-isort" ,python-isort)
785 ("python-pyqt" ,python-pyqt)
786 ("python-pytest" ,python-pytest)))
1dca32e3
DM
787 (home-page "https://github.com/trezor/python-trezor")
788 (synopsis "Python library for communicating with TREZOR Hardware Wallet")
789 (description "@code{trezor} is a Python library for communicating with
790TREZOR Hardware Wallet.")
791 (license license:lgpl3)))
792
793(define-public python2-trezor
794 (package-with-python2 python-trezor))
d596fea5 795
d6ddeffc
DM
796(define-public python-keepkey
797 (package
798 (name "python-keepkey")
52311b51 799 (version "6.0.3")
d6ddeffc
DM
800 (source
801 (origin
802 (method url-fetch)
803 (uri (pypi-uri "keepkey" version))
804 (sha256
805 (base32
52311b51 806 "0z3d0m6364v9dv0njs4cd5m5ai6j6v35xaaxfxl90m9vmyxy81vd"))))
d6ddeffc
DM
807 (build-system python-build-system)
808 (arguments
809 `(#:phases
810 (modify-phases %standard-phases
811 (delete 'check)
812 (add-after 'install 'check
813 (lambda* (#:key inputs outputs #:allow-other-keys)
814 (add-installed-pythonpath inputs outputs)
815 (apply invoke "python" (find-files "tests/unit" "\\.py$")))))))
816 (propagated-inputs
817 `(("python-ecdsa" ,python-ecdsa)
818 ("python-hidapi" ,python-hidapi)
02d9e5d2 819 ("python-libusb1" ,python-libusb1)
d6ddeffc
DM
820 ("python-mnemonic" ,python-mnemonic)
821 ("python-protobuf" ,python-protobuf)))
822 (home-page "https://github.com/keepkey/python-keepkey")
823 (synopsis "Python library for communicating with KeepKey Hardware Wallet")
824 (description "@code{keepkey} is a Python library for communicating with
825the KeepKey Hardware Wallet.")
826 (license license:lgpl3)))
827
828(define-public python2-keepkey
829 (package-with-python2 python-keepkey))
830
d596fea5
DM
831(define-public ledger-agent
832 (package
833 (name "ledger-agent")
834 (version "0.9.0")
835 (source
836 (origin
837 (method url-fetch)
838 (uri (pypi-uri "ledger_agent" version))
839 (sha256
840 (base32
841 "03zj602m2rln9yvr08dswy56vzkbldp8b074ixwzz525dafblr92"))))
842 (build-system python-build-system)
843 (inputs
844 `(("python-ledgerblue" ,python-ledgerblue)
845 ("python-trezor-agent" ,python-trezor-agent)))
846 (home-page "http://github.com/romanz/trezor-agent")
847 (synopsis "Ledger as hardware SSH/GPG agent")
848 (description "This package allows using Ledger as hardware SSH/GPG agent.
849
5859fd6c
MB
850Usage for SSH: trezor-agent foo@@example.com --connect
851Usage for GPG: Initialize using trezor-gpg init \"Foo <foo@@example.com>\"
d596fea5
DM
852Then set the environment variable GNUPGHOME to
853\"${HOME}/.gnupg/trezor\".")
854 (license license:lgpl3)))
47c8ea99
DM
855
856(define-public trezor-agent
857 (package
858 (name "trezor-agent")
7fafdadd 859 (version "0.10.0")
47c8ea99
DM
860 (source
861 (origin
862 (method url-fetch)
863 (uri (pypi-uri "trezor_agent" version))
864 (sha256
865 (base32
7fafdadd
VC
866 "144657c7bn0a667dq5fv5r6j7iilxf3h9agj29v1m2qpq40g0az8"))))
867 (arguments
868 ;; Tests fail with "AttributeError: module 'attr' has no attribute 's'".
869 `(#:phases
870 (modify-phases %standard-phases
871 (add-after 'wrap 'fixup-agent-py
872 (lambda* (#:key inputs outputs #:allow-other-keys)
873 (let* ((out (assoc-ref outputs "out")))
874 ;; overwrite the wrapper with the real thing.
875 (install-file "./trezor_agent.py"
876 (string-append out "/bin"))
877 #t))))))
47c8ea99
DM
878 (build-system python-build-system)
879 (inputs
880 `(("python-trezor" ,python-trezor)
881 ("python-trezor-agent" ,python-trezor-agent)))
7fafdadd
VC
882 (native-inputs
883 `(("python-hidapi" ,python-hidapi)))
884 (home-page "https://github.com/romanz/trezor-agent")
47c8ea99
DM
885 (synopsis "Using Trezor as hardware SSH/GPG agent")
886 (description "This package allows using Trezor as a hardware SSH/GPG
887agent.")
888 (license license:lgpl3)))
50c4d676
DM
889
890(define-public keepkey-agent
891 (package
892 (name "keepkey-agent")
893 (version "0.9.0")
894 (source
895 (origin
896 (method url-fetch)
897 (uri (pypi-uri "keepkey_agent" version))
898 (sha256
899 (base32
900 "03779gvlx70i0nnry98i4pl1d92604ix5x6jgdfkrdgzqbh5vj27"))))
901 (build-system python-build-system)
902 (inputs
903 `(("python-keepkey" ,python-keepkey)
904 ("python-trezor-agent" ,python-trezor-agent)))
905 (home-page "http://github.com/romanz/trezor-agent")
906 (synopsis "KeepKey as hardware SSH/GPG agent")
907 (description "This package allows using KeepKey as a hardware SSH/GPG
908agent.")
909 (license license:lgpl3)))
3da86c52
AP
910
911(define-public python-stdnum
912 (package
913 (name "python-stdnum")
914 (version "1.8.1")
915 (source
916 (origin
917 (method url-fetch)
918 (uri (pypi-uri "python-stdnum" version))
919 (sha256
920 (base32
921 "0hvr47q32xbyiznpmbg4r8rcvxhnf0lwf33hcpnynyik57djy5np"))))
922 (build-system python-build-system)
923 (home-page
924 "https://arthurdejong.org/python-stdnum/")
925 (synopsis
926 "Python module to handle standardized number and code formats")
927 (description
928 "This is a Python library that aims to provide functions to handle,
929parse and validate standard numbers.
930The module supports more than 100 different number formats
931amongst which a great number of VAT and other tax numbers,
932personal identity and company identification codes,
933international standard numbers (ISBN, IBAN, EAN, etc.)
934and various other formats.
935The module also inclused implementations of the Verhoeff,
936Luhn and family of ISO/IEC 7064 check digit algorithms. ")
937 (license license:lgpl2.1+)))
938
939(define-public python2-stdnum
940 (package-with-python2 python-stdnum))
730553d7 941
c7299015
NG
942(define-public python-duniterpy
943 (package
944 (name "python-duniterpy")
2868804d 945 (version "0.54.3")
c7299015
NG
946 (source
947 (origin
948 (method git-fetch)
949 ;; Pypi's default URI is missing "requirements.txt" file.
950 (uri (git-reference
7dab3e61 951 (url "https://git.duniter.org/clients/python/duniterpy.git")
c7299015
NG
952 (commit version)))
953 (file-name (git-file-name name version))
954 (sha256
955 (base32
2868804d 956 "1k3rpfc9zxj9z50cr4zjfyzdla9ap5mj1v1rlcriqmflgb5cmiba"))))
c7299015 957 (build-system python-build-system)
1427d888
NG
958 (arguments
959 ;; Tests fail with "AttributeError: module 'attr' has no attribute 's'".
42a57df8
NG
960 `(#:tests? #f
961 #:phases
962 (modify-phases %standard-phases
963 (add-after 'build 'build-documentation
964 (lambda _
965 (invoke "make" "docs")))
966 (add-after 'build-documentation 'install-documentation
967 (lambda* (#:key inputs outputs #:allow-other-keys)
968 (let* ((out (assoc-ref outputs "out"))
969 (doc (string-append out "/share/doc/" ,name)))
970 (mkdir-p doc)
971 (copy-recursively "docs/_build/html" doc))
972 #t)))))
973 (native-inputs
352033f3
NG
974 `(("sphinx" ,python-sphinx)
975 ("sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
c7299015 976 (propagated-inputs
352033f3
NG
977 `(("aiohttp" ,python-aiohttp)
978 ("attr" ,python-attr)
979 ("base58" ,python-base58)
980 ("jsonschema" ,python-jsonschema)
981 ("libnacl" ,python-libnacl)
982 ("pyaes" ,python-pyaes)
983 ("pylibscrypt" ,python-pylibscrypt)
984 ("pypeg2" ,python-pypeg2)))
9f1a2be2 985 (home-page "https://git.duniter.org/clients/python/duniterpy")
c7299015
NG
986 (synopsis "Python implementation of Duniter API")
987 (description "@code{duniterpy} is an implementation of
207a79b2 988@uref{https://github.com/duniter/duniter/, duniter} API. Its
c7299015
NG
989main features are:
990@itemize
207a79b2
NG
991@item Support Duniter's Basic Merkle API and protocol
992@item Asynchronous/synchronous without threads
993@item Support HTTP, HTTPS and Web Socket transport for Basic Merkle API
994@item Support Elasticsearch Duniter4j API
c7299015 995@item Duniter signing key
207a79b2 996@item Sign/verify and encrypt/decrypt messages with the Duniter credentials
c7299015
NG
997@end itemize")
998 (license license:gpl3+)))
999
730553d7
NG
1000(define-public silkaj
1001 (package
1002 (name "silkaj")
0f065129 1003 (version "0.7.2")
730553d7
NG
1004 (source
1005 (origin
1006 (method git-fetch)
1007 (uri (git-reference
1008 (url "https://git.duniter.org/clients/python/silkaj.git")
1009 (commit (string-append "v" version))))
1010 (file-name (git-file-name name version))
1011 (sha256
1012 (base32
0f065129 1013 "059k2kil2l8jcm4wp86w1z7y8p26rww7d3l5fzds0qq2dzvkvzgs"))))
730553d7
NG
1014 (build-system python-build-system)
1015 (arguments
e627052f 1016 `(#:tests? #f)) ;no test
730553d7 1017 (inputs
c14b3a8d
NG
1018 `(("click" ,python-click)
1019 ("duniterpy" ,python-duniterpy)
1020 ("ipaddress" ,python-ipaddress)
1021 ("pynacl" ,python-pynacl)
f41378b7
NG
1022 ("tabulate" ,python-tabulate)
1023 ("texttable" ,python-texttable)))
730553d7
NG
1024 (home-page "https://silkaj.duniter.org/")
1025 (synopsis "Command line client for Duniter network")
1026 (description "@code{Silkaj} is a command line client for the
1027@uref{https://github.com/duniter/duniter/, Duniter} network.
1028
1029Its features are:
1030@itemize
1031@item information about currency,
1032@item issuers difficulty to generate next block,
1033@item network view of nodes,
1034@item list of last issuers,
1035@item send transactions,
1036@item get account amount.
1037@end itemize")
1038 (license license:agpl3+)))