gnu: Add libusbmuxd.
[jackhill/guix/guix.git] / gnu / packages / finance.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
5 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
6 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
7 ;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
8 ;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com>
9 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
11 ;;; Copyright © 2018 Adriano Peluso <catonano@gmail.com>
12 ;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
13 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
14 ;;;
15 ;;; This file is part of GNU Guix.
16 ;;;
17 ;;; GNU Guix is free software; you can redistribute it and/or modify it
18 ;;; under the terms of the GNU General Public License as published by
19 ;;; the Free Software Foundation; either version 3 of the License, or (at
20 ;;; your option) any later version.
21 ;;;
22 ;;; GNU Guix is distributed in the hope that it will be useful, but
23 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 ;;; GNU General Public License for more details.
26 ;;;
27 ;;; You should have received a copy of the GNU General Public License
28 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29
30 (define-module (gnu packages finance)
31 #:use-module ((guix licenses) #:prefix license:)
32 #:use-module (guix packages)
33 #:use-module (guix download)
34 #:use-module (guix git-download)
35 #:use-module (guix build-system gnu)
36 #:use-module (guix build-system cmake)
37 #:use-module (guix build-system python)
38 #:use-module (gnu packages)
39 #:use-module (gnu packages base)
40 #:use-module (gnu packages boost)
41 #:use-module (gnu packages check)
42 #:use-module (gnu packages crypto)
43 #:use-module (gnu packages databases)
44 #:use-module (gnu packages documentation)
45 #:use-module (gnu packages dns)
46 #:use-module (gnu packages emacs)
47 #:use-module (gnu packages dbm)
48 #:use-module (gnu packages graphviz)
49 #:use-module (gnu packages groff)
50 #:use-module (gnu packages libedit)
51 #:use-module (gnu packages libevent)
52 #:use-module (gnu packages libunwind)
53 #:use-module (gnu packages libusb)
54 #:use-module (gnu packages linux)
55 #:use-module (gnu packages multiprecision)
56 #:use-module (gnu packages networking)
57 #:use-module (gnu packages pkg-config)
58 #:use-module (gnu packages protobuf)
59 #:use-module (gnu packages python)
60 #:use-module (gnu packages python-crypto)
61 #:use-module (gnu packages python-web)
62 #:use-module (gnu packages python-xyz)
63 #:use-module (gnu packages qt)
64 #:use-module (gnu packages readline)
65 #:use-module (gnu packages texinfo)
66 #:use-module (gnu packages textutils)
67 #:use-module (gnu packages tls)
68 #:use-module (gnu packages upnp)
69 #:use-module (gnu packages web)
70 #:use-module (gnu packages xml)
71 #:use-module (gnu packages gnuzilla))
72
73 (define-public bitcoin-core
74 (package
75 (name "bitcoin-core")
76 (version "0.16.1")
77 (source (origin
78 (method url-fetch)
79 (uri
80 (string-append "https://bitcoin.org/bin/bitcoin-core-"
81 version "/bitcoin-" version ".tar.gz"))
82 (sha256
83 (base32
84 "1zkqp93yircd3pbxczxfnibkpq0sgcv5r7wg6d196b9pwgr9zd39"))))
85 (build-system gnu-build-system)
86 (native-inputs
87 `(("pkg-config" ,pkg-config)
88 ("python" ,python) ; for the tests
89 ("util-linux" ,util-linux) ; provides the hexdump command for tests
90 ("qttools" ,qttools)))
91 (inputs
92 `(("bdb" ,bdb-5.3) ; with 6.2.23, there is an error: ambiguous overload
93 ("boost" ,boost)
94 ("libevent" ,libevent)
95 ("miniupnpc" ,miniupnpc)
96 ("openssl" ,openssl)
97 ("protobuf" ,protobuf)
98 ("qtbase" ,qtbase)))
99 (arguments
100 `(#:configure-flags
101 (list
102 ;; We use a bdb version newer than 4.8.
103 "--with-incompatible-bdb"
104 ;; Boost is not found unless specified manually.
105 (string-append "--with-boost="
106 (assoc-ref %build-inputs "boost"))
107 ;; XXX: The configure script looks up Qt paths by
108 ;; `pkg-config --variable=host_bins Qt5Core`, which fails to pick
109 ;; up executables residing in 'qttools', so we specify them here.
110 (string-append "ac_cv_path_LRELEASE="
111 (assoc-ref %build-inputs "qttools")
112 "/bin/lrelease")
113 (string-append "ac_cv_path_LUPDATE="
114 (assoc-ref %build-inputs "qttools")
115 "/bin/lupdate"))
116 #:phases
117 (modify-phases %standard-phases
118 (add-before 'check 'set-home
119 (lambda _
120 (setenv "HOME" (getenv "TMPDIR"))))))) ; Tests write to $HOME.
121 (home-page "https://bitcoin.org/en/")
122 (synopsis "Bitcoin peer-to-peer client")
123 (description
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)))
131
132 (define-public ledger
133 (package
134 (name "ledger")
135 (version "3.1.1")
136 (source (origin
137 (method url-fetch)
138 (uri (string-append
139 "https://github.com/ledger/ledger/archive/v"
140 version ".tar.gz"))
141 (file-name (string-append name "-" version ".tar.gz"))
142 (sha256
143 (base32
144 "12jlv3gsjhrja25q9hrwh73cdacd2l3c2yyn8qnijav9mdhnbw4h"))
145 (patches (search-patches "ledger-revert-boost-python-fix.patch"
146 "ledger-fix-uninitialized.patch"))))
147 (build-system cmake-build-system)
148 (arguments
149 `(#:modules ((guix build cmake-build-system)
150 ((guix build gnu-build-system) #:prefix gnu:)
151 (guix build utils)
152 (guix build emacs-utils))
153 #:imported-modules (,@%cmake-build-system-modules
154 (guix build emacs-utils))
155 #:configure-flags
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")
163 "/include"))
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")
168 #:phases
169 (modify-phases %standard-phases
170 (add-after 'unpack 'boost-compat
171 (lambda _
172 (substitute* "src/utils.h"
173 ;; This library moved in Boost 1.66. Remove for Ledger
174 ;; versions > 3.1.1.
175 (("boost/uuid/sha1.hpp") "boost/uuid/detail/sha1.hpp"))
176 #t))
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))
183 #t))
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)
189 (setenv "TZDIR"
190 (string-append (assoc-ref inputs "tzdata")
191 "/share/zoneinfo"))
192 #t))
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")))
201 (mkdir-p guix-dir)
202 (rename-file orig-dir dest-dir)
203 (emacs-generate-autoloads ,name dest-dir)))))))
204 (inputs
205 `(("boost" ,boost)
206 ("gmp" ,gmp)
207 ("libedit" ,libedit)
208 ("mpfr" ,mpfr)
209 ("python" ,python-2)
210 ("tzdata" ,tzdata)
211 ("utfcpp" ,utfcpp)))
212 (native-inputs
213 `(("emacs" ,emacs-minimal)
214 ("groff" ,groff)
215 ("texinfo" ,texinfo)))
216 (home-page "https://ledger-cli.org/")
217 (synopsis "Command-line double-entry accounting program")
218 (description
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.
223
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/*
242
243 (define-public geierlein
244 (package
245 (name "geierlein")
246 (version "0.9.13")
247 (source
248 (origin
249 (method url-fetch)
250 (uri (string-append "https://github.com/stesie/geierlein"
251 "/archive/V" version ".tar.gz"))
252 (file-name (string-append name "-" version ".tar.gz"))
253 (sha256
254 (base32
255 "11jfa7mxvvf0ldhx0hsvjbx3xwvzvn2wrfjpms8c7qmrnqhwh4wp"))))
256 (build-system gnu-build-system)
257 (arguments
258 `(#:tests? #f ; would require npm, python and a lot more
259 #:phases
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"
265 (("prefix := .*")
266 (string-append "prefix := " (assoc-ref outputs "out") "\n"))
267 ;; Required for tests, unused for now:
268 ;;(("PYTHON := .*")
269 ;; (string-append (which "python") "\n")))
270 (("INSTALL := .*")
271 (string-append "INSTALL := " (which "install") "\n")))
272 (substitute* "bin/xgeierlein.in"
273 ;; Use icecat as XULRUNNER
274 (("^for search ")
275 (string-append "XULRUNNER=" (which "icecat") "\n"
276 "for search ")))
277 #t)))))
278 (inputs
279 `(("icecat" ,icecat)))
280 (home-page "https://stesie.github.io/geierlein/")
281 (synopsis "Free Elster client, for sending Germany VAT declarations")
282 (description
283 "Geierlein is a free Elster client, i.e. an application that
284 allows to send VAT declarations to Germany's fiscal authorities.
285
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
290 do so.")
291 (license license:agpl3+)))
292
293 (define-public electrum
294 (package
295 (name "electrum")
296 (version "3.2.2")
297 (source
298 (origin
299 (method url-fetch)
300 (uri (string-append "https://download.electrum.org/"
301 version "/Electrum-"
302 version ".tar.gz"))
303 (sha256
304 (base32
305 "1fxaxlf5vm2zydj678ls3pazyriym188iwzk60kyk26cz2p3xk39"))
306 (modules '((guix build utils)))
307 (snippet
308 '(begin
309 ;; Delete the bundled dependencies.
310 (delete-file-recursively "packages")
311 #t))))
312 (build-system python-build-system)
313 (inputs
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)))
325 (arguments
326 `(#:tests? #f ;; package doesn't have any tests
327 #:phases
328 (modify-phases %standard-phases
329 (add-before 'build 'patch-home
330 (lambda* (#:key outputs #:allow-other-keys)
331 (substitute* "setup.py"
332 (("~/.local/share")
333 (string-append (assoc-ref outputs "out") "/local/share"))))))))
334 (home-page "https://electrum.org/")
335 (synopsis "Bitcoin wallet")
336 (description
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)))
342
343 (define-public electron-cash
344 (package
345 (inherit electrum)
346 (name "electron-cash")
347 (version "3.3.4")
348 (source
349 (origin
350 (method url-fetch)
351 (uri (string-append "https://electroncash.org/downloads/"
352 version
353 "/win-linux/ElectronCash-"
354 version
355 ".tar.gz"))
356 (sha256
357 (base32
358 "0ipl6vf2n9a5n556sx2z57s7wdvg05xwjvz67kff9nmbx4s8vjyf"))
359 (modules '((guix build utils)))
360 (snippet
361 '(begin
362 ;; Delete the bundled dependencies.
363 (delete-file-recursively "packages")
364 #t))))
365 (home-page "https://electroncash.org/")
366 (synopsis "Bitcoin Cash wallet")
367 (description
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)))
373
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.
379 (package
380 (name "monero")
381 (version "0.12.3.0")
382 (source
383 (origin
384 (method git-fetch)
385 (uri (git-reference
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"))
390 (sha256
391 (base32
392 "14db9kgjm2ha93c2x5fjdw01xaqshn756qr3x2cnzyyjh7caz5qd"))))
393 (build-system cmake-build-system)
394 (native-inputs
395 `(("doxygen" ,doxygen)
396 ("googletest" ,googletest)
397 ("graphviz" ,graphviz)
398 ("pkg-config" ,pkg-config)))
399 (inputs
400 `(("bind" ,isc-bind)
401 ("boost" ,boost)
402 ("zeromq" ,zeromq)
403 ("cppzmq" ,cppzmq)
404 ("expat" ,expat)
405 ("libsodium" ,libsodium)
406 ("libunwind" ,libunwind)
407 ("lmdb" ,lmdb)
408 ("miniupnpc" ,monero-miniupnpc)
409 ("openssl" ,openssl)
410 ("rapidjson" ,rapidjson)
411 ("unbound" ,unbound)))
412 (arguments
413 `(#:out-of-source? #t
414 #:build-type "release"
415 #:configure-flags '("-DBUILD_TESTS=ON"
416 ,@(if (string=? "aarch64-linux" (%current-system))
417 '("-DARCH=armv8-a")
418 '())
419 "-DBUILD_GUI_DEPS=ON")
420 #:phases
421 (modify-phases %standard-phases
422 ;; tests/core_tests need a valid HOME
423 (add-before 'configure 'set-home
424 (lambda _
425 (setenv "HOME" (getcwd))
426 #t))
427 (add-after 'set-home 'fix-wallet-path-for-unit-tests
428 (lambda _
429 (substitute* "tests/unit_tests/serialization.cpp"
430 (("\\.\\./\\.\\./\\.\\./\\.\\./") "../../"))
431 #t))
432 (add-after 'fix-wallet-path-for-unit-tests 'change-log-path
433 (lambda _
434 (substitute* "contrib/epee/src/mlog.cpp"
435 (("epee::string_tools::get_current_module_folder\\(\\)")
436 "\".bitmonero\""))
437 (substitute* "contrib/epee/src/mlog.cpp"
438 (("return \\(") "return ((std::string(getenv(\"HOME\"))) / "))
439 #t))
440 (replace 'check
441 (lambda _
442 (invoke "make" "ARGS=-E 'unit_tests|libwallet_api_tests'"
443 "test")))
444 ;; The excluded unit tests need network access
445 (add-after 'check 'unit-tests
446 (lambda _
447 (let ((excluded-unit-tests
448 (string-join
449 '("AddressFromURL.Success"
450 "AddressFromURL.Failure"
451 "DNSResolver.IPv4Success"
452 "DNSResolver.DNSSECSuccess"
453 "DNSResolver.DNSSECFailure"
454 "DNSResolver.GetTXTRecord")
455 ":")))
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")
467 (description
468 "Monero is a secure, private, untraceable currency. This package provides the
469 Monero command line client and daemon.")
470 (license license:bsd-3)))
471
472 (define-public monero-gui
473 (package
474 (name "monero-gui")
475 (version "0.12.2.0")
476 (source
477 (origin
478 (method git-fetch)
479 (uri (git-reference
480 (url "https://github.com/monero-project/monero-gui")
481 (commit (string-append "v" version))))
482 (file-name (git-file-name name version))
483 (sha256
484 (base32
485 "1cnrkwh7kp64lnzz1xfmkf1mhsgm5gls292gpqai3jr8jydpkahl"))))
486 (build-system gnu-build-system)
487 (native-inputs
488 `(("doxygen" ,doxygen)
489 ("graphviz" ,graphviz)
490 ("pkg-config" ,pkg-config)
491 ("qttools" ,qttools)))
492 (inputs
493 `(("boost" ,boost)
494 ("libunwind" ,libunwind)
495 ("openssl" ,openssl)
496 ("qtbase" ,qtbase)
497 ("qtdeclarative" ,qtdeclarative)
498 ("qtgraphicaleffects" ,qtgraphicaleffects)
499 ("qtquickcontrols" ,qtquickcontrols)
500 ("readline" ,readline)
501 ("unbound" ,unbound)))
502 (propagated-inputs
503 `(("monero" ,monero)))
504 (arguments
505 `(#:phases
506 (modify-phases %standard-phases
507 (delete 'configure)
508 (delete 'check)
509 (add-before 'build 'fix-makefile-vars
510 (lambda _
511 (substitute* "src/zxcvbn-c/makefile"
512 (("\\?=") "="))
513 #t))
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")
519 (string-append "-L"
520 (assoc-ref inputs "openssl")
521 "/lib"))
522 (("-L/usr/local/opt/boost/lib")
523 (string-append "-L"
524 (assoc-ref inputs "boost")
525 "/lib")))
526 #t))
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")
532 "/bin/monerod")))
533 #t))
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))
542 #t)))
543 (replace 'build
544 (lambda _
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")))
551 #t))
552 (add-before 'install 'change-dir
553 (lambda _
554 (chdir "build")))
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)
562 "/lib/qt5/plugins"))
563 '("qtbase" "qtdeclarative")))
564 `("QML2_IMPORT_PATH" ":" prefix
565 ,(map (lambda (label)
566 (string-append (assoc-ref inputs label)
567 "/lib/qt5/qml"))
568 '("qtdeclarative" "qtgraphicaleffects"
569 "qtquickcontrols"))))
570 #t))))))
571 (home-page "https://getmonero.org/")
572 (synopsis "Graphical user interface for the Monero currency")
573 (description
574 "Monero is a secure, private, untraceable currency. This package provides the
575 Monero GUI client.")
576 (license license:bsd-3)))
577
578 (define-public monero-core
579 (deprecated-package "monero-core" monero-gui))
580
581 (define-public python-trezor-agent
582 (package
583 (name "python-trezor-agent")
584 (version "0.9.4")
585 (source
586 (origin
587 (method url-fetch)
588 (uri (string-append "https://github.com/romanz/trezor-agent/archive/v"
589 version ".tar.gz"))
590 (file-name (string-append name "-" version ".tar.gz"))
591 (sha256
592 (base32
593 "0h8jb147vpjk7mqbl4za0xdh7lblhx07n9dfk80kn2plwnvrry1x"))))
594 (build-system python-build-system)
595 (arguments
596 `(#:phases
597 (modify-phases %standard-phases
598 (delete 'check)
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"))))))
604 (propagated-inputs
605 `(("python-ecdsa" ,python-ecdsa)
606 ("python-ed25519" ,python-ed25519)
607 ("python-semver" ,python-semver)
608 ("python-unidecode" ,python-unidecode)))
609 (native-inputs
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")
614 (description
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)))
618
619 (define-public python2-trezor-agent
620 (package-with-python2 python-trezor-agent))
621
622 (define-public python-mnemonic
623 (package
624 (name "python-mnemonic")
625 (version "0.18")
626 (source
627 (origin
628 (method url-fetch)
629 (uri (pypi-uri "mnemonic" version))
630 (sha256
631 (base32
632 "07bzfa5di6nv5xwwcwbypnflpj50wlfczhh6q6hg8w13g5m319q2"))))
633 (build-system python-build-system)
634 (propagated-inputs
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)))
641
642 (define-public python2-mnemonic
643 (package-with-python2 python-mnemonic))
644
645 (define-public python-ledgerblue
646 (package
647 (name "python-ledgerblue")
648 (version "0.1.16")
649 (source
650 (origin
651 (method url-fetch)
652 (uri (pypi-uri "ledgerblue" version))
653 (sha256
654 (base32
655 "010mghaqh1cmz3a0ifc3f40mmyplilwlw7kpha2mzyrrff46p9gb"))))
656 (build-system python-build-system)
657 (propagated-inputs
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)))
669
670 (define-public python2-ledgerblue
671 (package-with-python2 python-ledgerblue))
672
673 (define-public python-trezor
674 (package
675 (name "python-trezor")
676 (version "0.10.2")
677 (source
678 (origin
679 (method url-fetch)
680 (uri (pypi-uri "trezor" version))
681 (sha256
682 (base32
683 "138k6zsqqpb46k3rcpyslm9q7yq5i6k4myvr9n425jnkadf4vfjd"))))
684 (build-system python-build-system)
685 (arguments
686 `(#:phases
687 (modify-phases %standard-phases
688 ;; Default tests run device-specific tests which fail, only run specific tests.
689 (replace 'check
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")
693 )))))
694 (propagated-inputs
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)))
704 (native-inputs
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)))
713
714 (define-public python2-trezor
715 (package-with-python2 python-trezor))
716
717 (define-public python-keepkey
718 (package
719 (name "python-keepkey")
720 (version "4.0.2")
721 (source
722 (origin
723 (method url-fetch)
724 (uri (pypi-uri "keepkey" version))
725 (sha256
726 (base32
727 "0f4iqqjlqmamw4mhyhik4qlb5bnfd10wbjw9yzgir105wh5fdpnd"))))
728 (build-system python-build-system)
729 (arguments
730 `(#:phases
731 (modify-phases %standard-phases
732 (delete 'check)
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$")))))))
737 (propagated-inputs
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)))
747
748 (define-public python2-keepkey
749 (package-with-python2 python-keepkey))
750
751 (define-public ledger-agent
752 (package
753 (name "ledger-agent")
754 (version "0.9.0")
755 (source
756 (origin
757 (method url-fetch)
758 (uri (pypi-uri "ledger_agent" version))
759 (sha256
760 (base32
761 "03zj602m2rln9yvr08dswy56vzkbldp8b074ixwzz525dafblr92"))))
762 (build-system python-build-system)
763 (inputs
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.
769
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)))
775
776 (define-public trezor-agent
777 (package
778 (name "trezor-agent")
779 (version "0.9.0")
780 (source
781 (origin
782 (method url-fetch)
783 (uri (pypi-uri "trezor_agent" version))
784 (sha256
785 (base32
786 "1i5cdamlf3c0ym600pjklij74p8ifj9cv7xrpnrfl1b8nkadswbz"))))
787 (build-system python-build-system)
788 (inputs
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
794 agent.")
795 (license license:lgpl3)))
796
797 (define-public keepkey-agent
798 (package
799 (name "keepkey-agent")
800 (version "0.9.0")
801 (source
802 (origin
803 (method url-fetch)
804 (uri (pypi-uri "keepkey_agent" version))
805 (sha256
806 (base32
807 "03779gvlx70i0nnry98i4pl1d92604ix5x6jgdfkrdgzqbh5vj27"))))
808 (build-system python-build-system)
809 (inputs
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
815 agent.")
816 (license license:lgpl3)))
817
818 (define-public python-stdnum
819 (package
820 (name "python-stdnum")
821 (version "1.8.1")
822 (source
823 (origin
824 (method url-fetch)
825 (uri (pypi-uri "python-stdnum" version))
826 (sha256
827 (base32
828 "0hvr47q32xbyiznpmbg4r8rcvxhnf0lwf33hcpnynyik57djy5np"))))
829 (build-system python-build-system)
830 (home-page
831 "https://arthurdejong.org/python-stdnum/")
832 (synopsis
833 "Python module to handle standardized number and code formats")
834 (description
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+)))
845
846 (define-public python2-stdnum
847 (package-with-python2 python-stdnum))
848
849 (define-public python-duniterpy
850 (package
851 (name "python-duniterpy")
852 (version "0.51.0")
853 (source
854 (origin
855 (method git-fetch)
856 ;; Pypi's default URI is missing "requirements.txt" file.
857 (uri (git-reference
858 (url "https://git.duniter.org/clients/python/duniterpy.git")
859 (commit version)))
860 (file-name (git-file-name name version))
861 (sha256
862 (base32
863 "074mh2kh3s00ib0h99050ss3j4c51v57py6dzm7crida6l0iydbv"))))
864 (build-system python-build-system)
865 (arguments
866 ;; Tests fail with "AttributeError: module 'attr' has no attribute 's'".
867 `(#:tests? #f
868 #:phases
869 (modify-phases %standard-phases
870 (add-after 'build 'build-documentation
871 (lambda _
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)))
877 (mkdir-p doc)
878 (copy-recursively "docs/_build/html" doc))
879 #t)))))
880 (native-inputs
881 `(("python-sphinx" ,python-sphinx)
882 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
883 (propagated-inputs
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
895 main features are:
896 @itemize
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
903 @end itemize")
904 (license license:gpl3+)))
905
906 (define-public silkaj
907 (package
908 (name "silkaj")
909 (version "0.6.1")
910 (source
911 (origin
912 (method git-fetch)
913 (uri (git-reference
914 (url "https://git.duniter.org/clients/python/silkaj.git")
915 (commit (string-append "v" version))))
916 (file-name (git-file-name name version))
917 (sha256
918 (base32
919 "0a99gbgdd7m9wisqhqpfyaim0rlv9gkp8gmrppkagqf6j0683igh"))))
920 (build-system python-build-system)
921 (arguments
922 `(#:tests? #f)) ;no test
923 (inputs
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.
934
935 Its features are:
936 @itemize
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.
943 @end itemize")
944 (license license:agpl3+)))