gnu: python-keepkey: Update to 6.0.3.
[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>
136ff9a2 3;;; Copyright © 2016, 2017, 2018 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>
9859800f 9;;; Copyright © 2017, 2018, 2019 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>
8f4d15f1 12;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
948e888d 13;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
20c6b9da
AE
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)
fa4f95a7
CB
31 #:use-module ((guix licenses) #:prefix license:)
32 #:use-module (guix packages)
33 #:use-module (guix download)
730553d7 34 #:use-module (guix git-download)
fa4f95a7
CB
35 #:use-module (guix build-system gnu)
36 #:use-module (guix build-system cmake)
37 #:use-module (guix build-system python)
5424f9bc 38 #:use-module (gnu packages)
fa4f95a7
CB
39 #:use-module (gnu packages base)
40 #:use-module (gnu packages boost)
41 #:use-module (gnu packages check)
0a551443 42 #:use-module (gnu packages crypto)
fa4f95a7
CB
43 #:use-module (gnu packages databases)
44 #:use-module (gnu packages documentation)
45 #:use-module (gnu packages dns)
46 #:use-module (gnu packages emacs)
255d1bbe 47 #:use-module (gnu packages dbm)
df724c9c 48 #:use-module (gnu packages gnupg)
fa4f95a7
CB
49 #:use-module (gnu packages graphviz)
50 #:use-module (gnu packages groff)
51 #:use-module (gnu packages libedit)
52 #:use-module (gnu packages libevent)
53 #:use-module (gnu packages libunwind)
96f5e2e9 54 #:use-module (gnu packages libusb)
fa4f95a7
CB
55 #:use-module (gnu packages linux)
56 #:use-module (gnu packages multiprecision)
0a551443 57 #:use-module (gnu packages networking)
fa4f95a7
CB
58 #:use-module (gnu packages pkg-config)
59 #:use-module (gnu packages protobuf)
60 #:use-module (gnu packages python)
cc6f4912 61 #:use-module (gnu packages python-crypto)
589e3f4e 62 #:use-module (gnu packages python-web)
44d10b1f 63 #:use-module (gnu packages python-xyz)
fa4f95a7 64 #:use-module (gnu packages qt)
1d0865c1 65 #:use-module (gnu packages readline)
fa4f95a7
CB
66 #:use-module (gnu packages texinfo)
67 #:use-module (gnu packages textutils)
68 #:use-module (gnu packages tls)
69 #:use-module (gnu packages upnp)
70 #:use-module (gnu packages web)
71 #:use-module (gnu packages xml)
72 #:use-module (gnu packages gnuzilla))
20c6b9da
AE
73
74(define-public bitcoin-core
75 (package
76 (name "bitcoin-core")
0a59cc6e 77 (version "0.17.1")
20c6b9da
AE
78 (source (origin
79 (method url-fetch)
80 (uri
0a59cc6e 81 (string-append "https://bitcoincore.org/bin/bitcoin-core-"
14ea30e4 82 version "/bitcoin-" version ".tar.gz"))
20c6b9da
AE
83 (sha256
84 (base32
0a59cc6e 85 "0am4pnaf2cisv172jqx6jdpzx770agm8777163lkjbw3ryslymiy"))))
20c6b9da
AE
86 (build-system gnu-build-system)
87 (native-inputs
88 `(("pkg-config" ,pkg-config)
e49e74f5 89 ("python" ,python) ; for the tests
0193812a
MB
90 ("util-linux" ,util-linux) ; provides the hexdump command for tests
91 ("qttools" ,qttools)))
20c6b9da 92 (inputs
fe7fa353 93 `(("bdb" ,bdb-5.3) ; with 6.2.23, there is an error: ambiguous overload
20c6b9da 94 ("boost" ,boost)
14ea30e4 95 ("libevent" ,libevent)
20c6b9da
AE
96 ("miniupnpc" ,miniupnpc)
97 ("openssl" ,openssl)
98 ("protobuf" ,protobuf)
0193812a 99 ("qtbase" ,qtbase)))
20c6b9da
AE
100 (arguments
101 `(#:configure-flags
102 (list
103 ;; We use a bdb version newer than 4.8.
104 "--with-incompatible-bdb"
105 ;; Boost is not found unless specified manually.
106 (string-append "--with-boost="
0193812a
MB
107 (assoc-ref %build-inputs "boost"))
108 ;; XXX: The configure script looks up Qt paths by
109 ;; `pkg-config --variable=host_bins Qt5Core`, which fails to pick
110 ;; up executables residing in 'qttools', so we specify them here.
111 (string-append "ac_cv_path_LRELEASE="
112 (assoc-ref %build-inputs "qttools")
113 "/bin/lrelease")
114 (string-append "ac_cv_path_LUPDATE="
115 (assoc-ref %build-inputs "qttools")
116 "/bin/lupdate"))
20c6b9da
AE
117 #:phases
118 (modify-phases %standard-phases
99629e5a
CD
119 (add-before 'configure 'make-qt-deterministic
120 (lambda _
121 ;; Make Qt deterministic.
122 (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")
123 #t))
20c6b9da
AE
124 (add-before 'check 'set-home
125 (lambda _
0e9600cb
DM
126 (setenv "HOME" (getenv "TMPDIR")) ; Tests write to $HOME.
127 #t)))))
20c6b9da
AE
128 (home-page "https://bitcoin.org/en/")
129 (synopsis "Bitcoin peer-to-peer client")
130 (description
131 "Bitcoin is a digital currency that enables instant payments to anyone
132anywhere in the world. It uses peer-to-peer technology to operate without
133central authority: managing transactions and issuing money are carried out
134collectively by the network. Bitcoin Core is the reference implementation
135of the bitcoin protocol. This package provides the Bitcoin Core command
136line client and a client based on Qt.")
137 (license license:expat)))
d3699b31
AG
138
139(define-public ledger
140 (package
141 (name "ledger")
9859800f 142 (version "3.1.3")
8b7ac58c
TGR
143 (source
144 (origin
145 (method git-fetch)
146 (uri (git-reference
147 (url "https://github.com/ledger/ledger.git")
148 (commit (string-append "v" version))))
149 (file-name (git-file-name name version))
150 (sha256
9859800f 151 (base32 "0bfnrqrd6wqgsngfpqi30xh6yy86pwl25iwzrqy44q31r0zl4mm3"))))
d3699b31
AG
152 (build-system cmake-build-system)
153 (arguments
f90ed028 154 `(#:configure-flags
d3699b31
AG
155 `("-DBUILD_DOCS:BOOL=ON"
156 "-DBUILD_WEB_DOCS:BOOL=ON"
d3699b31 157 "-DUSE_PYTHON:BOOL=ON"
f90ed028 158 "-DCMAKE_INSTALL_LIBDIR:PATH=lib")
d3699b31
AG
159 #:phases
160 (modify-phases %standard-phases
161 (add-before 'configure 'install-examples
162 (lambda* (#:key outputs #:allow-other-keys)
163 (let ((examples (string-append (assoc-ref outputs "out")
164 "/share/doc/ledger/examples")))
165 (install-file "test/input/sample.dat" examples)
166 (install-file "test/input/demo.ledger" examples))
167 #t))
168 (add-after 'build 'build-doc
1f3c4ba8 169 (lambda _ (invoke "make" "doc")))
d3699b31
AG
170 (add-before 'check 'check-setup
171 ;; One test fails if it can't set the timezone.
172 (lambda* (#:key inputs #:allow-other-keys)
173 (setenv "TZDIR"
174 (string-append (assoc-ref inputs "tzdata")
175 "/share/zoneinfo"))
f90ed028
RW
176 ;; Skip failing test BaselineTest_cmd-org.
177 ;; This is a known upstream issue. See
178 ;; https://github.com/ledger/ledger/issues/550
179 (setenv "ARGS" "-E BaselineTest_cmd-org")
180 #t)))))
d3699b31
AG
181 (inputs
182 `(("boost" ,boost)
183 ("gmp" ,gmp)
184 ("libedit" ,libedit)
185 ("mpfr" ,mpfr)
186 ("python" ,python-2)
187 ("tzdata" ,tzdata)
188 ("utfcpp" ,utfcpp)))
189 (native-inputs
f90ed028 190 `(("groff" ,groff)
d3699b31 191 ("texinfo" ,texinfo)))
b53a0c88 192 (home-page "https://ledger-cli.org/")
d3699b31
AG
193 (synopsis "Command-line double-entry accounting program")
194 (description
195 "Ledger is a powerful, double-entry accounting system that is
196accessed from the UNIX command-line. This may put off some users, since
197there is no flashy UI, but for those who want unparalleled reporting
198access to their data there are few alternatives.
199
200Ledger uses text files for input. It reads the files and generates
201reports; there is no other database or stored state. To use Ledger,
202you create a file of your account names and transactions, run from the
203command line with some options to specify input and requested reports, and
204get output. The output is generally plain text, though you could generate
205a graph or html instead. Ledger is simple in concept, surprisingly rich
206in ability, and easy to use.")
207 ;; There are some extra licenses in files which do not presently get
208 ;; installed when you build this package. Different versions of the GPL
209 ;; are used in the contrib and python subdirectories. The bundled version
210 ;; of utfcpp is under the Boost 1.0 license. Also the file
211 ;; `tools/update_copyright_year` has an Expat license.
212 (license (list license:bsd-3
213 license:asl2.0 ; src/strptime.cc
214 (license:non-copyleft
215 "file://src/wcwidth.cc"
f90ed028 216 "See src/wcwidth.cc in the distribution.")))))
cb0866c3 217
0df201c0
RW
218(define-public emacs-ledger-mode
219 ;; There have been no new releases since 2016.
220 (let ((commit "253a20dc62e137ed0ed8e1dd8614ecba116610ea")
221 (revision "1"))
222 (package
223 (name "emacs-ledger-mode")
224 (version (git-version "3.1.1" revision commit))
225 (source
226 (origin
227 (method git-fetch)
228 (uri (git-reference
229 (url "https://github.com/ledger/ledger-mode.git")
230 (commit commit)))
231 (file-name (git-file-name name version))
232 (sha256
233 (base32 "06wrgkqpgvk17vibrk2qikdlqn8y63jg86marp1wgmram92mb3jk"))))
234 (build-system cmake-build-system)
235 (arguments
236 `(#:modules ((guix build cmake-build-system)
237 (guix build utils)
238 (guix build emacs-utils))
239 #:imported-modules (,@%cmake-build-system-modules
240 (guix build emacs-utils))
241 #:tests? #f ; there are none
242 #:phases
243 (modify-phases %standard-phases
244 (add-after 'build 'build-doc
245 (lambda* (#:key outputs #:allow-other-keys)
246 (let ((target (string-append (assoc-ref outputs "out")
247 "/share/info")))
248 (mkdir-p target)
249 (invoke "makeinfo" "-o" target
250 "../source/doc/ledger-mode.texi"))
251 #t))
252 (add-after 'install 'relocate-elisp
253 (lambda* (#:key outputs #:allow-other-keys)
254 (let* ((site-dir (string-append (assoc-ref outputs "out")
255 "/share/emacs/site-lisp"))
256 (guix-dir (string-append site-dir "/guix.d"))
257 (orig-dir (string-append site-dir "/ledger-mode"))
258 (dest-dir (string-append guix-dir "/ledger-mode")))
259 (mkdir-p guix-dir)
260 (rename-file orig-dir dest-dir)
261 (emacs-generate-autoloads ,name dest-dir)
262 #t))))))
263 (native-inputs
264 `(("emacs-minimal" ,emacs-minimal)
265 ("texinfo" ,texinfo)))
266 (home-page "https://ledger-cli.org/")
267 (synopsis "Command-line double-entry accounting program")
268 (description
269 "Ledger is a powerful, double-entry accounting system that is
270accessed from the UNIX command-line. This may put off some users, since
271there is no flashy UI, but for those who want unparalleled reporting
272access to their data there are few alternatives.
273
274Ledger uses text files for input. It reads the files and generates
275reports; there is no other database or stored state. To use Ledger,
276you create a file of your account names and transactions, run from the
277command line with some options to specify input and requested reports, and
278get output. The output is generally plain text, though you could generate
279a graph or html instead. Ledger is simple in concept, surprisingly rich
280in ability, and easy to use.
281
282This package provides the Emacs mode.")
283 (license license:gpl2+))))
284
cb0866c3
HG
285(define-public geierlein
286 (package
287 (name "geierlein")
1c21e734 288 (version "0.9.13")
cb0866c3
HG
289 (source
290 (origin
1fd71120
TGR
291 (method git-fetch)
292 (uri (git-reference
293 (url "https://github.com/stesie/geierlein.git")
294 (commit (string-append "V" version))))
295 (file-name (git-file-name name version))
cb0866c3 296 (sha256
1fd71120 297 (base32 "00zpwr3lk2vdmd60fgdwdk0xxs52wvnm19ln2m75yfphydvkglic"))))
cb0866c3
HG
298 (build-system gnu-build-system)
299 (arguments
1fd71120 300 `(#:tests? #f ; would require npm, python and a lot more
cb0866c3
HG
301 #:phases
302 (modify-phases %standard-phases
1c21e734 303 (delete 'configure) ; no configure script
cb0866c3
HG
304 (add-after 'unpack 'override-target-directory-and-tool-paths
305 (lambda* (#:key inputs outputs #:allow-other-keys)
306 (substitute* "Makefile"
307 (("prefix := .*")
308 (string-append "prefix := " (assoc-ref outputs "out") "\n"))
309 ;; Required for tests, unused for now:
310 ;;(("PYTHON := .*")
311 ;; (string-append (which "python") "\n")))
312 (("INSTALL := .*")
313 (string-append "INSTALL := " (which "install") "\n")))
314 (substitute* "bin/xgeierlein.in"
315 ;; Use icecat as XULRUNNER
316 (("^for search ")
317 (string-append "XULRUNNER=" (which "icecat") "\n"
318 "for search ")))
319 #t)))))
320 (inputs
321 `(("icecat" ,icecat)))
1e41bb1b 322 (home-page "https://stesie.github.io/geierlein/")
cb0866c3
HG
323 (synopsis "Free Elster client, for sending Germany VAT declarations")
324 (description
325 "Geierlein is a free Elster client, i.e. an application that
326allows to send VAT declarations to Germany's fiscal authorities.
327
328Currently it is *not* possible to send returns that are due annually
329(especially the income tax return) since the fiscal authority doesn't
330allow to do that off the ERiC library (which is proprietary however).
331It's not clear at the moment whether one day it will be possible to
332do so.")
333 (license license:agpl3+)))
9475fd92
CZ
334
335(define-public electrum
336 (package
337 (name "electrum")
307603dd 338 (version "3.3.4")
9475fd92
CZ
339 (source
340 (origin
341 (method url-fetch)
342 (uri (string-append "https://download.electrum.org/"
343 version "/Electrum-"
344 version ".tar.gz"))
345 (sha256
346 (base32
307603dd 347 "0h128wklz5qwx5zqzbd48x46kxjxs12wcna9lhak70y5pj2hw8rg"))
9475fd92
CZ
348 (modules '((guix build utils)))
349 (snippet
350 '(begin
351 ;; Delete the bundled dependencies.
352 (delete-file-recursively "packages")
353 #t))))
354 (build-system python-build-system)
355 (inputs
47bd32d9
CZ
356 `(("python-pyaes" ,python-pyaes)
357 ("python-pysocks" ,python-pysocks)
358 ("python-sip" ,python-sip)
359 ("python-pyqt" ,python-pyqt)
360 ("python-ecdsa" ,python-ecdsa)
361 ("python-pbkdf2" ,python-pbkdf2)
362 ("python-requests" ,python-requests)
363 ("python-qrcode" ,python-qrcode)
364 ("python-protobuf" ,python-protobuf)
81d59f44
VC
365 ("python-aiohttp" ,python-aiohttp)
366 ("python-aiohttp-socks" ,python-aiohttp-socks)
367 ("python-aiorpcx" ,python-aiorpcx)
368 ("python-certifi" ,python-certifi)
47bd32d9
CZ
369 ("python-dnspython" ,python-dnspython)
370 ("python-jsonrpclib-pelix" ,python-jsonrpclib-pelix)))
9475fd92 371 (arguments
47bd32d9 372 `(#:tests? #f ;; package doesn't have any tests
9475fd92
CZ
373 #:phases
374 (modify-phases %standard-phases
375 (add-before 'build 'patch-home
376 (lambda* (#:key outputs #:allow-other-keys)
377 (substitute* "setup.py"
378 (("~/.local/share")
379 (string-append (assoc-ref outputs "out") "/local/share"))))))))
380 (home-page "https://electrum.org/")
381 (synopsis "Bitcoin wallet")
382 (description
383 "Electrum is a lightweight Bitcoin client, based on a client-server
384protocol. It supports Simple Payment Verification (SPV) and deterministic key
385generation from a seed. Your secret keys are encrypted and are never sent to
386other machines/servers. Electrum does not download the Bitcoin blockchain.")
387 (license license:expat)))
8514662b 388
a0bb0217
VC
389(define-public electron-cash
390 (package
391 (inherit electrum)
392 (name "electron-cash")
01d8a2a3 393 (version "3.3.6")
a0bb0217
VC
394 (source
395 (origin
396 (method url-fetch)
397 (uri (string-append "https://electroncash.org/downloads/"
398 version
4e86e9d7 399 "/win-linux/Electron-Cash-"
a0bb0217
VC
400 version
401 ".tar.gz"))
402 (sha256
403 (base32
01d8a2a3 404 "110apc376wm4yd9ghpffiipwdn8rzyr3z7ncpp2516wbz4mmyhxc"))
a0bb0217
VC
405 (modules '((guix build utils)))
406 (snippet
407 '(begin
408 ;; Delete the bundled dependencies.
409 (delete-file-recursively "packages")
410 #t))))
411 (home-page "https://electroncash.org/")
412 (synopsis "Bitcoin Cash wallet")
413 (description
414 "Electroncash is a lightweight Bitcoin Cash client, based on a client-server
415protocol. It supports Simple Payment Verification (SPV) and deterministic key
416generation from a seed. Your secret keys are encrypted and are never sent to
417other machines/servers. Electroncash does not download the Bitcoin Cash blockchain.")
418 (license license:expat)))
419
8514662b
TF
420(define-public monero
421 ;; This package bundles easylogging++ and lmdb.
422 ;; The bundled easylogging++ is modified, and the changes will not be upstreamed.
423 ;; The devs deem the lmdb driver too critical a consenus component, to use
424 ;; the system's dynamically linked library.
425 (package
426 (name "monero")
0a551443 427 (version "0.12.3.0")
8514662b
TF
428 (source
429 (origin
0a551443
TF
430 (method git-fetch)
431 (uri (git-reference
432 (url "https://github.com/monero-project/monero")
433 (commit (string-append "v" version))))
136ff9a2 434 (file-name (git-file-name name version))
0a551443 435 (patches (search-patches "monero-use-system-miniupnpc.patch"))
8514662b
TF
436 (sha256
437 (base32
0a551443 438 "14db9kgjm2ha93c2x5fjdw01xaqshn756qr3x2cnzyyjh7caz5qd"))))
8514662b
TF
439 (build-system cmake-build-system)
440 (native-inputs
441 `(("doxygen" ,doxygen)
442 ("googletest" ,googletest)
443 ("graphviz" ,graphviz)
444 ("pkg-config" ,pkg-config)))
445 (inputs
446 `(("bind" ,isc-bind)
447 ("boost" ,boost)
0a551443
TF
448 ("zeromq" ,zeromq)
449 ("cppzmq" ,cppzmq)
8514662b 450 ("expat" ,expat)
0a551443 451 ("libsodium" ,libsodium)
8514662b
TF
452 ("libunwind" ,libunwind)
453 ("lmdb" ,lmdb)
0a551443 454 ("miniupnpc" ,monero-miniupnpc)
8514662b
TF
455 ("openssl" ,openssl)
456 ("rapidjson" ,rapidjson)
457 ("unbound" ,unbound)))
458 (arguments
459 `(#:out-of-source? #t
0a551443 460 #:build-type "release"
8514662b 461 #:configure-flags '("-DBUILD_TESTS=ON"
fa7647c6
EF
462 ,@(if (string=? "aarch64-linux" (%current-system))
463 '("-DARCH=armv8-a")
464 '())
8514662b
TF
465 "-DBUILD_GUI_DEPS=ON")
466 #:phases
467 (modify-phases %standard-phases
468 ;; tests/core_tests need a valid HOME
469 (add-before 'configure 'set-home
470 (lambda _
471 (setenv "HOME" (getcwd))
472 #t))
473 (add-after 'set-home 'fix-wallet-path-for-unit-tests
474 (lambda _
475 (substitute* "tests/unit_tests/serialization.cpp"
476 (("\\.\\./\\.\\./\\.\\./\\.\\./") "../../"))
477 #t))
478 (add-after 'fix-wallet-path-for-unit-tests 'change-log-path
479 (lambda _
480 (substitute* "contrib/epee/src/mlog.cpp"
481 (("epee::string_tools::get_current_module_folder\\(\\)")
482 "\".bitmonero\""))
483 (substitute* "contrib/epee/src/mlog.cpp"
484 (("return \\(") "return ((std::string(getenv(\"HOME\"))) / "))
485 #t))
486 (replace 'check
487 (lambda _
797445be
TF
488 (invoke "make" "ARGS=-E 'unit_tests|libwallet_api_tests'"
489 "test")))
8514662b
TF
490 ;; The excluded unit tests need network access
491 (add-after 'check 'unit-tests
492 (lambda _
493 (let ((excluded-unit-tests
494 (string-join
495 '("AddressFromURL.Success"
496 "AddressFromURL.Failure"
497 "DNSResolver.IPv4Success"
498 "DNSResolver.DNSSECSuccess"
499 "DNSResolver.DNSSECFailure"
500 "DNSResolver.GetTXTRecord")
501 ":")))
797445be
TF
502 (invoke "tests/unit_tests/unit_tests"
503 (string-append "--gtest_filter=-"
504 excluded-unit-tests)))))
8514662b
TF
505 (add-after 'install 'install-blockchain-import-export
506 (lambda* (#:key outputs #:allow-other-keys)
507 (let* ((out (assoc-ref outputs "out"))
508 (bin (string-append out "/bin")))
509 (install-file "bin/monero-blockchain-import" bin)
510 (install-file "bin/monero-blockchain-export" bin)))))))
511 (home-page "https://getmonero.org/")
512 (synopsis "Command-line interface to the Monero currency")
513 (description
514 "Monero is a secure, private, untraceable currency. This package provides the
515Monero command line client and daemon.")
516 (license license:bsd-3)))
79228a52 517
f7e24839 518(define-public monero-gui
79228a52 519 (package
f7e24839 520 (name "monero-gui")
3902bc5c 521 (version "0.12.2.0")
79228a52
TF
522 (source
523 (origin
3902bc5c
TF
524 (method git-fetch)
525 (uri (git-reference
f7e24839 526 (url "https://github.com/monero-project/monero-gui")
3902bc5c 527 (commit (string-append "v" version))))
398a96a2 528 (file-name (git-file-name name version))
79228a52
TF
529 (sha256
530 (base32
3902bc5c 531 "1cnrkwh7kp64lnzz1xfmkf1mhsgm5gls292gpqai3jr8jydpkahl"))))
79228a52
TF
532 (build-system gnu-build-system)
533 (native-inputs
534 `(("doxygen" ,doxygen)
535 ("graphviz" ,graphviz)
6915d20f
EF
536 ("pkg-config" ,pkg-config)
537 ("qttools" ,qttools)))
79228a52
TF
538 (inputs
539 `(("boost" ,boost)
540 ("libunwind" ,libunwind)
541 ("openssl" ,openssl)
6915d20f
EF
542 ("qtbase" ,qtbase)
543 ("qtdeclarative" ,qtdeclarative)
544 ("qtgraphicaleffects" ,qtgraphicaleffects)
545 ("qtquickcontrols" ,qtquickcontrols)
1d0865c1 546 ("readline" ,readline)
79228a52
TF
547 ("unbound" ,unbound)))
548 (propagated-inputs
549 `(("monero" ,monero)))
550 (arguments
551 `(#:phases
552 (modify-phases %standard-phases
553 (delete 'configure)
554 (delete 'check)
555 (add-before 'build 'fix-makefile-vars
556 (lambda _
557 (substitute* "src/zxcvbn-c/makefile"
558 (("\\?=") "="))
559 #t))
560 (add-after 'fix-makefile-vars 'fix-library-paths
561 (lambda* (#:key inputs #:allow-other-keys)
562 (substitute* "monero-wallet-gui.pro"
563 (("-L/usr/local/lib") "")
564 (("-L/usr/local/opt/openssl/lib")
565 (string-append "-L"
566 (assoc-ref inputs "openssl")
567 "/lib"))
568 (("-L/usr/local/opt/boost/lib")
569 (string-append "-L"
570 (assoc-ref inputs "boost")
571 "/lib")))
572 #t))
573 (add-after 'fix-library-paths 'fix-monerod-path
574 (lambda* (#:key inputs #:allow-other-keys)
575 (substitute* "src/daemon/DaemonManager.cpp"
576 (("QApplication::applicationDirPath\\(\\) \\+ \"/monerod")
577 (string-append "\""(assoc-ref inputs "monero")
578 "/bin/monerod")))
579 #t))
6915d20f
EF
580 (add-after 'fix-monerod-path 'fix-qt-paths
581 (lambda* (#:key inputs #:allow-other-keys)
582 (let* ((qttools (assoc-ref inputs "qttools"))
583 (lrelease (string-append qttools "/bin/lrelease"))
584 (lupdate (string-append qttools "/bin/lupdate")))
585 (substitute* "monero-wallet-gui.pro"
586 (("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease") lrelease)
587 (("\\$\\$\\[QT_INSTALL_BINS\\]/lupdate") lupdate))
588 #t)))
79228a52
TF
589 (replace 'build
590 (lambda _
88d5ee44 591 (invoke "./build.sh")))
79228a52
TF
592 (add-after 'build 'fix-install-path
593 (lambda* (#:key outputs #:allow-other-keys)
594 (substitute* "build/Makefile"
595 (("/opt/monero-wallet-gui")
596 (assoc-ref outputs "out")))
597 #t))
598 (add-before 'install 'change-dir
599 (lambda _
6915d20f
EF
600 (chdir "build")))
601 (add-after 'install 'wrap-executable
602 (lambda* (#:key inputs outputs #:allow-other-keys)
603 (let ((out (assoc-ref outputs "out")))
604 (wrap-program (string-append out "/bin/monero-wallet-gui")
605 `("QT_PLUGIN_PATH" ":" prefix
606 ,(map (lambda (label)
607 (string-append (assoc-ref inputs label)
608 "/lib/qt5/plugins"))
609 '("qtbase" "qtdeclarative")))
610 `("QML2_IMPORT_PATH" ":" prefix
611 ,(map (lambda (label)
612 (string-append (assoc-ref inputs label)
613 "/lib/qt5/qml"))
614 '("qtdeclarative" "qtgraphicaleffects"
615 "qtquickcontrols"))))
616 #t))))))
79228a52
TF
617 (home-page "https://getmonero.org/")
618 (synopsis "Graphical user interface for the Monero currency")
619 (description
620 "Monero is a secure, private, untraceable currency. This package provides the
621Monero GUI client.")
622 (license license:bsd-3)))
00d3f022 623
f7e24839
TF
624(define-public monero-core
625 (deprecated-package "monero-core" monero-gui))
626
00d3f022
DM
627(define-public python-trezor-agent
628 (package
629 (name "python-trezor-agent")
df724c9c 630 (version "0.13.0")
00d3f022
DM
631 (source
632 (origin
39a7b720
TGR
633 (method git-fetch)
634 (uri (git-reference
635 (url "https://github.com/romanz/trezor-agent.git")
636 (commit (string-append "v" version))))
637 (file-name (git-file-name name version))
00d3f022 638 (sha256
df724c9c 639 (base32 "0i4igkxi8fwdlbhg6nx27lhnc9v9nmrw4j5fvpnc202n6yjlc7x7"))))
00d3f022
DM
640 (build-system python-build-system)
641 (arguments
642 `(#:phases
643 (modify-phases %standard-phases
df724c9c
VC
644 (add-after 'unpack 'remove-requires-backports-shutil-which
645 ;; Remove requires on backport of shutil_which, as python 3.4+ has
646 ;; a built-in implementation supported in python-trezor-agent.
647 (lambda _
648 (substitute* "setup.py"
649 (("'backports.shutil_which>=3.5.1',") ""))
650 #t))
00d3f022
DM
651 (delete 'check)
652 (add-after 'install 'check
653 (lambda* (#:key outputs inputs #:allow-other-keys)
39a7b720 654 ;; Make installed package available for running the tests.
00d3f022
DM
655 (add-installed-pythonpath inputs outputs)
656 (invoke "py.test"))))))
657 (propagated-inputs
df724c9c
VC
658 `(("python-configargparse" ,python-configargparse)
659 ("python-daemon" ,python-daemon)
660 ("python-docutils" ,python-docutils)
661 ("python-ecdsa" ,python-ecdsa)
00d3f022 662 ("python-ed25519" ,python-ed25519)
df724c9c
VC
663 ("python-mnemonic" ,python-mnemonic)
664 ("python-pymsgbox" ,python-pymsgbox)
00d3f022 665 ("python-semver" ,python-semver)
df724c9c
VC
666 ("python-unidecode" ,python-unidecode)
667 ("python-wheel" ,python-wheel)))
00d3f022 668 (native-inputs
df724c9c
VC
669 `(("gnupg" ,gnupg)
670 ("python-mock" ,python-mock)
00d3f022
DM
671 ("python-pytest" ,python-pytest)))
672 (home-page "https://github.com/romanz/trezor-agent")
df724c9c 673 (synopsis "Use hardware wallets as SSH and GPG agent")
00d3f022
DM
674 (description
675 "@code{libagent} is a library that allows using TREZOR, Keepkey and
676Ledger Nano as a hardware SSH/GPG agent.")
677 (license license:lgpl3)))
678
679(define-public python2-trezor-agent
680 (package-with-python2 python-trezor-agent))
6e9749ef
DM
681
682(define-public python-mnemonic
683 (package
684 (name "python-mnemonic")
685 (version "0.18")
686 (source
687 (origin
688 (method url-fetch)
689 (uri (pypi-uri "mnemonic" version))
690 (sha256
691 (base32
692 "07bzfa5di6nv5xwwcwbypnflpj50wlfczhh6q6hg8w13g5m319q2"))))
693 (build-system python-build-system)
694 (propagated-inputs
695 `(("python-pbkdf2" ,python-pbkdf2)))
696 (home-page "https://github.com/trezor/python-mnemonic")
697 (synopsis "Implementation of Bitcoin BIP-0039")
698 (description "@code{mnemonic} is a library that provides an implementation
699of Bitcoin BIP-0039.")
700 (license license:expat)))
701
702(define-public python2-mnemonic
703 (package-with-python2 python-mnemonic))
96f5e2e9
DM
704
705(define-public python-ledgerblue
706 (package
707 (name "python-ledgerblue")
708 (version "0.1.16")
709 (source
710 (origin
711 (method url-fetch)
712 (uri (pypi-uri "ledgerblue" version))
713 (sha256
714 (base32
715 "010mghaqh1cmz3a0ifc3f40mmyplilwlw7kpha2mzyrrff46p9gb"))))
716 (build-system python-build-system)
717 (propagated-inputs
718 `(("python-ecpy" ,python-ecpy)
719 ("python-future" ,python-future)
720 ("python-hidapi" ,python-hidapi)
721 ("python-pillow" ,python-pillow)
722 ("python-protobuf" ,python-protobuf)
723 ("python-pycrypto" ,python-pycrypto)))
724 (home-page "https://github.com/LedgerHQ/blue-loader-python")
725 (synopsis "Python library to communicate with Ledger Blue/Nano S")
726 (description "@code{ledgerblue} is a Python library to communicate with
727Ledger Blue/Nano S.")
728 (license license:asl2.0)))
729
730(define-public python2-ledgerblue
731 (package-with-python2 python-ledgerblue))
732
1dca32e3
DM
733(define-public python-trezor
734 (package
735 (name "python-trezor")
4df33c32 736 (version "0.11.2")
1dca32e3
DM
737 (source
738 (origin
739 (method url-fetch)
740 (uri (pypi-uri "trezor" version))
741 (sha256
742 (base32
4df33c32 743 "1f0zfki12mnhidkfxpx2lpq1xim8f35i2d64bx9lf4m26xxv9x56"))))
1dca32e3 744 (build-system python-build-system)
b4c698c8
VC
745 (arguments
746 `(#:phases
747 (modify-phases %standard-phases
748 ;; Default tests run device-specific tests which fail, only run specific tests.
749 (replace 'check
750 (lambda* (#:key inputs outputs #:allow-other-keys)
8c16b8a4
VC
751 ;; Delete tests that require network access.
752 (delete-file "trezorlib/tests/unit_tests/test_tx_api.py")
753 (invoke "python" "-m" "pytest" "--pyarg" "trezorlib.tests.unit_tests"))))))
1dca32e3 754 (propagated-inputs
b4c698c8 755 `(("python-click" ,python-click)
8c16b8a4 756 ("python-construct" ,python-construct)
b4c698c8 757 ("python-ecdsa" ,python-ecdsa)
b4c698c8 758 ("python-libusb1" ,python-libusb1)
1dca32e3 759 ("python-mnemonic" ,python-mnemonic)
b4c698c8
VC
760 ("python-pyblake2" ,python-pyblake2)
761 ("python-requests" ,python-requests)
8c16b8a4 762 ("python-typing-extensions" ,python-typing-extensions)))
1dca32e3 763 (native-inputs
8c16b8a4
VC
764 `(("protobuf" ,protobuf) ; Tests
765 ("python-black" ,python-black) ; Tests
766 ("python-protobuf" ,python-protobuf) ; Tests
767 ("python-isort" ,python-isort) ; Tests
b4c698c8
VC
768 ("python-pyqt" ,python-pyqt) ; Tests
769 ("python-pytest" ,python-pytest))) ; Tests
1dca32e3
DM
770 (home-page "https://github.com/trezor/python-trezor")
771 (synopsis "Python library for communicating with TREZOR Hardware Wallet")
772 (description "@code{trezor} is a Python library for communicating with
773TREZOR Hardware Wallet.")
774 (license license:lgpl3)))
775
776(define-public python2-trezor
777 (package-with-python2 python-trezor))
d596fea5 778
d6ddeffc
DM
779(define-public python-keepkey
780 (package
781 (name "python-keepkey")
52311b51 782 (version "6.0.3")
d6ddeffc
DM
783 (source
784 (origin
785 (method url-fetch)
786 (uri (pypi-uri "keepkey" version))
787 (sha256
788 (base32
52311b51 789 "0z3d0m6364v9dv0njs4cd5m5ai6j6v35xaaxfxl90m9vmyxy81vd"))))
d6ddeffc
DM
790 (build-system python-build-system)
791 (arguments
792 `(#:phases
793 (modify-phases %standard-phases
794 (delete 'check)
795 (add-after 'install 'check
796 (lambda* (#:key inputs outputs #:allow-other-keys)
797 (add-installed-pythonpath inputs outputs)
798 (apply invoke "python" (find-files "tests/unit" "\\.py$")))))))
799 (propagated-inputs
800 `(("python-ecdsa" ,python-ecdsa)
801 ("python-hidapi" ,python-hidapi)
02d9e5d2 802 ("python-libusb1" ,python-libusb1)
d6ddeffc
DM
803 ("python-mnemonic" ,python-mnemonic)
804 ("python-protobuf" ,python-protobuf)))
805 (home-page "https://github.com/keepkey/python-keepkey")
806 (synopsis "Python library for communicating with KeepKey Hardware Wallet")
807 (description "@code{keepkey} is a Python library for communicating with
808the KeepKey Hardware Wallet.")
809 (license license:lgpl3)))
810
811(define-public python2-keepkey
812 (package-with-python2 python-keepkey))
813
d596fea5
DM
814(define-public ledger-agent
815 (package
816 (name "ledger-agent")
817 (version "0.9.0")
818 (source
819 (origin
820 (method url-fetch)
821 (uri (pypi-uri "ledger_agent" version))
822 (sha256
823 (base32
824 "03zj602m2rln9yvr08dswy56vzkbldp8b074ixwzz525dafblr92"))))
825 (build-system python-build-system)
826 (inputs
827 `(("python-ledgerblue" ,python-ledgerblue)
828 ("python-trezor-agent" ,python-trezor-agent)))
829 (home-page "http://github.com/romanz/trezor-agent")
830 (synopsis "Ledger as hardware SSH/GPG agent")
831 (description "This package allows using Ledger as hardware SSH/GPG agent.
832
5859fd6c
MB
833Usage for SSH: trezor-agent foo@@example.com --connect
834Usage for GPG: Initialize using trezor-gpg init \"Foo <foo@@example.com>\"
d596fea5
DM
835Then set the environment variable GNUPGHOME to
836\"${HOME}/.gnupg/trezor\".")
837 (license license:lgpl3)))
47c8ea99
DM
838
839(define-public trezor-agent
840 (package
841 (name "trezor-agent")
7fafdadd 842 (version "0.10.0")
47c8ea99
DM
843 (source
844 (origin
845 (method url-fetch)
846 (uri (pypi-uri "trezor_agent" version))
847 (sha256
848 (base32
7fafdadd
VC
849 "144657c7bn0a667dq5fv5r6j7iilxf3h9agj29v1m2qpq40g0az8"))))
850 (arguments
851 ;; Tests fail with "AttributeError: module 'attr' has no attribute 's'".
852 `(#:phases
853 (modify-phases %standard-phases
854 (add-after 'wrap 'fixup-agent-py
855 (lambda* (#:key inputs outputs #:allow-other-keys)
856 (let* ((out (assoc-ref outputs "out")))
857 ;; overwrite the wrapper with the real thing.
858 (install-file "./trezor_agent.py"
859 (string-append out "/bin"))
860 #t))))))
47c8ea99
DM
861 (build-system python-build-system)
862 (inputs
863 `(("python-trezor" ,python-trezor)
864 ("python-trezor-agent" ,python-trezor-agent)))
7fafdadd
VC
865 (native-inputs
866 `(("python-hidapi" ,python-hidapi)))
867 (home-page "https://github.com/romanz/trezor-agent")
47c8ea99
DM
868 (synopsis "Using Trezor as hardware SSH/GPG agent")
869 (description "This package allows using Trezor as a hardware SSH/GPG
870agent.")
871 (license license:lgpl3)))
50c4d676
DM
872
873(define-public keepkey-agent
874 (package
875 (name "keepkey-agent")
876 (version "0.9.0")
877 (source
878 (origin
879 (method url-fetch)
880 (uri (pypi-uri "keepkey_agent" version))
881 (sha256
882 (base32
883 "03779gvlx70i0nnry98i4pl1d92604ix5x6jgdfkrdgzqbh5vj27"))))
884 (build-system python-build-system)
885 (inputs
886 `(("python-keepkey" ,python-keepkey)
887 ("python-trezor-agent" ,python-trezor-agent)))
888 (home-page "http://github.com/romanz/trezor-agent")
889 (synopsis "KeepKey as hardware SSH/GPG agent")
890 (description "This package allows using KeepKey as a hardware SSH/GPG
891agent.")
892 (license license:lgpl3)))
3da86c52
AP
893
894(define-public python-stdnum
895 (package
896 (name "python-stdnum")
897 (version "1.8.1")
898 (source
899 (origin
900 (method url-fetch)
901 (uri (pypi-uri "python-stdnum" version))
902 (sha256
903 (base32
904 "0hvr47q32xbyiznpmbg4r8rcvxhnf0lwf33hcpnynyik57djy5np"))))
905 (build-system python-build-system)
906 (home-page
907 "https://arthurdejong.org/python-stdnum/")
908 (synopsis
909 "Python module to handle standardized number and code formats")
910 (description
911 "This is a Python library that aims to provide functions to handle,
912parse and validate standard numbers.
913The module supports more than 100 different number formats
914amongst which a great number of VAT and other tax numbers,
915personal identity and company identification codes,
916international standard numbers (ISBN, IBAN, EAN, etc.)
917and various other formats.
918The module also inclused implementations of the Verhoeff,
919Luhn and family of ISO/IEC 7064 check digit algorithms. ")
920 (license license:lgpl2.1+)))
921
922(define-public python2-stdnum
923 (package-with-python2 python-stdnum))
730553d7 924
c7299015
NG
925(define-public python-duniterpy
926 (package
927 (name "python-duniterpy")
8957ae01 928 (version "0.53.0")
c7299015
NG
929 (source
930 (origin
931 (method git-fetch)
932 ;; Pypi's default URI is missing "requirements.txt" file.
933 (uri (git-reference
7dab3e61 934 (url "https://git.duniter.org/clients/python/duniterpy.git")
c7299015
NG
935 (commit version)))
936 (file-name (git-file-name name version))
937 (sha256
938 (base32
8957ae01 939 "1km585xlv6dm693s5x6apcnx3ixvz08g8yjfclszhy4jakhpv0ya"))))
c7299015 940 (build-system python-build-system)
1427d888
NG
941 (arguments
942 ;; Tests fail with "AttributeError: module 'attr' has no attribute 's'".
42a57df8
NG
943 `(#:tests? #f
944 #:phases
945 (modify-phases %standard-phases
946 (add-after 'build 'build-documentation
947 (lambda _
948 (invoke "make" "docs")))
949 (add-after 'build-documentation 'install-documentation
950 (lambda* (#:key inputs outputs #:allow-other-keys)
951 (let* ((out (assoc-ref outputs "out"))
952 (doc (string-append out "/share/doc/" ,name)))
953 (mkdir-p doc)
954 (copy-recursively "docs/_build/html" doc))
955 #t)))))
956 (native-inputs
352033f3
NG
957 `(("sphinx" ,python-sphinx)
958 ("sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
c7299015 959 (propagated-inputs
352033f3
NG
960 `(("aiohttp" ,python-aiohttp)
961 ("attr" ,python-attr)
962 ("base58" ,python-base58)
963 ("jsonschema" ,python-jsonschema)
964 ("libnacl" ,python-libnacl)
965 ("pyaes" ,python-pyaes)
966 ("pylibscrypt" ,python-pylibscrypt)
967 ("pypeg2" ,python-pypeg2)))
9f1a2be2 968 (home-page "https://git.duniter.org/clients/python/duniterpy")
c7299015
NG
969 (synopsis "Python implementation of Duniter API")
970 (description "@code{duniterpy} is an implementation of
207a79b2 971@uref{https://github.com/duniter/duniter/, duniter} API. Its
c7299015
NG
972main features are:
973@itemize
207a79b2
NG
974@item Support Duniter's Basic Merkle API and protocol
975@item Asynchronous/synchronous without threads
976@item Support HTTP, HTTPS and Web Socket transport for Basic Merkle API
977@item Support Elasticsearch Duniter4j API
c7299015 978@item Duniter signing key
207a79b2 979@item Sign/verify and encrypt/decrypt messages with the Duniter credentials
c7299015
NG
980@end itemize")
981 (license license:gpl3+)))
982
730553d7
NG
983(define-public silkaj
984 (package
985 (name "silkaj")
c14b3a8d 986 (version "0.6.5")
730553d7
NG
987 (source
988 (origin
989 (method git-fetch)
990 (uri (git-reference
991 (url "https://git.duniter.org/clients/python/silkaj.git")
992 (commit (string-append "v" version))))
993 (file-name (git-file-name name version))
994 (sha256
995 (base32
c14b3a8d 996 "1fy509vsmz7rs9m3vah0ky0jvq9mxmfga6b18rkrkl2lbjk872q2"))))
730553d7
NG
997 (build-system python-build-system)
998 (arguments
e627052f 999 `(#:tests? #f)) ;no test
730553d7 1000 (inputs
c14b3a8d
NG
1001 `(("click" ,python-click)
1002 ("duniterpy" ,python-duniterpy)
1003 ("ipaddress" ,python-ipaddress)
1004 ("pynacl" ,python-pynacl)
1005 ("tabulate" ,python-tabulate)))
730553d7
NG
1006 (home-page "https://silkaj.duniter.org/")
1007 (synopsis "Command line client for Duniter network")
1008 (description "@code{Silkaj} is a command line client for the
1009@uref{https://github.com/duniter/duniter/, Duniter} network.
1010
1011Its features are:
1012@itemize
1013@item information about currency,
1014@item issuers difficulty to generate next block,
1015@item network view of nodes,
1016@item list of last issuers,
1017@item send transactions,
1018@item get account amount.
1019@end itemize")
1020 (license license:agpl3+)))