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