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