gnu: Use invoke and return #t from all builders.
[jackhill/guix/guix.git] / gnu / packages / finance.scm
CommitLineData
20c6b9da 1;;; GNU Guix --- Functional package management for GNU
fe7fa353 2;;; Copyright © 2015, 2016 Andreas Enge <andreas@enge.fr>
fa7647c6 3;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
d3699b31 4;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
cb0866c3 5;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
9475fd92 6;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
8514662b 7;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
14e09e90 8;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com>
1c21e734 9;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
5424f9bc 10;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
3da86c52 11;;; Copyright © 2018 Adriano Peluso <catonano@gmail.com>
20c6b9da
AE
12;;;
13;;; This file is part of GNU Guix.
14;;;
15;;; GNU Guix is free software; you can redistribute it and/or modify it
16;;; under the terms of the GNU General Public License as published by
17;;; the Free Software Foundation; either version 3 of the License, or (at
18;;; your option) any later version.
19;;;
20;;; GNU Guix is distributed in the hope that it will be useful, but
21;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23;;; GNU General Public License for more details.
24;;;
25;;; You should have received a copy of the GNU General Public License
26;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28(define-module (gnu packages finance)
fa4f95a7
CB
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
31 #:use-module (guix download)
32 #:use-module (guix build-system gnu)
33 #:use-module (guix build-system cmake)
34 #:use-module (guix build-system python)
5424f9bc 35 #:use-module (gnu packages)
fa4f95a7
CB
36 #:use-module (gnu packages base)
37 #:use-module (gnu packages boost)
38 #:use-module (gnu packages check)
39 #:use-module (gnu packages databases)
40 #:use-module (gnu packages documentation)
41 #:use-module (gnu packages dns)
42 #:use-module (gnu packages emacs)
43 #:use-module (gnu packages graphviz)
44 #:use-module (gnu packages groff)
45 #:use-module (gnu packages libedit)
46 #:use-module (gnu packages libevent)
47 #:use-module (gnu packages libunwind)
96f5e2e9 48 #:use-module (gnu packages libusb)
fa4f95a7
CB
49 #:use-module (gnu packages linux)
50 #:use-module (gnu packages multiprecision)
51 #:use-module (gnu packages pkg-config)
52 #:use-module (gnu packages protobuf)
53 #:use-module (gnu packages python)
cc6f4912 54 #:use-module (gnu packages python-crypto)
589e3f4e 55 #:use-module (gnu packages python-web)
fa4f95a7 56 #:use-module (gnu packages qt)
1d0865c1 57 #:use-module (gnu packages readline)
fa4f95a7
CB
58 #:use-module (gnu packages texinfo)
59 #:use-module (gnu packages textutils)
60 #:use-module (gnu packages tls)
61 #:use-module (gnu packages upnp)
62 #:use-module (gnu packages web)
63 #:use-module (gnu packages xml)
64 #:use-module (gnu packages gnuzilla))
20c6b9da
AE
65
66(define-public bitcoin-core
67 (package
68 (name "bitcoin-core")
0632c6a8 69 (version "0.15.1")
20c6b9da
AE
70 (source (origin
71 (method url-fetch)
72 (uri
73 (string-append "https://bitcoin.org/bin/bitcoin-core-"
14ea30e4 74 version "/bitcoin-" version ".tar.gz"))
20c6b9da
AE
75 (sha256
76 (base32
0632c6a8 77 "1d22fgwdcn343kd95lh389hj417zwbmnhi29cij8n7wc0nz2vpil"))))
20c6b9da
AE
78 (build-system gnu-build-system)
79 (native-inputs
80 `(("pkg-config" ,pkg-config)
e49e74f5 81 ("python" ,python) ; for the tests
0193812a
MB
82 ("util-linux" ,util-linux) ; provides the hexdump command for tests
83 ("qttools" ,qttools)))
20c6b9da 84 (inputs
fe7fa353 85 `(("bdb" ,bdb-5.3) ; with 6.2.23, there is an error: ambiguous overload
20c6b9da 86 ("boost" ,boost)
14ea30e4 87 ("libevent" ,libevent)
20c6b9da
AE
88 ("miniupnpc" ,miniupnpc)
89 ("openssl" ,openssl)
90 ("protobuf" ,protobuf)
0193812a 91 ("qtbase" ,qtbase)))
20c6b9da
AE
92 (arguments
93 `(#:configure-flags
94 (list
95 ;; We use a bdb version newer than 4.8.
96 "--with-incompatible-bdb"
97 ;; Boost is not found unless specified manually.
98 (string-append "--with-boost="
0193812a
MB
99 (assoc-ref %build-inputs "boost"))
100 ;; XXX: The configure script looks up Qt paths by
101 ;; `pkg-config --variable=host_bins Qt5Core`, which fails to pick
102 ;; up executables residing in 'qttools', so we specify them here.
103 (string-append "ac_cv_path_LRELEASE="
104 (assoc-ref %build-inputs "qttools")
105 "/bin/lrelease")
106 (string-append "ac_cv_path_LUPDATE="
107 (assoc-ref %build-inputs "qttools")
108 "/bin/lupdate"))
20c6b9da
AE
109 #:phases
110 (modify-phases %standard-phases
111 (add-before 'check 'set-home
112 (lambda _
113 (setenv "HOME" (getenv "TMPDIR"))))))) ; Tests write to $HOME.
114 (home-page "https://bitcoin.org/en/")
115 (synopsis "Bitcoin peer-to-peer client")
116 (description
117 "Bitcoin is a digital currency that enables instant payments to anyone
118anywhere in the world. It uses peer-to-peer technology to operate without
119central authority: managing transactions and issuing money are carried out
120collectively by the network. Bitcoin Core is the reference implementation
121of the bitcoin protocol. This package provides the Bitcoin Core command
122line client and a client based on Qt.")
123 (license license:expat)))
d3699b31
AG
124
125(define-public ledger
126 (package
127 (name "ledger")
128 (version "3.1.1")
129 (source (origin
130 (method url-fetch)
131 (uri (string-append
132 "https://github.com/ledger/ledger/archive/v"
133 version ".tar.gz"))
134 (file-name (string-append name "-" version ".tar.gz"))
135 (sha256
136 (base32
5424f9bc
EB
137 "12jlv3gsjhrja25q9hrwh73cdacd2l3c2yyn8qnijav9mdhnbw4h"))
138 (patches (search-patches "ledger-revert-boost-python-fix.patch"
139 "ledger-fix-uninitialized.patch"))))
d3699b31
AG
140 (build-system cmake-build-system)
141 (arguments
142 `(#:modules ((guix build cmake-build-system)
143 (guix build utils)
144 (guix build emacs-utils))
145 #:imported-modules (,@%cmake-build-system-modules
146 (guix build emacs-utils))
147 #:configure-flags
148 `("-DBUILD_DOCS:BOOL=ON"
149 "-DBUILD_WEB_DOCS:BOOL=ON"
150 "-DBUILD_EMACSLISP:BOOL=ON"
151 "-DUSE_PYTHON:BOOL=ON"
152 "-DCMAKE_INSTALL_LIBDIR:PATH=lib"
153 ,(string-append "-DUTFCPP_INCLUDE_DIR:PATH="
154 (assoc-ref %build-inputs "utfcpp")
155 "/include"))
156 #:phases
157 (modify-phases %standard-phases
158 (add-before 'configure 'install-examples
159 (lambda* (#:key outputs #:allow-other-keys)
160 (let ((examples (string-append (assoc-ref outputs "out")
161 "/share/doc/ledger/examples")))
162 (install-file "test/input/sample.dat" examples)
163 (install-file "test/input/demo.ledger" examples))
164 #t))
165 (add-after 'build 'build-doc
166 (lambda _ (zero? (system* "make" "doc"))))
167 (add-before 'check 'check-setup
168 ;; One test fails if it can't set the timezone.
169 (lambda* (#:key inputs #:allow-other-keys)
170 (setenv "TZDIR"
171 (string-append (assoc-ref inputs "tzdata")
172 "/share/zoneinfo"))
173 #t))
174 (add-after 'install 'relocate-elisp
175 (lambda* (#:key outputs #:allow-other-keys)
176 (let* ((site-dir (string-append (assoc-ref outputs "out")
177 "/share/emacs/site-lisp"))
178 (guix-dir (string-append site-dir "/guix.d"))
179 (orig-dir (string-append site-dir "/ledger-mode"))
180 (dest-dir (string-append guix-dir "/ledger-mode")))
181 (mkdir-p guix-dir)
182 (rename-file orig-dir dest-dir)
183 (emacs-generate-autoloads ,name dest-dir))
184 #t)))))
185 (inputs
186 `(("boost" ,boost)
187 ("gmp" ,gmp)
188 ("libedit" ,libedit)
189 ("mpfr" ,mpfr)
190 ("python" ,python-2)
191 ("tzdata" ,tzdata)
192 ("utfcpp" ,utfcpp)))
193 (native-inputs
b8fc3622 194 `(("emacs" ,emacs-minimal)
d3699b31
AG
195 ("groff" ,groff)
196 ("texinfo" ,texinfo)))
197 (home-page "http://ledger-cli.org/")
198 (synopsis "Command-line double-entry accounting program")
199 (description
200 "Ledger is a powerful, double-entry accounting system that is
201accessed from the UNIX command-line. This may put off some users, since
202there is no flashy UI, but for those who want unparalleled reporting
203access to their data there are few alternatives.
204
205Ledger uses text files for input. It reads the files and generates
206reports; there is no other database or stored state. To use Ledger,
207you create a file of your account names and transactions, run from the
208command line with some options to specify input and requested reports, and
209get output. The output is generally plain text, though you could generate
210a graph or html instead. Ledger is simple in concept, surprisingly rich
211in ability, and easy to use.")
212 ;; There are some extra licenses in files which do not presently get
213 ;; installed when you build this package. Different versions of the GPL
214 ;; are used in the contrib and python subdirectories. The bundled version
215 ;; of utfcpp is under the Boost 1.0 license. Also the file
216 ;; `tools/update_copyright_year` has an Expat license.
217 (license (list license:bsd-3
218 license:asl2.0 ; src/strptime.cc
219 (license:non-copyleft
220 "file://src/wcwidth.cc"
221 "See src/wcwidth.cc in the distribution.")
222 license:gpl2+)))) ; lisp/*
cb0866c3
HG
223
224(define-public geierlein
225 (package
226 (name "geierlein")
1c21e734 227 (version "0.9.13")
cb0866c3
HG
228 (source
229 (origin
230 (method url-fetch)
231 (uri (string-append "https://github.com/stesie/geierlein"
232 "/archive/V" version ".tar.gz"))
233 (file-name (string-append name "-" version ".tar.gz"))
234 (sha256
235 (base32
1c21e734 236 "11jfa7mxvvf0ldhx0hsvjbx3xwvzvn2wrfjpms8c7qmrnqhwh4wp"))))
cb0866c3
HG
237 (build-system gnu-build-system)
238 (arguments
239 `(#:tests? #f ; would require npm, python and a lot more
240 #:phases
241 (modify-phases %standard-phases
1c21e734 242 (delete 'configure) ; no configure script
cb0866c3
HG
243 (add-after 'unpack 'override-target-directory-and-tool-paths
244 (lambda* (#:key inputs outputs #:allow-other-keys)
245 (substitute* "Makefile"
246 (("prefix := .*")
247 (string-append "prefix := " (assoc-ref outputs "out") "\n"))
248 ;; Required for tests, unused for now:
249 ;;(("PYTHON := .*")
250 ;; (string-append (which "python") "\n")))
251 (("INSTALL := .*")
252 (string-append "INSTALL := " (which "install") "\n")))
253 (substitute* "bin/xgeierlein.in"
254 ;; Use icecat as XULRUNNER
255 (("^for search ")
256 (string-append "XULRUNNER=" (which "icecat") "\n"
257 "for search ")))
258 #t)))))
259 (inputs
260 `(("icecat" ,icecat)))
1e41bb1b 261 (home-page "https://stesie.github.io/geierlein/")
cb0866c3
HG
262 (synopsis "Free Elster client, for sending Germany VAT declarations")
263 (description
264 "Geierlein is a free Elster client, i.e. an application that
265allows to send VAT declarations to Germany's fiscal authorities.
266
267Currently it is *not* possible to send returns that are due annually
268(especially the income tax return) since the fiscal authority doesn't
269allow to do that off the ERiC library (which is proprietary however).
270It's not clear at the moment whether one day it will be possible to
271do so.")
272 (license license:agpl3+)))
9475fd92
CZ
273
274(define-public electrum
275 (package
276 (name "electrum")
68aa384b 277 (version "3.0.5")
9475fd92
CZ
278 (source
279 (origin
280 (method url-fetch)
281 (uri (string-append "https://download.electrum.org/"
282 version "/Electrum-"
283 version ".tar.gz"))
284 (sha256
285 (base32
68aa384b 286 "06z0a5p1jg93jialphslip8d72q9yg3651qqaf494gs3h9kw1sv1"))
9475fd92
CZ
287 (modules '((guix build utils)))
288 (snippet
289 '(begin
290 ;; Delete the bundled dependencies.
291 (delete-file-recursively "packages")
292 #t))))
293 (build-system python-build-system)
294 (inputs
47bd32d9
CZ
295 `(("python-pyaes" ,python-pyaes)
296 ("python-pysocks" ,python-pysocks)
297 ("python-sip" ,python-sip)
298 ("python-pyqt" ,python-pyqt)
299 ("python-ecdsa" ,python-ecdsa)
300 ("python-pbkdf2" ,python-pbkdf2)
301 ("python-requests" ,python-requests)
302 ("python-qrcode" ,python-qrcode)
303 ("python-protobuf" ,python-protobuf)
304 ("python-dnspython" ,python-dnspython)
305 ("python-jsonrpclib-pelix" ,python-jsonrpclib-pelix)))
9475fd92 306 (arguments
47bd32d9 307 `(#:tests? #f ;; package doesn't have any tests
9475fd92
CZ
308 #:phases
309 (modify-phases %standard-phases
310 (add-before 'build 'patch-home
311 (lambda* (#:key outputs #:allow-other-keys)
312 (substitute* "setup.py"
313 (("~/.local/share")
314 (string-append (assoc-ref outputs "out") "/local/share"))))))))
315 (home-page "https://electrum.org/")
316 (synopsis "Bitcoin wallet")
317 (description
318 "Electrum is a lightweight Bitcoin client, based on a client-server
319protocol. It supports Simple Payment Verification (SPV) and deterministic key
320generation from a seed. Your secret keys are encrypted and are never sent to
321other machines/servers. Electrum does not download the Bitcoin blockchain.")
322 (license license:expat)))
8514662b
TF
323
324(define-public monero
325 ;; This package bundles easylogging++ and lmdb.
326 ;; The bundled easylogging++ is modified, and the changes will not be upstreamed.
327 ;; The devs deem the lmdb driver too critical a consenus component, to use
328 ;; the system's dynamically linked library.
329 (package
330 (name "monero")
14e09e90 331 (version "0.11.1.0")
8514662b
TF
332 (source
333 (origin
334 (method url-fetch)
335 (uri (string-append "https://github.com/monero-project/monero/archive/v"
336 version ".tar.gz"))
337 (file-name (string-append name "-" version ".tar.gz"))
338 (modules '((guix build utils)))
339 (snippet
340 '(begin
341 ;; Delete bundled dependencies.
342 (for-each
343 delete-file-recursively
344 '("external/miniupnpc" "external/rapidjson"
345 "external/unbound"))
346 #t))
347 (sha256
348 (base32
14e09e90 349 "16shd834025jyzy68h3gag1sz8vbk875hy4j97hrki8pacz8vd5m"))))
8514662b
TF
350 (build-system cmake-build-system)
351 (native-inputs
352 `(("doxygen" ,doxygen)
353 ("googletest" ,googletest)
354 ("graphviz" ,graphviz)
355 ("pkg-config" ,pkg-config)))
356 (inputs
357 `(("bind" ,isc-bind)
358 ("boost" ,boost)
359 ("expat" ,expat)
360 ("libunwind" ,libunwind)
361 ("lmdb" ,lmdb)
362 ("miniupnpc" ,miniupnpc)
363 ("openssl" ,openssl)
364 ("rapidjson" ,rapidjson)
365 ("unbound" ,unbound)))
366 (arguments
367 `(#:out-of-source? #t
368 #:configure-flags '("-DBUILD_TESTS=ON"
fa7647c6
EF
369 ,@(if (string=? "aarch64-linux" (%current-system))
370 '("-DARCH=armv8-a")
371 '())
8514662b
TF
372 "-DBUILD_GUI_DEPS=ON")
373 #:phases
374 (modify-phases %standard-phases
375 ;; tests/core_tests need a valid HOME
376 (add-before 'configure 'set-home
377 (lambda _
378 (setenv "HOME" (getcwd))
379 #t))
380 (add-after 'set-home 'fix-wallet-path-for-unit-tests
381 (lambda _
382 (substitute* "tests/unit_tests/serialization.cpp"
383 (("\\.\\./\\.\\./\\.\\./\\.\\./") "../../"))
384 #t))
385 (add-after 'fix-wallet-path-for-unit-tests 'change-log-path
386 (lambda _
387 (substitute* "contrib/epee/src/mlog.cpp"
388 (("epee::string_tools::get_current_module_folder\\(\\)")
389 "\".bitmonero\""))
390 (substitute* "contrib/epee/src/mlog.cpp"
391 (("return \\(") "return ((std::string(getenv(\"HOME\"))) / "))
392 #t))
393 (replace 'check
394 (lambda _
395 (zero?
396 (system* "make" "ARGS=-E 'unit_tests|libwallet_api_tests'"
397 "test"))))
398 ;; The excluded unit tests need network access
399 (add-after 'check 'unit-tests
400 (lambda _
401 (let ((excluded-unit-tests
402 (string-join
403 '("AddressFromURL.Success"
404 "AddressFromURL.Failure"
405 "DNSResolver.IPv4Success"
406 "DNSResolver.DNSSECSuccess"
407 "DNSResolver.DNSSECFailure"
408 "DNSResolver.GetTXTRecord")
409 ":")))
410 (zero?
411 (system* "tests/unit_tests/unit_tests"
412 (string-append "--gtest_filter=-"
413 excluded-unit-tests))))))
414 (add-after 'install 'install-blockchain-import-export
415 (lambda* (#:key outputs #:allow-other-keys)
416 (let* ((out (assoc-ref outputs "out"))
417 (bin (string-append out "/bin")))
418 (install-file "bin/monero-blockchain-import" bin)
419 (install-file "bin/monero-blockchain-export" bin)))))))
420 (home-page "https://getmonero.org/")
421 (synopsis "Command-line interface to the Monero currency")
422 (description
423 "Monero is a secure, private, untraceable currency. This package provides the
424Monero command line client and daemon.")
425 (license license:bsd-3)))
79228a52
TF
426
427(define-public monero-core
428 (package
429 (name "monero-core")
12a130b0 430 (version "0.11.1.0")
79228a52
TF
431 (source
432 (origin
433 (method url-fetch)
434 (uri (string-append "https://github.com/monero-project/monero-core/archive/v"
435 version ".tar.gz"))
436 (file-name (string-append name "-" version ".tar.gz"))
437 (sha256
438 (base32
12a130b0 439 "1q7a9kpcjgp74fbplzs2iszdld6gwbfrydyd9in9izhwp100p1rr"))))
79228a52
TF
440 (build-system gnu-build-system)
441 (native-inputs
442 `(("doxygen" ,doxygen)
443 ("graphviz" ,graphviz)
444 ("pkg-config" ,pkg-config)))
445 (inputs
446 `(("boost" ,boost)
447 ("libunwind" ,libunwind)
448 ("openssl" ,openssl)
449 ("qt" ,qt)
1d0865c1 450 ("readline" ,readline)
79228a52
TF
451 ("unbound" ,unbound)))
452 (propagated-inputs
453 `(("monero" ,monero)))
454 (arguments
455 `(#:phases
456 (modify-phases %standard-phases
457 (delete 'configure)
458 (delete 'check)
459 (add-before 'build 'fix-makefile-vars
460 (lambda _
461 (substitute* "src/zxcvbn-c/makefile"
462 (("\\?=") "="))
463 #t))
464 (add-after 'fix-makefile-vars 'fix-library-paths
465 (lambda* (#:key inputs #:allow-other-keys)
466 (substitute* "monero-wallet-gui.pro"
467 (("-L/usr/local/lib") "")
468 (("-L/usr/local/opt/openssl/lib")
469 (string-append "-L"
470 (assoc-ref inputs "openssl")
471 "/lib"))
472 (("-L/usr/local/opt/boost/lib")
473 (string-append "-L"
474 (assoc-ref inputs "boost")
475 "/lib")))
476 #t))
477 (add-after 'fix-library-paths 'fix-monerod-path
478 (lambda* (#:key inputs #:allow-other-keys)
479 (substitute* "src/daemon/DaemonManager.cpp"
480 (("QApplication::applicationDirPath\\(\\) \\+ \"/monerod")
481 (string-append "\""(assoc-ref inputs "monero")
482 "/bin/monerod")))
483 #t))
484 (replace 'build
485 (lambda _
486 (zero? (system* "./build.sh"))))
487 (add-after 'build 'fix-install-path
488 (lambda* (#:key outputs #:allow-other-keys)
489 (substitute* "build/Makefile"
490 (("/opt/monero-wallet-gui")
491 (assoc-ref outputs "out")))
492 #t))
493 (add-before 'install 'change-dir
494 (lambda _
495 (chdir "build"))))))
496 (home-page "https://getmonero.org/")
497 (synopsis "Graphical user interface for the Monero currency")
498 (description
499 "Monero is a secure, private, untraceable currency. This package provides the
500Monero GUI client.")
501 (license license:bsd-3)))
00d3f022
DM
502
503(define-public python-trezor-agent
504 (package
505 (name "python-trezor-agent")
506 (version "0.9.4")
507 (source
508 (origin
509 (method url-fetch)
510 (uri (string-append "https://github.com/romanz/trezor-agent/archive/v"
511 version ".tar.gz"))
512 (file-name (string-append name "-" version ".tar.gz"))
513 (sha256
514 (base32
515 "0h8jb147vpjk7mqbl4za0xdh7lblhx07n9dfk80kn2plwnvrry1x"))))
516 (build-system python-build-system)
517 (arguments
518 `(#:phases
519 (modify-phases %standard-phases
520 (delete 'check)
521 (add-after 'install 'check
522 (lambda* (#:key outputs inputs #:allow-other-keys)
523 ;; Make installed package available for running the tests
524 (add-installed-pythonpath inputs outputs)
525 (invoke "py.test"))))))
526 (propagated-inputs
527 `(("python-ecdsa" ,python-ecdsa)
528 ("python-ed25519" ,python-ed25519)
529 ("python-semver" ,python-semver)
530 ("python-unidecode" ,python-unidecode)))
531 (native-inputs
532 `(("python-mock" ,python-mock)
533 ("python-pytest" ,python-pytest)))
534 (home-page "https://github.com/romanz/trezor-agent")
535 (synopsis "TREZOR SSH and GPG host support")
536 (description
537 "@code{libagent} is a library that allows using TREZOR, Keepkey and
538Ledger Nano as a hardware SSH/GPG agent.")
539 (license license:lgpl3)))
540
541(define-public python2-trezor-agent
542 (package-with-python2 python-trezor-agent))
6e9749ef
DM
543
544(define-public python-mnemonic
545 (package
546 (name "python-mnemonic")
547 (version "0.18")
548 (source
549 (origin
550 (method url-fetch)
551 (uri (pypi-uri "mnemonic" version))
552 (sha256
553 (base32
554 "07bzfa5di6nv5xwwcwbypnflpj50wlfczhh6q6hg8w13g5m319q2"))))
555 (build-system python-build-system)
556 (propagated-inputs
557 `(("python-pbkdf2" ,python-pbkdf2)))
558 (home-page "https://github.com/trezor/python-mnemonic")
559 (synopsis "Implementation of Bitcoin BIP-0039")
560 (description "@code{mnemonic} is a library that provides an implementation
561of Bitcoin BIP-0039.")
562 (license license:expat)))
563
564(define-public python2-mnemonic
565 (package-with-python2 python-mnemonic))
96f5e2e9
DM
566
567(define-public python-ledgerblue
568 (package
569 (name "python-ledgerblue")
570 (version "0.1.16")
571 (source
572 (origin
573 (method url-fetch)
574 (uri (pypi-uri "ledgerblue" version))
575 (sha256
576 (base32
577 "010mghaqh1cmz3a0ifc3f40mmyplilwlw7kpha2mzyrrff46p9gb"))))
578 (build-system python-build-system)
579 (propagated-inputs
580 `(("python-ecpy" ,python-ecpy)
581 ("python-future" ,python-future)
582 ("python-hidapi" ,python-hidapi)
583 ("python-pillow" ,python-pillow)
584 ("python-protobuf" ,python-protobuf)
585 ("python-pycrypto" ,python-pycrypto)))
586 (home-page "https://github.com/LedgerHQ/blue-loader-python")
587 (synopsis "Python library to communicate with Ledger Blue/Nano S")
588 (description "@code{ledgerblue} is a Python library to communicate with
589Ledger Blue/Nano S.")
590 (license license:asl2.0)))
591
592(define-public python2-ledgerblue
593 (package-with-python2 python-ledgerblue))
594
1dca32e3
DM
595(define-public python-trezor
596 (package
597 (name "python-trezor")
598 (version "0.7.16")
599 (source
600 (origin
601 (method url-fetch)
602 (uri (pypi-uri "trezor" version))
603 (sha256
604 (base32
605 "055kii56wgwadl5z911s59ya2fnsqzk3n5i19s2hb9sv2by6knvb"))))
606 (build-system python-build-system)
607 (propagated-inputs
608 `(("python-ecdsa" ,python-ecdsa)
609 ("python-hidapi" ,python-hidapi)
610 ("python-mnemonic" ,python-mnemonic)
611 ("python-protobuf" ,python-protobuf)
612 ("python-requests" ,python-requests)))
613 (native-inputs
614 `(("python-pyqt" ,python-pyqt))) ; Tests
615 (home-page "https://github.com/trezor/python-trezor")
616 (synopsis "Python library for communicating with TREZOR Hardware Wallet")
617 (description "@code{trezor} is a Python library for communicating with
618TREZOR Hardware Wallet.")
619 (license license:lgpl3)))
620
621(define-public python2-trezor
622 (package-with-python2 python-trezor))
d596fea5 623
d6ddeffc
DM
624(define-public python-keepkey
625 (package
626 (name "python-keepkey")
627 (version "4.0.2")
628 (source
629 (origin
630 (method url-fetch)
631 (uri (pypi-uri "keepkey" version))
632 (sha256
633 (base32
634 "0f4iqqjlqmamw4mhyhik4qlb5bnfd10wbjw9yzgir105wh5fdpnd"))))
635 (build-system python-build-system)
636 (arguments
637 `(#:phases
638 (modify-phases %standard-phases
639 (delete 'check)
640 (add-after 'install 'check
641 (lambda* (#:key inputs outputs #:allow-other-keys)
642 (add-installed-pythonpath inputs outputs)
643 (apply invoke "python" (find-files "tests/unit" "\\.py$")))))))
644 (propagated-inputs
645 `(("python-ecdsa" ,python-ecdsa)
646 ("python-hidapi" ,python-hidapi)
647 ("python-mnemonic" ,python-mnemonic)
648 ("python-protobuf" ,python-protobuf)))
649 (home-page "https://github.com/keepkey/python-keepkey")
650 (synopsis "Python library for communicating with KeepKey Hardware Wallet")
651 (description "@code{keepkey} is a Python library for communicating with
652the KeepKey Hardware Wallet.")
653 (license license:lgpl3)))
654
655(define-public python2-keepkey
656 (package-with-python2 python-keepkey))
657
d596fea5
DM
658(define-public ledger-agent
659 (package
660 (name "ledger-agent")
661 (version "0.9.0")
662 (source
663 (origin
664 (method url-fetch)
665 (uri (pypi-uri "ledger_agent" version))
666 (sha256
667 (base32
668 "03zj602m2rln9yvr08dswy56vzkbldp8b074ixwzz525dafblr92"))))
669 (build-system python-build-system)
670 (inputs
671 `(("python-ledgerblue" ,python-ledgerblue)
672 ("python-trezor-agent" ,python-trezor-agent)))
673 (home-page "http://github.com/romanz/trezor-agent")
674 (synopsis "Ledger as hardware SSH/GPG agent")
675 (description "This package allows using Ledger as hardware SSH/GPG agent.
676
5859fd6c
MB
677Usage for SSH: trezor-agent foo@@example.com --connect
678Usage for GPG: Initialize using trezor-gpg init \"Foo <foo@@example.com>\"
d596fea5
DM
679Then set the environment variable GNUPGHOME to
680\"${HOME}/.gnupg/trezor\".")
681 (license license:lgpl3)))
47c8ea99
DM
682
683(define-public trezor-agent
684 (package
685 (name "trezor-agent")
686 (version "0.9.0")
687 (source
688 (origin
689 (method url-fetch)
690 (uri (pypi-uri "trezor_agent" version))
691 (sha256
692 (base32
693 "1i5cdamlf3c0ym600pjklij74p8ifj9cv7xrpnrfl1b8nkadswbz"))))
694 (build-system python-build-system)
695 (inputs
696 `(("python-trezor" ,python-trezor)
697 ("python-trezor-agent" ,python-trezor-agent)))
698 (home-page "http://github.com/romanz/trezor-agent")
699 (synopsis "Using Trezor as hardware SSH/GPG agent")
700 (description "This package allows using Trezor as a hardware SSH/GPG
701agent.")
702 (license license:lgpl3)))
50c4d676
DM
703
704(define-public keepkey-agent
705 (package
706 (name "keepkey-agent")
707 (version "0.9.0")
708 (source
709 (origin
710 (method url-fetch)
711 (uri (pypi-uri "keepkey_agent" version))
712 (sha256
713 (base32
714 "03779gvlx70i0nnry98i4pl1d92604ix5x6jgdfkrdgzqbh5vj27"))))
715 (build-system python-build-system)
716 (inputs
717 `(("python-keepkey" ,python-keepkey)
718 ("python-trezor-agent" ,python-trezor-agent)))
719 (home-page "http://github.com/romanz/trezor-agent")
720 (synopsis "KeepKey as hardware SSH/GPG agent")
721 (description "This package allows using KeepKey as a hardware SSH/GPG
722agent.")
723 (license license:lgpl3)))
3da86c52
AP
724
725(define-public python-stdnum
726 (package
727 (name "python-stdnum")
728 (version "1.8.1")
729 (source
730 (origin
731 (method url-fetch)
732 (uri (pypi-uri "python-stdnum" version))
733 (sha256
734 (base32
735 "0hvr47q32xbyiznpmbg4r8rcvxhnf0lwf33hcpnynyik57djy5np"))))
736 (build-system python-build-system)
737 (home-page
738 "https://arthurdejong.org/python-stdnum/")
739 (synopsis
740 "Python module to handle standardized number and code formats")
741 (description
742 "This is a Python library that aims to provide functions to handle,
743parse and validate standard numbers.
744The module supports more than 100 different number formats
745amongst which a great number of VAT and other tax numbers,
746personal identity and company identification codes,
747international standard numbers (ISBN, IBAN, EAN, etc.)
748and various other formats.
749The module also inclused implementations of the Verhoeff,
750Luhn and family of ISO/IEC 7064 check digit algorithms. ")
751 (license license:lgpl2.1+)))
752
753(define-public python2-stdnum
754 (package-with-python2 python-stdnum))