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