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