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>
15 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
73 (define-public bitcoin-core
80 (string-append "https://bitcoin.org/bin/bitcoin-core-"
81 version "/bitcoin-" version ".tar.gz"))
84 "1zkqp93yircd3pbxczxfnibkpq0sgcv5r7wg6d196b9pwgr9zd39"))))
85 (build-system gnu-build-system)
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)))
92 `(("bdb" ,bdb-5.3) ; with 6.2.23, there is an error: ambiguous overload
94 ("libevent" ,libevent)
95 ("miniupnpc" ,miniupnpc)
97 ("protobuf" ,protobuf)
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")
113 (string-append "ac_cv_path_LUPDATE="
114 (assoc-ref %build-inputs "qttools")
117 (modify-phases %standard-phases
118 (add-before 'check 'set-home
120 (setenv "HOME" (getenv "TMPDIR"))))))) ; Tests write to $HOME.
121 (home-page "https://bitcoin.org/en/")
122 (synopsis "Bitcoin peer-to-peer client")
124 "Bitcoin is a digital currency that enables instant payments to anyone
125 anywhere in the world. It uses peer-to-peer technology to operate without
126 central authority: managing transactions and issuing money are carried out
127 collectively by the network. Bitcoin Core is the reference implementation
128 of the bitcoin protocol. This package provides the Bitcoin Core command
129 line client and a client based on Qt.")
130 (license license:expat)))
132 (define-public ledger
139 "https://github.com/ledger/ledger/archive/v"
141 (file-name (string-append name "-" version ".tar.gz"))
144 "12jlv3gsjhrja25q9hrwh73cdacd2l3c2yyn8qnijav9mdhnbw4h"))
145 (patches (search-patches "ledger-revert-boost-python-fix.patch"
146 "ledger-fix-uninitialized.patch"))))
147 (build-system cmake-build-system)
149 `(#:modules ((guix build cmake-build-system)
150 ((guix build gnu-build-system) #:prefix gnu:)
152 (guix build emacs-utils))
153 #:imported-modules (,@%cmake-build-system-modules
154 (guix build emacs-utils))
156 `("-DBUILD_DOCS:BOOL=ON"
157 "-DBUILD_WEB_DOCS:BOOL=ON"
158 "-DBUILD_EMACSLISP:BOOL=ON"
159 "-DUSE_PYTHON:BOOL=ON"
160 "-DCMAKE_INSTALL_LIBDIR:PATH=lib"
161 ,(string-append "-DUTFCPP_INCLUDE_DIR:PATH="
162 (assoc-ref %build-inputs "utfcpp")
164 ;; Skip failing test BaselineTest_cmd-org during the check phase.
165 ;; This is a known upstream issue. See
166 ;; https://github.com/ledger/ledger/issues/550
167 #:make-flags (list "ARGS=-E BaselineTest_cmd-org")
169 (modify-phases %standard-phases
170 (add-after 'unpack 'boost-compat
172 (substitute* "src/utils.h"
173 ;; This library moved in Boost 1.66. Remove for Ledger
175 (("boost/uuid/sha1.hpp") "boost/uuid/detail/sha1.hpp"))
177 (add-before 'configure 'install-examples
178 (lambda* (#:key outputs #:allow-other-keys)
179 (let ((examples (string-append (assoc-ref outputs "out")
180 "/share/doc/ledger/examples")))
181 (install-file "test/input/sample.dat" examples)
182 (install-file "test/input/demo.ledger" examples))
184 (add-after 'build 'build-doc
185 (lambda _ (invoke "make" "doc")))
186 (add-before 'check 'check-setup
187 ;; One test fails if it can't set the timezone.
188 (lambda* (#:key inputs #:allow-other-keys)
190 (string-append (assoc-ref inputs "tzdata")
193 (replace 'check (assoc-ref gnu:%standard-phases 'check))
194 (add-after 'install 'relocate-elisp
195 (lambda* (#:key outputs #:allow-other-keys)
196 (let* ((site-dir (string-append (assoc-ref outputs "out")
197 "/share/emacs/site-lisp"))
198 (guix-dir (string-append site-dir "/guix.d"))
199 (orig-dir (string-append site-dir "/ledger-mode"))
200 (dest-dir (string-append guix-dir "/ledger-mode")))
202 (rename-file orig-dir dest-dir)
203 (emacs-generate-autoloads ,name dest-dir)))))))
213 `(("emacs" ,emacs-minimal)
215 ("texinfo" ,texinfo)))
216 (home-page "https://ledger-cli.org/")
217 (synopsis "Command-line double-entry accounting program")
219 "Ledger is a powerful, double-entry accounting system that is
220 accessed from the UNIX command-line. This may put off some users, since
221 there is no flashy UI, but for those who want unparalleled reporting
222 access to their data there are few alternatives.
224 Ledger uses text files for input. It reads the files and generates
225 reports; there is no other database or stored state. To use Ledger,
226 you create a file of your account names and transactions, run from the
227 command line with some options to specify input and requested reports, and
228 get output. The output is generally plain text, though you could generate
229 a graph or html instead. Ledger is simple in concept, surprisingly rich
230 in ability, and easy to use.")
231 ;; There are some extra licenses in files which do not presently get
232 ;; installed when you build this package. Different versions of the GPL
233 ;; are used in the contrib and python subdirectories. The bundled version
234 ;; of utfcpp is under the Boost 1.0 license. Also the file
235 ;; `tools/update_copyright_year` has an Expat license.
236 (license (list license:bsd-3
237 license:asl2.0 ; src/strptime.cc
238 (license:non-copyleft
239 "file://src/wcwidth.cc"
240 "See src/wcwidth.cc in the distribution.")
241 license:gpl2+)))) ; lisp/*
243 (define-public geierlein
250 (uri (string-append "https://github.com/stesie/geierlein"
251 "/archive/V" version ".tar.gz"))
252 (file-name (string-append name "-" version ".tar.gz"))
255 "11jfa7mxvvf0ldhx0hsvjbx3xwvzvn2wrfjpms8c7qmrnqhwh4wp"))))
256 (build-system gnu-build-system)
258 `(#:tests? #f ; would require npm, python and a lot more
260 (modify-phases %standard-phases
261 (delete 'configure) ; no configure script
262 (add-after 'unpack 'override-target-directory-and-tool-paths
263 (lambda* (#:key inputs outputs #:allow-other-keys)
264 (substitute* "Makefile"
266 (string-append "prefix := " (assoc-ref outputs "out") "\n"))
267 ;; Required for tests, unused for now:
269 ;; (string-append (which "python") "\n")))
271 (string-append "INSTALL := " (which "install") "\n")))
272 (substitute* "bin/xgeierlein.in"
273 ;; Use icecat as XULRUNNER
275 (string-append "XULRUNNER=" (which "icecat") "\n"
279 `(("icecat" ,icecat)))
280 (home-page "https://stesie.github.io/geierlein/")
281 (synopsis "Free Elster client, for sending Germany VAT declarations")
283 "Geierlein is a free Elster client, i.e. an application that
284 allows to send VAT declarations to Germany's fiscal authorities.
286 Currently it is *not* possible to send returns that are due annually
287 (especially the income tax return) since the fiscal authority doesn't
288 allow to do that off the ERiC library (which is proprietary however).
289 It's not clear at the moment whether one day it will be possible to
291 (license license:agpl3+)))
293 (define-public electrum
300 (uri (string-append "https://download.electrum.org/"
305 "1fxaxlf5vm2zydj678ls3pazyriym188iwzk60kyk26cz2p3xk39"))
306 (modules '((guix build utils)))
309 ;; Delete the bundled dependencies.
310 (delete-file-recursively "packages")
312 (build-system python-build-system)
314 `(("python-pyaes" ,python-pyaes)
315 ("python-pysocks" ,python-pysocks)
316 ("python-sip" ,python-sip)
317 ("python-pyqt" ,python-pyqt)
318 ("python-ecdsa" ,python-ecdsa)
319 ("python-pbkdf2" ,python-pbkdf2)
320 ("python-requests" ,python-requests)
321 ("python-qrcode" ,python-qrcode)
322 ("python-protobuf" ,python-protobuf)
323 ("python-dnspython" ,python-dnspython)
324 ("python-jsonrpclib-pelix" ,python-jsonrpclib-pelix)))
326 `(#:tests? #f ;; package doesn't have any tests
328 (modify-phases %standard-phases
329 (add-before 'build 'patch-home
330 (lambda* (#:key outputs #:allow-other-keys)
331 (substitute* "setup.py"
333 (string-append (assoc-ref outputs "out") "/local/share"))))))))
334 (home-page "https://electrum.org/")
335 (synopsis "Bitcoin wallet")
337 "Electrum is a lightweight Bitcoin client, based on a client-server
338 protocol. It supports Simple Payment Verification (SPV) and deterministic key
339 generation from a seed. Your secret keys are encrypted and are never sent to
340 other machines/servers. Electrum does not download the Bitcoin blockchain.")
341 (license license:expat)))
343 (define-public electron-cash
346 (name "electron-cash")
351 (uri (string-append "https://electroncash.org/downloads/"
353 "/win-linux/ElectronCash-"
358 "0ipl6vf2n9a5n556sx2z57s7wdvg05xwjvz67kff9nmbx4s8vjyf"))
359 (modules '((guix build utils)))
362 ;; Delete the bundled dependencies.
363 (delete-file-recursively "packages")
365 (home-page "https://electroncash.org/")
366 (synopsis "Bitcoin Cash wallet")
368 "Electroncash is a lightweight Bitcoin Cash client, based on a client-server
369 protocol. It supports Simple Payment Verification (SPV) and deterministic key
370 generation from a seed. Your secret keys are encrypted and are never sent to
371 other machines/servers. Electroncash does not download the Bitcoin Cash blockchain.")
372 (license license:expat)))
374 (define-public monero
375 ;; This package bundles easylogging++ and lmdb.
376 ;; The bundled easylogging++ is modified, and the changes will not be upstreamed.
377 ;; The devs deem the lmdb driver too critical a consenus component, to use
378 ;; the system's dynamically linked library.
386 (url "https://github.com/monero-project/monero")
387 (commit (string-append "v" version))))
388 (file-name (git-file-name name version))
389 (patches (search-patches "monero-use-system-miniupnpc.patch"))
392 "14db9kgjm2ha93c2x5fjdw01xaqshn756qr3x2cnzyyjh7caz5qd"))))
393 (build-system cmake-build-system)
395 `(("doxygen" ,doxygen)
396 ("googletest" ,googletest)
397 ("graphviz" ,graphviz)
398 ("pkg-config" ,pkg-config)))
405 ("libsodium" ,libsodium)
406 ("libunwind" ,libunwind)
408 ("miniupnpc" ,monero-miniupnpc)
410 ("rapidjson" ,rapidjson)
411 ("unbound" ,unbound)))
413 `(#:out-of-source? #t
414 #:build-type "release"
415 #:configure-flags '("-DBUILD_TESTS=ON"
416 ,@(if (string=? "aarch64-linux" (%current-system))
419 "-DBUILD_GUI_DEPS=ON")
421 (modify-phases %standard-phases
422 ;; tests/core_tests need a valid HOME
423 (add-before 'configure 'set-home
425 (setenv "HOME" (getcwd))
427 (add-after 'set-home 'fix-wallet-path-for-unit-tests
429 (substitute* "tests/unit_tests/serialization.cpp"
430 (("\\.\\./\\.\\./\\.\\./\\.\\./") "../../"))
432 (add-after 'fix-wallet-path-for-unit-tests 'change-log-path
434 (substitute* "contrib/epee/src/mlog.cpp"
435 (("epee::string_tools::get_current_module_folder\\(\\)")
437 (substitute* "contrib/epee/src/mlog.cpp"
438 (("return \\(") "return ((std::string(getenv(\"HOME\"))) / "))
442 (invoke "make" "ARGS=-E 'unit_tests|libwallet_api_tests'"
444 ;; The excluded unit tests need network access
445 (add-after 'check 'unit-tests
447 (let ((excluded-unit-tests
449 '("AddressFromURL.Success"
450 "AddressFromURL.Failure"
451 "DNSResolver.IPv4Success"
452 "DNSResolver.DNSSECSuccess"
453 "DNSResolver.DNSSECFailure"
454 "DNSResolver.GetTXTRecord")
456 (invoke "tests/unit_tests/unit_tests"
457 (string-append "--gtest_filter=-"
458 excluded-unit-tests)))))
459 (add-after 'install 'install-blockchain-import-export
460 (lambda* (#:key outputs #:allow-other-keys)
461 (let* ((out (assoc-ref outputs "out"))
462 (bin (string-append out "/bin")))
463 (install-file "bin/monero-blockchain-import" bin)
464 (install-file "bin/monero-blockchain-export" bin)))))))
465 (home-page "https://getmonero.org/")
466 (synopsis "Command-line interface to the Monero currency")
468 "Monero is a secure, private, untraceable currency. This package provides the
469 Monero command line client and daemon.")
470 (license license:bsd-3)))
472 (define-public monero-gui
480 (url "https://github.com/monero-project/monero-gui")
481 (commit (string-append "v" version))))
482 (file-name (git-file-name name version))
485 "1cnrkwh7kp64lnzz1xfmkf1mhsgm5gls292gpqai3jr8jydpkahl"))))
486 (build-system gnu-build-system)
488 `(("doxygen" ,doxygen)
489 ("graphviz" ,graphviz)
490 ("pkg-config" ,pkg-config)
491 ("qttools" ,qttools)))
494 ("libunwind" ,libunwind)
497 ("qtdeclarative" ,qtdeclarative)
498 ("qtgraphicaleffects" ,qtgraphicaleffects)
499 ("qtquickcontrols" ,qtquickcontrols)
500 ("readline" ,readline)
501 ("unbound" ,unbound)))
503 `(("monero" ,monero)))
506 (modify-phases %standard-phases
509 (add-before 'build 'fix-makefile-vars
511 (substitute* "src/zxcvbn-c/makefile"
514 (add-after 'fix-makefile-vars 'fix-library-paths
515 (lambda* (#:key inputs #:allow-other-keys)
516 (substitute* "monero-wallet-gui.pro"
517 (("-L/usr/local/lib") "")
518 (("-L/usr/local/opt/openssl/lib")
520 (assoc-ref inputs "openssl")
522 (("-L/usr/local/opt/boost/lib")
524 (assoc-ref inputs "boost")
527 (add-after 'fix-library-paths 'fix-monerod-path
528 (lambda* (#:key inputs #:allow-other-keys)
529 (substitute* "src/daemon/DaemonManager.cpp"
530 (("QApplication::applicationDirPath\\(\\) \\+ \"/monerod")
531 (string-append "\""(assoc-ref inputs "monero")
534 (add-after 'fix-monerod-path 'fix-qt-paths
535 (lambda* (#:key inputs #:allow-other-keys)
536 (let* ((qttools (assoc-ref inputs "qttools"))
537 (lrelease (string-append qttools "/bin/lrelease"))
538 (lupdate (string-append qttools "/bin/lupdate")))
539 (substitute* "monero-wallet-gui.pro"
540 (("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease") lrelease)
541 (("\\$\\$\\[QT_INSTALL_BINS\\]/lupdate") lupdate))
545 (invoke "./build.sh")))
546 (add-after 'build 'fix-install-path
547 (lambda* (#:key outputs #:allow-other-keys)
548 (substitute* "build/Makefile"
549 (("/opt/monero-wallet-gui")
550 (assoc-ref outputs "out")))
552 (add-before 'install 'change-dir
555 (add-after 'install 'wrap-executable
556 (lambda* (#:key inputs outputs #:allow-other-keys)
557 (let ((out (assoc-ref outputs "out")))
558 (wrap-program (string-append out "/bin/monero-wallet-gui")
559 `("QT_PLUGIN_PATH" ":" prefix
560 ,(map (lambda (label)
561 (string-append (assoc-ref inputs label)
563 '("qtbase" "qtdeclarative")))
564 `("QML2_IMPORT_PATH" ":" prefix
565 ,(map (lambda (label)
566 (string-append (assoc-ref inputs label)
568 '("qtdeclarative" "qtgraphicaleffects"
569 "qtquickcontrols"))))
571 (home-page "https://getmonero.org/")
572 (synopsis "Graphical user interface for the Monero currency")
574 "Monero is a secure, private, untraceable currency. This package provides the
576 (license license:bsd-3)))
578 (define-public monero-core
579 (deprecated-package "monero-core" monero-gui))
581 (define-public python-trezor-agent
583 (name "python-trezor-agent")
588 (uri (string-append "https://github.com/romanz/trezor-agent/archive/v"
590 (file-name (string-append name "-" version ".tar.gz"))
593 "0h8jb147vpjk7mqbl4za0xdh7lblhx07n9dfk80kn2plwnvrry1x"))))
594 (build-system python-build-system)
597 (modify-phases %standard-phases
599 (add-after 'install 'check
600 (lambda* (#:key outputs inputs #:allow-other-keys)
601 ;; Make installed package available for running the tests
602 (add-installed-pythonpath inputs outputs)
603 (invoke "py.test"))))))
605 `(("python-ecdsa" ,python-ecdsa)
606 ("python-ed25519" ,python-ed25519)
607 ("python-semver" ,python-semver)
608 ("python-unidecode" ,python-unidecode)))
610 `(("python-mock" ,python-mock)
611 ("python-pytest" ,python-pytest)))
612 (home-page "https://github.com/romanz/trezor-agent")
613 (synopsis "TREZOR SSH and GPG host support")
615 "@code{libagent} is a library that allows using TREZOR, Keepkey and
616 Ledger Nano as a hardware SSH/GPG agent.")
617 (license license:lgpl3)))
619 (define-public python2-trezor-agent
620 (package-with-python2 python-trezor-agent))
622 (define-public python-mnemonic
624 (name "python-mnemonic")
629 (uri (pypi-uri "mnemonic" version))
632 "07bzfa5di6nv5xwwcwbypnflpj50wlfczhh6q6hg8w13g5m319q2"))))
633 (build-system python-build-system)
635 `(("python-pbkdf2" ,python-pbkdf2)))
636 (home-page "https://github.com/trezor/python-mnemonic")
637 (synopsis "Implementation of Bitcoin BIP-0039")
638 (description "@code{mnemonic} is a library that provides an implementation
639 of Bitcoin BIP-0039.")
640 (license license:expat)))
642 (define-public python2-mnemonic
643 (package-with-python2 python-mnemonic))
645 (define-public python-ledgerblue
647 (name "python-ledgerblue")
652 (uri (pypi-uri "ledgerblue" version))
655 "010mghaqh1cmz3a0ifc3f40mmyplilwlw7kpha2mzyrrff46p9gb"))))
656 (build-system python-build-system)
658 `(("python-ecpy" ,python-ecpy)
659 ("python-future" ,python-future)
660 ("python-hidapi" ,python-hidapi)
661 ("python-pillow" ,python-pillow)
662 ("python-protobuf" ,python-protobuf)
663 ("python-pycrypto" ,python-pycrypto)))
664 (home-page "https://github.com/LedgerHQ/blue-loader-python")
665 (synopsis "Python library to communicate with Ledger Blue/Nano S")
666 (description "@code{ledgerblue} is a Python library to communicate with
667 Ledger Blue/Nano S.")
668 (license license:asl2.0)))
670 (define-public python2-ledgerblue
671 (package-with-python2 python-ledgerblue))
673 (define-public python-trezor
675 (name "python-trezor")
680 (uri (pypi-uri "trezor" version))
683 "138k6zsqqpb46k3rcpyslm9q7yq5i6k4myvr9n425jnkadf4vfjd"))))
684 (build-system python-build-system)
687 (modify-phases %standard-phases
688 ;; Default tests run device-specific tests which fail, only run specific tests.
690 (lambda* (#:key inputs outputs #:allow-other-keys)
691 (invoke "python" "-m" "pytest" "--pyarg" "trezorlib.tests.unit_tests")
692 (invoke "python" "-m" "pytest" "-m" "slow_cosi" "--pyarg" "trezorlib.tests.unit_tests")
695 `(("python-click" ,python-click)
696 ("python-ecdsa" ,python-ecdsa)
697 ("python-hidapi" ,python-hidapi)
698 ("python-libusb1" ,python-libusb1)
699 ("python-mnemonic" ,python-mnemonic)
700 ("python-protobuf" ,python-protobuf)
701 ("python-pyblake2" ,python-pyblake2)
702 ("python-requests" ,python-requests)
703 ("python-typing" ,python-typing)))
705 `(("python-mock" ,python-mock) ; Tests
706 ("python-pyqt" ,python-pyqt) ; Tests
707 ("python-pytest" ,python-pytest))) ; Tests
708 (home-page "https://github.com/trezor/python-trezor")
709 (synopsis "Python library for communicating with TREZOR Hardware Wallet")
710 (description "@code{trezor} is a Python library for communicating with
711 TREZOR Hardware Wallet.")
712 (license license:lgpl3)))
714 (define-public python2-trezor
715 (package-with-python2 python-trezor))
717 (define-public python-keepkey
719 (name "python-keepkey")
724 (uri (pypi-uri "keepkey" version))
727 "0f4iqqjlqmamw4mhyhik4qlb5bnfd10wbjw9yzgir105wh5fdpnd"))))
728 (build-system python-build-system)
731 (modify-phases %standard-phases
733 (add-after 'install 'check
734 (lambda* (#:key inputs outputs #:allow-other-keys)
735 (add-installed-pythonpath inputs outputs)
736 (apply invoke "python" (find-files "tests/unit" "\\.py$")))))))
738 `(("python-ecdsa" ,python-ecdsa)
739 ("python-hidapi" ,python-hidapi)
740 ("python-mnemonic" ,python-mnemonic)
741 ("python-protobuf" ,python-protobuf)))
742 (home-page "https://github.com/keepkey/python-keepkey")
743 (synopsis "Python library for communicating with KeepKey Hardware Wallet")
744 (description "@code{keepkey} is a Python library for communicating with
745 the KeepKey Hardware Wallet.")
746 (license license:lgpl3)))
748 (define-public python2-keepkey
749 (package-with-python2 python-keepkey))
751 (define-public ledger-agent
753 (name "ledger-agent")
758 (uri (pypi-uri "ledger_agent" version))
761 "03zj602m2rln9yvr08dswy56vzkbldp8b074ixwzz525dafblr92"))))
762 (build-system python-build-system)
764 `(("python-ledgerblue" ,python-ledgerblue)
765 ("python-trezor-agent" ,python-trezor-agent)))
766 (home-page "http://github.com/romanz/trezor-agent")
767 (synopsis "Ledger as hardware SSH/GPG agent")
768 (description "This package allows using Ledger as hardware SSH/GPG agent.
770 Usage for SSH: trezor-agent foo@@example.com --connect
771 Usage for GPG: Initialize using trezor-gpg init \"Foo <foo@@example.com>\"
772 Then set the environment variable GNUPGHOME to
773 \"${HOME}/.gnupg/trezor\".")
774 (license license:lgpl3)))
776 (define-public trezor-agent
778 (name "trezor-agent")
783 (uri (pypi-uri "trezor_agent" version))
786 "1i5cdamlf3c0ym600pjklij74p8ifj9cv7xrpnrfl1b8nkadswbz"))))
787 (build-system python-build-system)
789 `(("python-trezor" ,python-trezor)
790 ("python-trezor-agent" ,python-trezor-agent)))
791 (home-page "http://github.com/romanz/trezor-agent")
792 (synopsis "Using Trezor as hardware SSH/GPG agent")
793 (description "This package allows using Trezor as a hardware SSH/GPG
795 (license license:lgpl3)))
797 (define-public keepkey-agent
799 (name "keepkey-agent")
804 (uri (pypi-uri "keepkey_agent" version))
807 "03779gvlx70i0nnry98i4pl1d92604ix5x6jgdfkrdgzqbh5vj27"))))
808 (build-system python-build-system)
810 `(("python-keepkey" ,python-keepkey)
811 ("python-trezor-agent" ,python-trezor-agent)))
812 (home-page "http://github.com/romanz/trezor-agent")
813 (synopsis "KeepKey as hardware SSH/GPG agent")
814 (description "This package allows using KeepKey as a hardware SSH/GPG
816 (license license:lgpl3)))
818 (define-public python-stdnum
820 (name "python-stdnum")
825 (uri (pypi-uri "python-stdnum" version))
828 "0hvr47q32xbyiznpmbg4r8rcvxhnf0lwf33hcpnynyik57djy5np"))))
829 (build-system python-build-system)
831 "https://arthurdejong.org/python-stdnum/")
833 "Python module to handle standardized number and code formats")
835 "This is a Python library that aims to provide functions to handle,
836 parse and validate standard numbers.
837 The module supports more than 100 different number formats
838 amongst which a great number of VAT and other tax numbers,
839 personal identity and company identification codes,
840 international standard numbers (ISBN, IBAN, EAN, etc.)
841 and various other formats.
842 The module also inclused implementations of the Verhoeff,
843 Luhn and family of ISO/IEC 7064 check digit algorithms. ")
844 (license license:lgpl2.1+)))
846 (define-public python2-stdnum
847 (package-with-python2 python-stdnum))
849 (define-public python-duniterpy
851 (name "python-duniterpy")
856 ;; Pypi's default URI is missing "requirements.txt" file.
858 (url "https://git.duniter.org/clients/python/duniterpy.git")
860 (file-name (git-file-name name version))
863 "074mh2kh3s00ib0h99050ss3j4c51v57py6dzm7crida6l0iydbv"))))
864 (build-system python-build-system)
866 ;; Tests fail with "AttributeError: module 'attr' has no attribute 's'".
869 (modify-phases %standard-phases
870 (add-after 'build 'build-documentation
872 (invoke "make" "docs")))
873 (add-after 'build-documentation 'install-documentation
874 (lambda* (#:key inputs outputs #:allow-other-keys)
875 (let* ((out (assoc-ref outputs "out"))
876 (doc (string-append out "/share/doc/" ,name)))
878 (copy-recursively "docs/_build/html" doc))
881 `(("python-sphinx" ,python-sphinx)
882 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
884 `(("python-aiohttp" ,python-aiohttp)
885 ("python-attr" ,python-attr)
886 ("python-base58" ,python-base58)
887 ("python-jsonschema" ,python-jsonschema)
888 ("python-libnacl" ,python-libnacl)
889 ("python-pylibscrypt" ,python-pylibscrypt)
890 ("python-pypeg2" ,python-pypeg2)))
891 (home-page "https://git.duniter.org/clients/python/duniterpy")
892 (synopsis "Python implementation of Duniter API")
893 (description "@code{duniterpy} is an implementation of
894 @uref{https://github.com/duniter/duniter/, duniter} API. Its
897 @item Support Duniter's Basic Merkle API and protocol
898 @item Asynchronous/synchronous without threads
899 @item Support HTTP, HTTPS and Web Socket transport for Basic Merkle API
900 @item Support Elasticsearch Duniter4j API
901 @item Duniter signing key
902 @item Sign/verify and encrypt/decrypt messages with the Duniter credentials
904 (license license:gpl3+)))
906 (define-public silkaj
914 (url "https://git.duniter.org/clients/python/silkaj.git")
915 (commit (string-append "v" version))))
916 (file-name (git-file-name name version))
919 "0a99gbgdd7m9wisqhqpfyaim0rlv9gkp8gmrppkagqf6j0683igh"))))
920 (build-system python-build-system)
922 `(#:tests? #f)) ;no test
924 `(("python-commandlines" ,python-commandlines)
925 ("python-ipaddress" ,python-ipaddress)
926 ("python-pyaes" ,python-pyaes)
927 ("python-pynacl" ,python-pynacl)
928 ("python-scrypt" ,python-scrypt)
929 ("python-tabulate" ,python-tabulate)))
930 (home-page "https://silkaj.duniter.org/")
931 (synopsis "Command line client for Duniter network")
932 (description "@code{Silkaj} is a command line client for the
933 @uref{https://github.com/duniter/duniter/, Duniter} network.
937 @item information about currency,
938 @item issuers difficulty to generate next block,
939 @item network view of nodes,
940 @item list of last issuers,
941 @item send transactions,
942 @item get account amount.
944 (license license:agpl3+)))