gnu: mate-session-manager: Actually build with elogind support.
[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>
c1d79b49 12;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
948e888d 13;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
230e5db7 14;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
90bb244f 15;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
01b37d0f 16;;; Copyright © 2019 Martin Becze <mjbecze@riseup.net>
66b707a7 17;;; Copyright © 2019 Sebastian Schott <sschott@mailbox.org>
63ca1a89 18;;; Copyright © 2020 Kei Kebreau <kkebreau@posteo.net>
20c6b9da
AE
19;;;
20;;; This file is part of GNU Guix.
21;;;
22;;; GNU Guix is free software; you can redistribute it and/or modify it
23;;; under the terms of the GNU General Public License as published by
24;;; the Free Software Foundation; either version 3 of the License, or (at
25;;; your option) any later version.
26;;;
27;;; GNU Guix is distributed in the hope that it will be useful, but
28;;; WITHOUT ANY WARRANTY; without even the implied warranty of
29;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30;;; GNU General Public License for more details.
31;;;
32;;; You should have received a copy of the GNU General Public License
33;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
34
35(define-module (gnu packages finance)
fa4f95a7
CB
36 #:use-module ((guix licenses) #:prefix license:)
37 #:use-module (guix packages)
38 #:use-module (guix download)
730553d7 39 #:use-module (guix git-download)
fa4f95a7
CB
40 #:use-module (guix build-system gnu)
41 #:use-module (guix build-system cmake)
42 #:use-module (guix build-system python)
90bb244f 43 #:use-module (guix build-system glib-or-gtk)
01b37d0f 44 #:use-module (guix build-system go)
230e5db7 45 #:use-module (guix build-system qt)
90bb244f 46 #:use-module (guix utils)
5424f9bc 47 #:use-module (gnu packages)
054ff198
GLV
48 #:use-module (gnu packages aidc)
49 #:use-module (gnu packages autotools)
fa4f95a7
CB
50 #:use-module (gnu packages base)
51 #:use-module (gnu packages boost)
52 #:use-module (gnu packages check)
fc54da1d 53 #:use-module (gnu packages compression)
0a551443 54 #:use-module (gnu packages crypto)
952fe2da 55 #:use-module (gnu packages curl)
fa4f95a7 56 #:use-module (gnu packages databases)
63ca1a89 57 #:use-module (gnu packages docbook)
fa4f95a7
CB
58 #:use-module (gnu packages documentation)
59 #:use-module (gnu packages dns)
60 #:use-module (gnu packages emacs)
255d1bbe 61 #:use-module (gnu packages dbm)
63ca1a89 62 #:use-module (gnu packages gettext)
90bb244f
TLC
63 #:use-module (gnu packages gnome)
64 #:use-module (gnu packages glib)
df724c9c 65 #:use-module (gnu packages gnupg)
fa4f95a7
CB
66 #:use-module (gnu packages graphviz)
67 #:use-module (gnu packages groff)
90bb244f 68 #:use-module (gnu packages gtk)
fa4f95a7
CB
69 #:use-module (gnu packages libedit)
70 #:use-module (gnu packages libevent)
71 #:use-module (gnu packages libunwind)
96f5e2e9 72 #:use-module (gnu packages libusb)
fa4f95a7 73 #:use-module (gnu packages linux)
952fe2da 74 #:use-module (gnu packages man)
fa4f95a7 75 #:use-module (gnu packages multiprecision)
0a551443 76 #:use-module (gnu packages networking)
fa4f95a7 77 #:use-module (gnu packages pkg-config)
952fe2da 78 #:use-module (gnu packages popt)
fa4f95a7
CB
79 #:use-module (gnu packages protobuf)
80 #:use-module (gnu packages python)
cc6f4912 81 #:use-module (gnu packages python-crypto)
589e3f4e 82 #:use-module (gnu packages python-web)
44d10b1f 83 #:use-module (gnu packages python-xyz)
fa4f95a7 84 #:use-module (gnu packages qt)
1d0865c1 85 #:use-module (gnu packages readline)
9d0c291e 86 #:use-module (gnu packages sphinx)
fa4f95a7
CB
87 #:use-module (gnu packages texinfo)
88 #:use-module (gnu packages textutils)
1ea8b3b1 89 #:use-module (gnu packages time)
fa4f95a7
CB
90 #:use-module (gnu packages tls)
91 #:use-module (gnu packages upnp)
fc54da1d 92 #:use-module (gnu packages version-control)
fa4f95a7
CB
93 #:use-module (gnu packages web)
94 #:use-module (gnu packages xml)
95 #:use-module (gnu packages gnuzilla))
20c6b9da
AE
96
97(define-public bitcoin-core
98 (package
99 (name "bitcoin-core")
90799c35 100 (version "0.19.1")
20c6b9da
AE
101 (source (origin
102 (method url-fetch)
103 (uri
0a59cc6e 104 (string-append "https://bitcoincore.org/bin/bitcoin-core-"
14ea30e4 105 version "/bitcoin-" version ".tar.gz"))
20c6b9da
AE
106 (sha256
107 (base32
90799c35 108 "1h3w7brc18145np920vy7j5ms5hym59hvr40swdjx34fbdaisngj"))))
20c6b9da
AE
109 (build-system gnu-build-system)
110 (native-inputs
111 `(("pkg-config" ,pkg-config)
1219a7cc
TGR
112 ("python" ,python) ; for the tests
113 ("util-linux" ,util-linux) ; provides the hexdump command for tests
0193812a 114 ("qttools" ,qttools)))
20c6b9da 115 (inputs
1219a7cc 116 `(("bdb" ,bdb-4.8) ; 4.8 required for compatibility
20c6b9da 117 ("boost" ,boost)
14ea30e4 118 ("libevent" ,libevent)
20c6b9da
AE
119 ("miniupnpc" ,miniupnpc)
120 ("openssl" ,openssl)
121 ("protobuf" ,protobuf)
0193812a 122 ("qtbase" ,qtbase)))
20c6b9da
AE
123 (arguments
124 `(#:configure-flags
125 (list
20c6b9da
AE
126 ;; Boost is not found unless specified manually.
127 (string-append "--with-boost="
0193812a
MB
128 (assoc-ref %build-inputs "boost"))
129 ;; XXX: The configure script looks up Qt paths by
130 ;; `pkg-config --variable=host_bins Qt5Core`, which fails to pick
131 ;; up executables residing in 'qttools', so we specify them here.
132 (string-append "ac_cv_path_LRELEASE="
133 (assoc-ref %build-inputs "qttools")
134 "/bin/lrelease")
135 (string-append "ac_cv_path_LUPDATE="
136 (assoc-ref %build-inputs "qttools")
137 "/bin/lupdate"))
20c6b9da
AE
138 #:phases
139 (modify-phases %standard-phases
99629e5a
CD
140 (add-before 'configure 'make-qt-deterministic
141 (lambda _
142 ;; Make Qt deterministic.
143 (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")
144 #t))
20c6b9da
AE
145 (add-before 'check 'set-home
146 (lambda _
1219a7cc 147 (setenv "HOME" (getenv "TMPDIR")) ; tests write to $HOME
bcfc54ff
CD
148 #t))
149 (add-after 'check 'check-functional
150 (lambda _
151 (invoke "python3" "./test/functional/test_runner.py"
152 (string-append "--jobs=" (number->string (parallel-job-count))))
0e9600cb 153 #t)))))
20c6b9da
AE
154 (home-page "https://bitcoin.org/en/")
155 (synopsis "Bitcoin peer-to-peer client")
156 (description
157 "Bitcoin is a digital currency that enables instant payments to anyone
158anywhere in the world. It uses peer-to-peer technology to operate without
159central authority: managing transactions and issuing money are carried out
160collectively by the network. Bitcoin Core is the reference implementation
161of the bitcoin protocol. This package provides the Bitcoin Core command
162line client and a client based on Qt.")
163 (license license:expat)))
d3699b31 164
66b707a7
SS
165(define-public homebank
166 (package
167 (name "homebank")
168 (version "5.2.8")
169 (source (origin
170 (method url-fetch)
171 (uri (string-append "http://homebank.free.fr/public/homebank-"
172 version ".tar.gz"))
173 (sha256
174 (base32
175 "13ampiv68y30kc0p2560g3yz8whqpwnidfcnb9lndv93b9ca767y"))))
176 (build-system glib-or-gtk-build-system)
177 (native-inputs
178 `(("pkg-config" ,pkg-config)
179 ("intltool" ,intltool)))
180 (inputs
181 `(("gtk+" ,gtk+)
182 ("libsoup" ,libsoup)))
183 (arguments
184 `(#:configure-flags (list "-without-ofx"))) ; libofx is not available yet
185 (home-page "http://homebank.free.fr/")
186 (synopsis "Graphical personal accounting application")
187 (description "HomeBank allows you to manage your personal accounts at
188home. The seeks to be lightweight, simple and easy to use. It brings
189features that allow you to analyze your finances in a detailed way instantly
190and dynamically with report tools based on filtering and graphical charts.")
191 (license license:gpl2+)))
192
d3699b31
AG
193(define-public ledger
194 (package
195 (name "ledger")
9859800f 196 (version "3.1.3")
8b7ac58c
TGR
197 (source
198 (origin
199 (method git-fetch)
200 (uri (git-reference
201 (url "https://github.com/ledger/ledger.git")
202 (commit (string-append "v" version))))
203 (file-name (git-file-name name version))
204 (sha256
9859800f 205 (base32 "0bfnrqrd6wqgsngfpqi30xh6yy86pwl25iwzrqy44q31r0zl4mm3"))))
d3699b31
AG
206 (build-system cmake-build-system)
207 (arguments
f90ed028 208 `(#:configure-flags
d3699b31
AG
209 `("-DBUILD_DOCS:BOOL=ON"
210 "-DBUILD_WEB_DOCS:BOOL=ON"
d3699b31 211 "-DUSE_PYTHON:BOOL=ON"
f90ed028 212 "-DCMAKE_INSTALL_LIBDIR:PATH=lib")
d3699b31
AG
213 #:phases
214 (modify-phases %standard-phases
215 (add-before 'configure 'install-examples
216 (lambda* (#:key outputs #:allow-other-keys)
217 (let ((examples (string-append (assoc-ref outputs "out")
218 "/share/doc/ledger/examples")))
219 (install-file "test/input/sample.dat" examples)
220 (install-file "test/input/demo.ledger" examples))
221 #t))
222 (add-after 'build 'build-doc
1f3c4ba8 223 (lambda _ (invoke "make" "doc")))
d3699b31
AG
224 (add-before 'check 'check-setup
225 ;; One test fails if it can't set the timezone.
226 (lambda* (#:key inputs #:allow-other-keys)
227 (setenv "TZDIR"
228 (string-append (assoc-ref inputs "tzdata")
229 "/share/zoneinfo"))
f90ed028
RW
230 ;; Skip failing test BaselineTest_cmd-org.
231 ;; This is a known upstream issue. See
232 ;; https://github.com/ledger/ledger/issues/550
233 (setenv "ARGS" "-E BaselineTest_cmd-org")
234 #t)))))
d3699b31
AG
235 (inputs
236 `(("boost" ,boost)
237 ("gmp" ,gmp)
238 ("libedit" ,libedit)
239 ("mpfr" ,mpfr)
240 ("python" ,python-2)
241 ("tzdata" ,tzdata)
242 ("utfcpp" ,utfcpp)))
243 (native-inputs
f90ed028 244 `(("groff" ,groff)
d3699b31 245 ("texinfo" ,texinfo)))
b53a0c88 246 (home-page "https://ledger-cli.org/")
d3699b31
AG
247 (synopsis "Command-line double-entry accounting program")
248 (description
249 "Ledger is a powerful, double-entry accounting system that is
250accessed from the UNIX command-line. This may put off some users, since
251there is no flashy UI, but for those who want unparalleled reporting
252access to their data there are few alternatives.
253
254Ledger uses text files for input. It reads the files and generates
255reports; there is no other database or stored state. To use Ledger,
256you create a file of your account names and transactions, run from the
257command line with some options to specify input and requested reports, and
258get output. The output is generally plain text, though you could generate
259a graph or html instead. Ledger is simple in concept, surprisingly rich
260in ability, and easy to use.")
261 ;; There are some extra licenses in files which do not presently get
262 ;; installed when you build this package. Different versions of the GPL
263 ;; are used in the contrib and python subdirectories. The bundled version
264 ;; of utfcpp is under the Boost 1.0 license. Also the file
265 ;; `tools/update_copyright_year` has an Expat license.
266 (license (list license:bsd-3
267 license:asl2.0 ; src/strptime.cc
268 (license:non-copyleft
269 "file://src/wcwidth.cc"
f90ed028 270 "See src/wcwidth.cc in the distribution.")))))
cb0866c3 271
0df201c0
RW
272(define-public emacs-ledger-mode
273 ;; There have been no new releases since 2016.
274 (let ((commit "253a20dc62e137ed0ed8e1dd8614ecba116610ea")
275 (revision "1"))
276 (package
277 (name "emacs-ledger-mode")
278 (version (git-version "3.1.1" revision commit))
279 (source
280 (origin
281 (method git-fetch)
282 (uri (git-reference
283 (url "https://github.com/ledger/ledger-mode.git")
284 (commit commit)))
285 (file-name (git-file-name name version))
286 (sha256
287 (base32 "06wrgkqpgvk17vibrk2qikdlqn8y63jg86marp1wgmram92mb3jk"))))
288 (build-system cmake-build-system)
289 (arguments
290 `(#:modules ((guix build cmake-build-system)
291 (guix build utils)
292 (guix build emacs-utils))
293 #:imported-modules (,@%cmake-build-system-modules
294 (guix build emacs-utils))
295 #:tests? #f ; there are none
296 #:phases
297 (modify-phases %standard-phases
2c50e52a
BG
298 (add-after 'unpack 'patch-site-dir
299 (lambda _
300 (substitute* "CMakeLists.txt"
301 (("DESTINATION share/emacs/site-lisp/ledger-mode")
302 "DESTINATION share/emacs/site-lisp"))
303 #t))
1c0dd730
PN
304 (add-before 'build 'patch-path
305 (lambda* (#:key inputs #:allow-other-keys)
306 (let ((ledger (assoc-ref inputs "ledger")))
307 (make-file-writable "ledger-exec.el")
308 (emacs-substitute-variables "ledger-exec.el"
309 ("ledger-binary-path" (string-append ledger "/bin/ledger"))))
310 #t))
0df201c0
RW
311 (add-after 'build 'build-doc
312 (lambda* (#:key outputs #:allow-other-keys)
313 (let ((target (string-append (assoc-ref outputs "out")
314 "/share/info")))
315 (mkdir-p target)
316 (invoke "makeinfo" "-o" target
317 "../source/doc/ledger-mode.texi"))
318 #t))
2c50e52a 319 (add-after 'install 'generate-autoload
0df201c0
RW
320 (lambda* (#:key outputs #:allow-other-keys)
321 (let* ((site-dir (string-append (assoc-ref outputs "out")
2c50e52a
BG
322 "/share/emacs/site-lisp")))
323 (emacs-generate-autoloads ,name site-dir))
324 #t)))))
1c0dd730
PN
325 (inputs
326 `(("ledger" ,ledger)))
0df201c0
RW
327 (native-inputs
328 `(("emacs-minimal" ,emacs-minimal)
329 ("texinfo" ,texinfo)))
330 (home-page "https://ledger-cli.org/")
331 (synopsis "Command-line double-entry accounting program")
332 (description
333 "Ledger is a powerful, double-entry accounting system that is
334accessed from the UNIX command-line. This may put off some users, since
335there is no flashy UI, but for those who want unparalleled reporting
336access to their data there are few alternatives.
337
338Ledger uses text files for input. It reads the files and generates
339reports; there is no other database or stored state. To use Ledger,
340you create a file of your account names and transactions, run from the
341command line with some options to specify input and requested reports, and
342get output. The output is generally plain text, though you could generate
343a graph or html instead. Ledger is simple in concept, surprisingly rich
344in ability, and easy to use.
345
346This package provides the Emacs mode.")
347 (license license:gpl2+))))
348
cb0866c3
HG
349(define-public geierlein
350 (package
351 (name "geierlein")
1c21e734 352 (version "0.9.13")
cb0866c3
HG
353 (source
354 (origin
1fd71120
TGR
355 (method git-fetch)
356 (uri (git-reference
357 (url "https://github.com/stesie/geierlein.git")
358 (commit (string-append "V" version))))
359 (file-name (git-file-name name version))
cb0866c3 360 (sha256
1fd71120 361 (base32 "00zpwr3lk2vdmd60fgdwdk0xxs52wvnm19ln2m75yfphydvkglic"))))
cb0866c3
HG
362 (build-system gnu-build-system)
363 (arguments
1fd71120 364 `(#:tests? #f ; would require npm, python and a lot more
cb0866c3
HG
365 #:phases
366 (modify-phases %standard-phases
1c21e734 367 (delete 'configure) ; no configure script
cb0866c3
HG
368 (add-after 'unpack 'override-target-directory-and-tool-paths
369 (lambda* (#:key inputs outputs #:allow-other-keys)
370 (substitute* "Makefile"
371 (("prefix := .*")
372 (string-append "prefix := " (assoc-ref outputs "out") "\n"))
373 ;; Required for tests, unused for now:
374 ;;(("PYTHON := .*")
375 ;; (string-append (which "python") "\n")))
376 (("INSTALL := .*")
377 (string-append "INSTALL := " (which "install") "\n")))
378 (substitute* "bin/xgeierlein.in"
379 ;; Use icecat as XULRUNNER
380 (("^for search ")
381 (string-append "XULRUNNER=" (which "icecat") "\n"
382 "for search ")))
383 #t)))))
384 (inputs
385 `(("icecat" ,icecat)))
1e41bb1b 386 (home-page "https://stesie.github.io/geierlein/")
cb0866c3
HG
387 (synopsis "Free Elster client, for sending Germany VAT declarations")
388 (description
389 "Geierlein is a free Elster client, i.e. an application that
390allows to send VAT declarations to Germany's fiscal authorities.
391
392Currently it is *not* possible to send returns that are due annually
393(especially the income tax return) since the fiscal authority doesn't
394allow to do that off the ERiC library (which is proprietary however).
395It's not clear at the moment whether one day it will be possible to
396do so.")
397 (license license:agpl3+)))
9475fd92
CZ
398
399(define-public electrum
400 (package
401 (name "electrum")
fae0a777 402 (version "3.3.8")
9475fd92
CZ
403 (source
404 (origin
405 (method url-fetch)
406 (uri (string-append "https://download.electrum.org/"
407 version "/Electrum-"
408 version ".tar.gz"))
409 (sha256
fae0a777 410 (base32 "1g00cj1pmckd4xis8r032wmraiv3vd3zc803hnyxa2bnhj8z3bg2"))
9475fd92
CZ
411 (modules '((guix build utils)))
412 (snippet
413 '(begin
414 ;; Delete the bundled dependencies.
415 (delete-file-recursively "packages")
416 #t))))
417 (build-system python-build-system)
418 (inputs
47bd32d9
CZ
419 `(("python-pyaes" ,python-pyaes)
420 ("python-pysocks" ,python-pysocks)
421 ("python-sip" ,python-sip)
422 ("python-pyqt" ,python-pyqt)
423 ("python-ecdsa" ,python-ecdsa)
424 ("python-pbkdf2" ,python-pbkdf2)
425 ("python-requests" ,python-requests)
426 ("python-qrcode" ,python-qrcode)
427 ("python-protobuf" ,python-protobuf)
81d59f44
VC
428 ("python-aiohttp" ,python-aiohttp)
429 ("python-aiohttp-socks" ,python-aiohttp-socks)
430 ("python-aiorpcx" ,python-aiorpcx)
431 ("python-certifi" ,python-certifi)
47bd32d9
CZ
432 ("python-dnspython" ,python-dnspython)
433 ("python-jsonrpclib-pelix" ,python-jsonrpclib-pelix)))
9475fd92 434 (arguments
47bd32d9 435 `(#:tests? #f ;; package doesn't have any tests
9475fd92
CZ
436 #:phases
437 (modify-phases %standard-phases
438 (add-before 'build 'patch-home
439 (lambda* (#:key outputs #:allow-other-keys)
440 (substitute* "setup.py"
441 (("~/.local/share")
442 (string-append (assoc-ref outputs "out") "/local/share"))))))))
443 (home-page "https://electrum.org/")
444 (synopsis "Bitcoin wallet")
445 (description
446 "Electrum is a lightweight Bitcoin client, based on a client-server
447protocol. It supports Simple Payment Verification (SPV) and deterministic key
448generation from a seed. Your secret keys are encrypted and are never sent to
449other machines/servers. Electrum does not download the Bitcoin blockchain.")
450 (license license:expat)))
8514662b 451
a0bb0217
VC
452(define-public electron-cash
453 (package
a0bb0217 454 (name "electron-cash")
620c7564 455 (version "4.0.14")
a0bb0217
VC
456 (source
457 (origin
d08c3e51
VC
458 (method git-fetch)
459 (uri (git-reference
460 (url "https://github.com/Electron-Cash/Electron-Cash.git")
461 (commit version)))
462 (file-name (git-file-name name version))
a0bb0217 463 (sha256
620c7564 464 (base32 "1dp7cj1185h6xfz6jzh0iq58zvg3wq9hl96bkgxkf5h4ygni2vm6"))))
e6a0cd9a 465 (build-system python-build-system)
1ea8b3b1 466 (inputs
e6a0cd9a 467 `(("libevent" ,libevent)
d08c3e51 468 ("libsecp256k1", libsecp256k1)
e6a0cd9a
GLV
469 ("openssl" ,openssl)
470 ("python-cython" ,python-cython)
1ea8b3b1 471 ("python-dateutil", python-dateutil)
e6a0cd9a
GLV
472 ("python-dnspython" ,python-dnspython)
473 ("python-ecdsa" ,python-ecdsa)
474 ("python-hidapi" ,python-hidapi)
475 ("python-jsonrpclib-pelix" ,python-jsonrpclib-pelix)
476 ("python-keepkey" ,python-keepkey)
477 ("python-protobuf" ,python-protobuf)
478 ("python-pyaes" ,python-pyaes)
479 ("python-pyqt" ,python-pyqt)
480 ("python-pysocks" ,python-pysocks)
481 ("python-qrcode" ,python-qrcode)
482 ("python-requests" ,python-requests)
483 ("python-stem" ,python-stem)
484 ("python-trezor" ,python-trezor)
485 ("qtsvg" ,qtsvg)
486 ("zlib" ,zlib)))
d08c3e51 487 (arguments
e6a0cd9a
GLV
488 `(#:tests? #f ; No tests
489 #:modules ((guix build python-build-system)
490 (guix build qt-utils)
491 (guix build utils))
492 #:imported-modules (,@%python-build-system-modules
493 (guix build qt-utils))
494 #:phases
495 (modify-phases %standard-phases
496 (add-after 'unpack 'patch-home
497 (lambda* (#:key outputs #:allow-other-keys)
498 (substitute* "setup.py"
499 (("~/.local/share")
500 (string-append (assoc-ref outputs "out") "/local/share")))))
501 (add-after 'unpack 'use-libsecp256k1-input
502 (lambda* (#:key inputs #:allow-other-keys)
503 (substitute* "lib/secp256k1.py"
504 (("library_paths = .* 'libsecp256k1.so.0'.")
505 (string-append "library_paths = ('" (assoc-ref inputs "libsecp256k1") "/lib/libsecp256k1.so.0'")))))
506 (add-after 'install 'wrap-qt
507 (lambda* (#:key outputs #:allow-other-keys)
508 (wrap-qt-program (assoc-ref outputs "out") "electron-cash")
509 #t)))))
a0bb0217
VC
510 (home-page "https://electroncash.org/")
511 (synopsis "Bitcoin Cash wallet")
512 (description
513 "Electroncash is a lightweight Bitcoin Cash client, based on a client-server
514protocol. It supports Simple Payment Verification (SPV) and deterministic key
515generation from a seed. Your secret keys are encrypted and are never sent to
516other machines/servers. Electroncash does not download the Bitcoin Cash blockchain.")
517 (license license:expat)))
518
8514662b
TF
519(define-public monero
520 ;; This package bundles easylogging++ and lmdb.
fc54da1d
GLV
521 ;; The bundled easylogging++ is modified, and the changes will not be
522 ;; upstreamed.
8514662b
TF
523 ;; The devs deem the lmdb driver too critical a consenus component, to use
524 ;; the system's dynamically linked library.
525 (package
526 (name "monero")
fc3aa113 527 (version "0.15.0.5")
8514662b
TF
528 (source
529 (origin
0a551443
TF
530 (method git-fetch)
531 (uri (git-reference
fc54da1d
GLV
532 (url "https://github.com/monero-project/monero.git")
533 (commit (string-append "v" version))
534 (recursive? #t)))
136ff9a2 535 (file-name (git-file-name name version))
0a551443 536 (patches (search-patches "monero-use-system-miniupnpc.patch"))
fc54da1d
GLV
537 (modules '((guix build utils)))
538 (snippet
539 '(begin
540 ;; Delete bundled dependencies.
541 (for-each
542 delete-file-recursively
543 '("external/miniupnp" "external/rapidjson"
544 "external/unbound"))
545 #t))
8514662b
TF
546 (sha256
547 (base32
fc3aa113 548 "06zzwa0y8ic6x3y2fy501788r51p4klanyvmm76ywrwf087njlkv"))))
8514662b
TF
549 (build-system cmake-build-system)
550 (native-inputs
551 `(("doxygen" ,doxygen)
fc54da1d 552 ("git" ,git)
8514662b 553 ("graphviz" ,graphviz)
fc54da1d 554 ("pkg-config" ,pkg-config)
b7a07bbd
GLV
555 ("protobuf" ,protobuf)
556 ("python" ,python)
fc54da1d 557 ("qttools" ,qttools)))
8514662b 558 (inputs
fc54da1d 559 `(("boost" ,boost)
0a551443 560 ("cppzmq" ,cppzmq)
8514662b 561 ("expat" ,expat)
fc54da1d 562 ("hidapi" ,hidapi)
fc54da1d 563 ("libsodium" ,libsodium)
b7a07bbd
GLV
564 ("libunwind" ,libunwind)
565 ("libusb" ,libusb)
fc54da1d 566 ("miniupnpc" ,miniupnpc)
8514662b 567 ("openssl" ,openssl)
b7a07bbd 568 ("protobuf" ,protobuf)
8514662b 569 ("rapidjson" ,rapidjson)
fc54da1d
GLV
570 ("readline" ,readline)
571 ("unbound" ,unbound)
572 ("xz" ,xz)
573 ("zeromq" ,zeromq)))
8514662b
TF
574 (arguments
575 `(#:out-of-source? #t
44554d86
GLV
576 #:configure-flags
577 (list "-DARCH=default"
578 "-DBUILD_TESTS=ON"
579 "-DBUILD_GUI_DEPS=ON"
580 (string-append "-DReadline_ROOT_DIR="
581 (assoc-ref %build-inputs "readline")))
8514662b
TF
582 #:phases
583 (modify-phases %standard-phases
584 ;; tests/core_tests need a valid HOME
585 (add-before 'configure 'set-home
586 (lambda _
587 (setenv "HOME" (getcwd))
588 #t))
fc54da1d 589 (add-after 'set-home 'change-log-path
8514662b
TF
590 (lambda _
591 (substitute* "contrib/epee/src/mlog.cpp"
592 (("epee::string_tools::get_current_module_folder\\(\\)")
fc54da1d
GLV
593 "\".bitmonero\"")
594 (("return \\(")
595 "return ((std::string(getenv(\"HOME\"))) / "))
8514662b 596 #t))
f8f2a944
GLV
597 (add-after 'change-log-path 'fix-file-permissions-for-tests
598 (lambda _
599 (for-each make-file-writable
600 (find-files "tests/data/" "wallet_9svHk1.*"))
601 #t))
fc54da1d 602 ;; Only try tests that don't need access to network or system
8514662b
TF
603 (replace 'check
604 (lambda _
2e5044cf
GLV
605 ;; Core tests sometimes fail, at least on i686-linux.
606 ;; Let's disable them for now and just try hash tests
607 ;; and unit tests.
608 ;; (invoke "make" "ARGS=-R 'hash|core_tests' --verbose" "test")))
609 (invoke "make" "ARGS=-R 'hash' --verbose" "test")))
8514662b
TF
610 (add-after 'check 'unit-tests
611 (lambda _
612 (let ((excluded-unit-tests
613 (string-join
614 '("AddressFromURL.Success"
615 "AddressFromURL.Failure"
616 "DNSResolver.IPv4Success"
617 "DNSResolver.DNSSECSuccess"
618 "DNSResolver.DNSSECFailure"
fc54da1d 619 "DNSResolver.GetTXTRecord"
fc54da1d 620 "is_hdd.linux_os_root")
8514662b 621 ":")))
797445be
TF
622 (invoke "tests/unit_tests/unit_tests"
623 (string-append "--gtest_filter=-"
b7a07bbd 624 excluded-unit-tests)))))
df90b6e7
GLV
625 (add-after 'install 'install-librandomx
626 (lambda* (#:key outputs #:allow-other-keys)
627 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
628 (install-file "external/randomx/librandomx.a" lib)
629 #t)))
b7a07bbd
GLV
630 (add-after 'install 'delete-dead-links
631 (lambda* (#:key outputs #:allow-other-keys)
632 (let ((out (assoc-ref outputs "out")))
633 (delete-file (string-append out "/lib/libprotobuf.so"))
634 (delete-file (string-append out "/lib/libusb-1.0.so"))
635 #t))))))
df90b6e7 636 (home-page "https://web.getmonero.org/")
8514662b
TF
637 (synopsis "Command-line interface to the Monero currency")
638 (description
fc54da1d
GLV
639 "Monero is a secure, private, untraceable currency. This package provides
640the Monero command line client and daemon.")
8514662b 641 (license license:bsd-3)))
79228a52 642
f7e24839 643(define-public monero-gui
79228a52 644 (package
f7e24839 645 (name "monero-gui")
06c86388 646 (version "0.15.0.4")
79228a52
TF
647 (source
648 (origin
3902bc5c
TF
649 (method git-fetch)
650 (uri (git-reference
1362e529 651 (url "https://github.com/monero-project/monero-gui.git")
3902bc5c 652 (commit (string-append "v" version))))
398a96a2 653 (file-name (git-file-name name version))
79228a52
TF
654 (sha256
655 (base32
06c86388 656 "12m5fgnxkr11q2arx1m5ccpxqm5ljcvm6l547dwqn297zs5jim4z"))))
230e5db7 657 (build-system qt-build-system)
79228a52 658 (native-inputs
1362e529 659 `(("pkg-config" ,pkg-config)
6915d20f 660 ("qttools" ,qttools)))
79228a52
TF
661 (inputs
662 `(("boost" ,boost)
1362e529 663 ("hidapi" ,hidapi)
1362e529 664 ("libsodium" ,libsodium)
b7a07bbd
GLV
665 ("libunwind" ,libunwind)
666 ("libusb" ,libusb)
79228a52 667 ("openssl" ,openssl)
b7a07bbd 668 ("protobuf" ,protobuf)
6915d20f
EF
669 ("qtbase" ,qtbase)
670 ("qtdeclarative" ,qtdeclarative)
671 ("qtgraphicaleffects" ,qtgraphicaleffects)
1362e529
GLV
672 ("qtlocation" ,qtlocation)
673 ("qtmultimedia" ,qtmultimedia)
6915d20f 674 ("qtquickcontrols" ,qtquickcontrols)
1362e529
GLV
675 ("qtquickcontrols2",qtquickcontrols2)
676 ("qtsvg" ,qtsvg)
1362e529 677 ("qtxmlpatterns" ,qtxmlpatterns)
79228a52
TF
678 ("unbound" ,unbound)))
679 (propagated-inputs
680 `(("monero" ,monero)))
681 (arguments
230e5db7 682 `(#:tests? #f ; No tests
1362e529 683 #:phases
79228a52 684 (modify-phases %standard-phases
230e5db7 685 (add-after 'unpack 'fix-makefile-vars
79228a52
TF
686 (lambda _
687 (substitute* "src/zxcvbn-c/makefile"
688 (("\\?=") "="))
689 #t))
230e5db7
GLV
690 (add-after 'fix-makefile-vars 'fix-paths
691 (lambda* (#:key inputs outputs #:allow-other-keys)
692 (let ((boost (assoc-ref inputs "boost"))
693 (monero (assoc-ref inputs "monero"))
694 (openssl (assoc-ref inputs "openssl"))
695 (qttools (assoc-ref inputs "qttools"))
696 (out (assoc-ref outputs "out")))
697 (substitute* "monero-wallet-gui.pro"
698 (("-L/usr/local/lib")
699 "")
700 (("-L/usr/local/opt/openssl/lib")
701 (string-append "-L" openssl "/lib"))
702 (("-L/usr/local/opt/boost/lib")
703 (string-append "-L" boost "/lib"))
704 (("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease")
705 (string-append qttools "/bin/lrelease"))
706 (("\\$\\$\\[QT_INSTALL_BINS\\]/lupdate")
707 (string-append qttools "/bin/lupdate")))
708 (substitute* "deployment.pri"
709 (("/opt/\\$\\$\\{TARGET\\}/bin")
710 (string-append out "/bin")))
711 (substitute* "src/daemon/DaemonManager.cpp"
712 (("QApplication::applicationDirPath\\(\\) \\+ \"/monerod")
713 (string-append "\"" monero "/bin/monerod")))
714 #t)))
715 (add-after 'fix-paths 'make-qt-deterministic
1362e529
GLV
716 (lambda _
717 (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")
718 #t))
719 (add-after 'make-qt-deterministic 'fix-version
720 (lambda _
721 (substitute* "build.sh"
722 (("echo .*> version.js")
723 ""))
724 (with-output-to-file "version.js"
725 (lambda _
726 (format #t
727 "var GUI_VERSION = \"~a\"~@
728 var GUI_MONERO_VERSION = \"~a\"~%"
729 ,version
730 ,(package-version monero))))
731 #t))
230e5db7 732 (replace 'configure
79228a52 733 (lambda _
230e5db7 734 (mkdir-p "build")
1362e529 735 (chdir "build")
230e5db7
GLV
736 (invoke "qmake" "../monero-wallet-gui.pro" "CONFIG+=release")))
737 (add-before 'build 'build-zxcvbn-c
738 (lambda _
739 (invoke "make" "-C" "../src/zxcvbn-c"))))))
61fe56fc 740 (home-page "https://web.getmonero.org/")
79228a52
TF
741 (synopsis "Graphical user interface for the Monero currency")
742 (description
1362e529
GLV
743 "Monero is a secure, private, untraceable currency. This package provides
744the Monero GUI client.")
79228a52 745 (license license:bsd-3)))
00d3f022
DM
746
747(define-public python-trezor-agent
748 (package
749 (name "python-trezor-agent")
37cff994 750 (version "0.13.1")
00d3f022
DM
751 (source
752 (origin
39a7b720
TGR
753 (method git-fetch)
754 (uri (git-reference
755 (url "https://github.com/romanz/trezor-agent.git")
756 (commit (string-append "v" version))))
757 (file-name (git-file-name name version))
00d3f022 758 (sha256
37cff994 759 (base32 "0q99vbfd3h85s8rnjipnmldixabqmmlk5w9karv6f0rhyi54f4zv"))))
00d3f022
DM
760 (build-system python-build-system)
761 (arguments
762 `(#:phases
763 (modify-phases %standard-phases
df724c9c
VC
764 (add-after 'unpack 'remove-requires-backports-shutil-which
765 ;; Remove requires on backport of shutil_which, as python 3.4+ has
766 ;; a built-in implementation supported in python-trezor-agent.
767 (lambda _
768 (substitute* "setup.py"
769 (("'backports.shutil_which>=3.5.1',") ""))
770 #t))
00d3f022
DM
771 (delete 'check)
772 (add-after 'install 'check
773 (lambda* (#:key outputs inputs #:allow-other-keys)
39a7b720 774 ;; Make installed package available for running the tests.
00d3f022
DM
775 (add-installed-pythonpath inputs outputs)
776 (invoke "py.test"))))))
777 (propagated-inputs
df724c9c
VC
778 `(("python-configargparse" ,python-configargparse)
779 ("python-daemon" ,python-daemon)
780 ("python-docutils" ,python-docutils)
781 ("python-ecdsa" ,python-ecdsa)
00d3f022 782 ("python-ed25519" ,python-ed25519)
df724c9c
VC
783 ("python-mnemonic" ,python-mnemonic)
784 ("python-pymsgbox" ,python-pymsgbox)
00d3f022 785 ("python-semver" ,python-semver)
df724c9c
VC
786 ("python-unidecode" ,python-unidecode)
787 ("python-wheel" ,python-wheel)))
00d3f022 788 (native-inputs
df724c9c
VC
789 `(("gnupg" ,gnupg)
790 ("python-mock" ,python-mock)
00d3f022
DM
791 ("python-pytest" ,python-pytest)))
792 (home-page "https://github.com/romanz/trezor-agent")
df724c9c 793 (synopsis "Use hardware wallets as SSH and GPG agent")
00d3f022
DM
794 (description
795 "@code{libagent} is a library that allows using TREZOR, Keepkey and
796Ledger Nano as a hardware SSH/GPG agent.")
797 (license license:lgpl3)))
798
6e9749ef
DM
799(define-public python-mnemonic
800 (package
801 (name "python-mnemonic")
011ec062 802 (version "0.19")
6e9749ef
DM
803 (source
804 (origin
805 (method url-fetch)
806 (uri (pypi-uri "mnemonic" version))
807 (sha256
011ec062 808 (base32 "0cd9prmdj8wzdmc7lxbf9lz0xrlkvak5ignag406mmfbn81fndsf"))))
6e9749ef
DM
809 (build-system python-build-system)
810 (propagated-inputs
811 `(("python-pbkdf2" ,python-pbkdf2)))
812 (home-page "https://github.com/trezor/python-mnemonic")
813 (synopsis "Implementation of Bitcoin BIP-0039")
814 (description "@code{mnemonic} is a library that provides an implementation
815of Bitcoin BIP-0039.")
816 (license license:expat)))
817
818(define-public python2-mnemonic
819 (package-with-python2 python-mnemonic))
96f5e2e9
DM
820
821(define-public python-ledgerblue
822 (package
823 (name "python-ledgerblue")
824 (version "0.1.16")
825 (source
826 (origin
827 (method url-fetch)
828 (uri (pypi-uri "ledgerblue" version))
829 (sha256
830 (base32
831 "010mghaqh1cmz3a0ifc3f40mmyplilwlw7kpha2mzyrrff46p9gb"))))
832 (build-system python-build-system)
833 (propagated-inputs
834 `(("python-ecpy" ,python-ecpy)
835 ("python-future" ,python-future)
836 ("python-hidapi" ,python-hidapi)
837 ("python-pillow" ,python-pillow)
838 ("python-protobuf" ,python-protobuf)
839 ("python-pycrypto" ,python-pycrypto)))
840 (home-page "https://github.com/LedgerHQ/blue-loader-python")
841 (synopsis "Python library to communicate with Ledger Blue/Nano S")
842 (description "@code{ledgerblue} is a Python library to communicate with
843Ledger Blue/Nano S.")
844 (license license:asl2.0)))
845
846(define-public python2-ledgerblue
847 (package-with-python2 python-ledgerblue))
848
1dca32e3
DM
849(define-public python-trezor
850 (package
851 (name "python-trezor")
61497aa4 852 (version "0.11.3")
1dca32e3
DM
853 (source
854 (origin
855 (method url-fetch)
856 (uri (pypi-uri "trezor" version))
857 (sha256
858 (base32
61497aa4 859 "0211m027vlvyqy83kwbjjjxalb04xgf1klv0h0y0f0yhj07516n7"))))
1dca32e3 860 (build-system python-build-system)
b4c698c8
VC
861 (arguments
862 `(#:phases
863 (modify-phases %standard-phases
864 ;; Default tests run device-specific tests which fail, only run specific tests.
865 (replace 'check
866 (lambda* (#:key inputs outputs #:allow-other-keys)
8c16b8a4
VC
867 ;; Delete tests that require network access.
868 (delete-file "trezorlib/tests/unit_tests/test_tx_api.py")
869 (invoke "python" "-m" "pytest" "--pyarg" "trezorlib.tests.unit_tests"))))))
1dca32e3 870 (propagated-inputs
b4c698c8 871 `(("python-click" ,python-click)
8c16b8a4 872 ("python-construct" ,python-construct)
b4c698c8 873 ("python-ecdsa" ,python-ecdsa)
b4c698c8 874 ("python-libusb1" ,python-libusb1)
1dca32e3 875 ("python-mnemonic" ,python-mnemonic)
b4c698c8
VC
876 ("python-pyblake2" ,python-pyblake2)
877 ("python-requests" ,python-requests)
8c16b8a4 878 ("python-typing-extensions" ,python-typing-extensions)))
1dca32e3 879 (native-inputs
61497aa4
TGR
880 ;; For tests.
881 `(("protobuf" ,protobuf)
882 ("python-black" ,python-black)
883 ("python-protobuf" ,python-protobuf)
884 ("python-isort" ,python-isort)
885 ("python-pyqt" ,python-pyqt)
886 ("python-pytest" ,python-pytest)))
1dca32e3
DM
887 (home-page "https://github.com/trezor/python-trezor")
888 (synopsis "Python library for communicating with TREZOR Hardware Wallet")
889 (description "@code{trezor} is a Python library for communicating with
890TREZOR Hardware Wallet.")
891 (license license:lgpl3)))
892
d6ddeffc
DM
893(define-public python-keepkey
894 (package
895 (name "python-keepkey")
52311b51 896 (version "6.0.3")
d6ddeffc
DM
897 (source
898 (origin
899 (method url-fetch)
900 (uri (pypi-uri "keepkey" version))
901 (sha256
902 (base32
52311b51 903 "0z3d0m6364v9dv0njs4cd5m5ai6j6v35xaaxfxl90m9vmyxy81vd"))))
d6ddeffc
DM
904 (build-system python-build-system)
905 (arguments
906 `(#:phases
907 (modify-phases %standard-phases
908 (delete 'check)
909 (add-after 'install 'check
910 (lambda* (#:key inputs outputs #:allow-other-keys)
911 (add-installed-pythonpath inputs outputs)
912 (apply invoke "python" (find-files "tests/unit" "\\.py$")))))))
913 (propagated-inputs
914 `(("python-ecdsa" ,python-ecdsa)
915 ("python-hidapi" ,python-hidapi)
02d9e5d2 916 ("python-libusb1" ,python-libusb1)
d6ddeffc
DM
917 ("python-mnemonic" ,python-mnemonic)
918 ("python-protobuf" ,python-protobuf)))
919 (home-page "https://github.com/keepkey/python-keepkey")
920 (synopsis "Python library for communicating with KeepKey Hardware Wallet")
921 (description "@code{keepkey} is a Python library for communicating with
922the KeepKey Hardware Wallet.")
923 (license license:lgpl3)))
924
925(define-public python2-keepkey
926 (package-with-python2 python-keepkey))
927
d596fea5
DM
928(define-public ledger-agent
929 (package
930 (name "ledger-agent")
931 (version "0.9.0")
932 (source
933 (origin
934 (method url-fetch)
935 (uri (pypi-uri "ledger_agent" version))
936 (sha256
937 (base32
938 "03zj602m2rln9yvr08dswy56vzkbldp8b074ixwzz525dafblr92"))))
939 (build-system python-build-system)
940 (inputs
941 `(("python-ledgerblue" ,python-ledgerblue)
942 ("python-trezor-agent" ,python-trezor-agent)))
943 (home-page "http://github.com/romanz/trezor-agent")
944 (synopsis "Ledger as hardware SSH/GPG agent")
945 (description "This package allows using Ledger as hardware SSH/GPG agent.
946
5859fd6c
MB
947Usage for SSH: trezor-agent foo@@example.com --connect
948Usage for GPG: Initialize using trezor-gpg init \"Foo <foo@@example.com>\"
d596fea5
DM
949Then set the environment variable GNUPGHOME to
950\"${HOME}/.gnupg/trezor\".")
951 (license license:lgpl3)))
47c8ea99
DM
952
953(define-public trezor-agent
954 (package
955 (name "trezor-agent")
7fafdadd 956 (version "0.10.0")
47c8ea99
DM
957 (source
958 (origin
959 (method url-fetch)
960 (uri (pypi-uri "trezor_agent" version))
961 (sha256
962 (base32
7fafdadd
VC
963 "144657c7bn0a667dq5fv5r6j7iilxf3h9agj29v1m2qpq40g0az8"))))
964 (arguments
965 ;; Tests fail with "AttributeError: module 'attr' has no attribute 's'".
966 `(#:phases
967 (modify-phases %standard-phases
968 (add-after 'wrap 'fixup-agent-py
969 (lambda* (#:key inputs outputs #:allow-other-keys)
970 (let* ((out (assoc-ref outputs "out")))
971 ;; overwrite the wrapper with the real thing.
972 (install-file "./trezor_agent.py"
973 (string-append out "/bin"))
974 #t))))))
47c8ea99
DM
975 (build-system python-build-system)
976 (inputs
977 `(("python-trezor" ,python-trezor)
978 ("python-trezor-agent" ,python-trezor-agent)))
7fafdadd
VC
979 (native-inputs
980 `(("python-hidapi" ,python-hidapi)))
981 (home-page "https://github.com/romanz/trezor-agent")
47c8ea99
DM
982 (synopsis "Using Trezor as hardware SSH/GPG agent")
983 (description "This package allows using Trezor as a hardware SSH/GPG
984agent.")
985 (license license:lgpl3)))
50c4d676
DM
986
987(define-public keepkey-agent
988 (package
989 (name "keepkey-agent")
990 (version "0.9.0")
991 (source
992 (origin
993 (method url-fetch)
994 (uri (pypi-uri "keepkey_agent" version))
995 (sha256
996 (base32
997 "03779gvlx70i0nnry98i4pl1d92604ix5x6jgdfkrdgzqbh5vj27"))))
998 (build-system python-build-system)
999 (inputs
1000 `(("python-keepkey" ,python-keepkey)
1001 ("python-trezor-agent" ,python-trezor-agent)))
1002 (home-page "http://github.com/romanz/trezor-agent")
1003 (synopsis "KeepKey as hardware SSH/GPG agent")
1004 (description "This package allows using KeepKey as a hardware SSH/GPG
1005agent.")
1006 (license license:lgpl3)))
3da86c52
AP
1007
1008(define-public python-stdnum
1009 (package
1010 (name "python-stdnum")
200acbc3 1011 (version "1.13")
3da86c52
AP
1012 (source
1013 (origin
1014 (method url-fetch)
1015 (uri (pypi-uri "python-stdnum" version))
1016 (sha256
1017 (base32
200acbc3 1018 "0q4128rjdgavywhzlm2gz2n5ybc9b9sxs81g50dvxf5q7z9q63qj"))))
3da86c52 1019 (build-system python-build-system)
200acbc3
MB
1020 (arguments
1021 '(#:phases (modify-phases %standard-phases
1022 (replace 'check
1023 (lambda _
1024 (invoke "nosetests"))))))
1025 (native-inputs
1026 `(("python-nose" ,python-nose)))
3da86c52
AP
1027 (home-page
1028 "https://arthurdejong.org/python-stdnum/")
1029 (synopsis
1030 "Python module to handle standardized number and code formats")
1031 (description
1032 "This is a Python library that aims to provide functions to handle,
1033parse and validate standard numbers.
1034The module supports more than 100 different number formats
1035amongst which a great number of VAT and other tax numbers,
1036personal identity and company identification codes,
1037international standard numbers (ISBN, IBAN, EAN, etc.)
1038and various other formats.
1039The module also inclused implementations of the Verhoeff,
1040Luhn and family of ISO/IEC 7064 check digit algorithms. ")
1041 (license license:lgpl2.1+)))
1042
1043(define-public python2-stdnum
1044 (package-with-python2 python-stdnum))
730553d7 1045
c7299015
NG
1046(define-public python-duniterpy
1047 (package
1048 (name "python-duniterpy")
c1d79b49 1049 (version "0.56.0")
c7299015
NG
1050 (source
1051 (origin
c1d79b49
NG
1052 (method url-fetch)
1053 (uri (pypi-uri "duniterpy" version))
c7299015 1054 (sha256
c1d79b49 1055 (base32 "1h8d8cnr6k5sw4cqy8r82zy4ldzpvn4nlk2221lz2haqq7xm4s5z"))))
c7299015 1056 (build-system python-build-system)
1427d888 1057 (arguments
c1d79b49
NG
1058 ;; FIXME: Tests fail with: "ModuleNotFoundError: No module named
1059 ;; 'tests'". Not sure how to handle this.
42a57df8
NG
1060 `(#:tests? #f
1061 #:phases
1062 (modify-phases %standard-phases
c1d79b49
NG
1063 ;; "setup.py" tries to open missing "requirements.txt".
1064 (add-after 'unpack 'ignore-missing-file
42a57df8 1065 (lambda _
c1d79b49
NG
1066 (substitute* "setup.py"
1067 (("open\\('requirements\\.txt'\\)") "[]"))
42a57df8 1068 #t)))))
c7299015 1069 (propagated-inputs
352033f3 1070 `(("aiohttp" ,python-aiohttp)
c1d79b49 1071 ("attrs" ,python-attrs)
352033f3
NG
1072 ("base58" ,python-base58)
1073 ("jsonschema" ,python-jsonschema)
1074 ("libnacl" ,python-libnacl)
1075 ("pyaes" ,python-pyaes)
1076 ("pylibscrypt" ,python-pylibscrypt)
1077 ("pypeg2" ,python-pypeg2)))
9f1a2be2 1078 (home-page "https://git.duniter.org/clients/python/duniterpy")
c7299015
NG
1079 (synopsis "Python implementation of Duniter API")
1080 (description "@code{duniterpy} is an implementation of
207a79b2 1081@uref{https://github.com/duniter/duniter/, duniter} API. Its
c7299015
NG
1082main features are:
1083@itemize
207a79b2
NG
1084@item Support Duniter's Basic Merkle API and protocol
1085@item Asynchronous/synchronous without threads
1086@item Support HTTP, HTTPS and Web Socket transport for Basic Merkle API
1087@item Support Elasticsearch Duniter4j API
c7299015 1088@item Duniter signing key
207a79b2 1089@item Sign/verify and encrypt/decrypt messages with the Duniter credentials
c7299015
NG
1090@end itemize")
1091 (license license:gpl3+)))
1092
730553d7
NG
1093(define-public silkaj
1094 (package
1095 (name "silkaj")
293bc15d 1096 (version "0.7.6")
730553d7
NG
1097 (source
1098 (origin
293bc15d
NG
1099 (method url-fetch)
1100 (uri (pypi-uri "silkaj" version))
730553d7 1101 (sha256
293bc15d 1102 (base32 "0hrn0jwg415z7wjkp0myvw85wszlfi18f56j03075xxakr4dmi2j"))))
730553d7
NG
1103 (build-system python-build-system)
1104 (arguments
e627052f 1105 `(#:tests? #f)) ;no test
730553d7 1106 (inputs
c14b3a8d
NG
1107 `(("click" ,python-click)
1108 ("duniterpy" ,python-duniterpy)
1109 ("ipaddress" ,python-ipaddress)
1110 ("pynacl" ,python-pynacl)
f41378b7
NG
1111 ("tabulate" ,python-tabulate)
1112 ("texttable" ,python-texttable)))
293bc15d 1113 (home-page "https://git.duniter.org/clients/python/silkaj")
730553d7
NG
1114 (synopsis "Command line client for Duniter network")
1115 (description "@code{Silkaj} is a command line client for the
1116@uref{https://github.com/duniter/duniter/, Duniter} network.
1117
1118Its features are:
1119@itemize
1120@item information about currency,
1121@item issuers difficulty to generate next block,
1122@item network view of nodes,
1123@item list of last issuers,
1124@item send transactions,
1125@item get account amount.
1126@end itemize")
1127 (license license:agpl3+)))
90bb244f
TLC
1128
1129(define-public grisbi
1130 (package
1131 (name "grisbi")
1132 (version "1.2.2")
1133 (source
1134 (origin
1135 (method url-fetch)
1136 (uri (string-append
1137 "mirror://sourceforge/grisbi/grisbi%20stable/"
1138 (version-major+minor version) ".x/" version
1139 "/grisbi-" version ".tar.bz2"))
1140 (sha256
1141 (base32
1142 "1piiyyxjsjbw9gcqydvknzxmmfgh8kdqal12ywrxyxih2afwnvbw"))))
1143 (build-system glib-or-gtk-build-system)
1144 (arguments
1145 `(#:configure-flags (list "--without-ofx")))
1146 (propagated-inputs
1147 `(("dconf" ,dconf)))
1148 (native-inputs
1149 `(("glib" ,glib "bin") ; glib-compile-schemas
1150 ("pkg-config" ,pkg-config)
1151 ("intltool" ,intltool)))
1152 (inputs
1153 `(("gtk+" ,gtk+)
1154 ("libgsf" ,libgsf)))
1155 (synopsis "Personal accounting application")
1156 (description "Grisbi is a personal accounting application written by
1157French developers that is designed to follow French accounting rules.
1158Grisbi can manage multiple accounts, currencies and users. It manages
1159third party, expenditure and receipt categories, budgetary lines,
1160financial years, budget estimates, bankcard management and other
1161information.")
9c99cb22 1162 (home-page "https://grisbi.org")
90bb244f 1163 (license license:gpl2+)))
01b37d0f 1164
1165(define-public trezord
1166 (package
1167 (name "trezord")
1168 (version "2.0.17")
1169 (source
1170 (origin
1171 (method git-fetch)
1172 (uri (git-reference
1173 (url "https://github.com/trezor/trezord-go.git")
1174 (commit (string-append "v" version))))
1175 (sha256
1176 (base32
1177 "0nqzpq0i3crh0i4r1cppja5sn3rwi1fv9afxzwzv63096x5l30a7"))
1178 (file-name (git-file-name name version))))
1179 (build-system go-build-system)
1180 (arguments
1181 '(#:import-path "github.com/trezor/trezord-go"))
1182 (home-page "https://trezor.io")
1183 (synopsis "Trezor Communication Daemon aka Trezor Bridge (written in Go)")
1184 (description "This allows a Trezor hardware wallet to communicate to the
1185Trezor wallet.")
1186 (license license:lgpl3+)))
af012922 1187
1188(define-public bitcoin-abc
1189 (package
1190 (inherit bitcoin-core)
1191 (name "bitcoin-abc")
054ff198 1192 (version "0.20.7")
af012922 1193 (source (origin
1194 (method url-fetch)
1195 (uri (string-append "https://download.bitcoinabc.org/"
28d46d9d 1196 version "/src/bitcoin-abc-"
af012922 1197 version ".tar.gz"))
1198 (sha256
1199 (base32
054ff198
GLV
1200 "0py5ilfi4r8qh5r9637vwch27sqrrn0dg9rz8bccnj3lp2xpzw27"))))
1201 (native-inputs
1202 `(("autoconf" ,autoconf)
1203 ("automake" ,automake)
1204 ("libtool" ,libtool)
1205 ("pkg-config" ,pkg-config)
1206 ("python" ,python) ; for the tests
1207 ("util-linux" ,util-linux) ; provides the hexdump command for tests
1208 ("qttools" ,qttools)))
28d46d9d
GLV
1209 (inputs
1210 `(("bdb" ,bdb-5.3)
1211 ("boost" ,boost)
1212 ("libevent" ,libevent)
1213 ("miniupnpc" ,miniupnpc)
1214 ("openssl" ,openssl)
1215 ("protobuf" ,protobuf)
054ff198
GLV
1216 ("qrencode" ,qrencode)
1217 ("qtbase" ,qtbase)
1218 ("zlib" ,zlib)))
af012922 1219 (home-page "https://www.bitcoinabc.org/")
1220 (synopsis "Bitcoin ABC peer-to-peer full node for the Bitcoin Cash protocol")
1221 (description
1222 "Bitcoin Cash brings sound money to the world, fulfilling the original
1223promise of Bitcoin as Peer-to-Peer Electronic Cash. Merchants and users are
1224empowered with low fees and reliable confirmations is a digital currency that
1225enables instant payments to anyone anywhere in the world. It uses
1226peer-to-peer technology to operate without central authority: managing
1227transactions and issuing money are carried out collectively by the network.
1228As a fork it implemented changes lowering the time between blocks and now
1229offers confimations after less than 5 seconds and have significantly lower
1230fees that BTC. Bitcoin ABC is the reference implementation of the Bitcoin
1231Cash protocol. This package provides the Bitcoin Cash command line client and
1232a client based on Qt. This is a fork of Bitcoin Core.")))
63ca1a89 1233
952fe2da
KK
1234(define-public libofx
1235 (package
1236 (name "libofx")
1237 (version "0.9.15")
1238 (source (origin
1239 (method git-fetch)
1240 (uri (git-reference
1241 (url "https://github.com/libofx/libofx")
1242 (commit version)))
1243 (file-name (git-file-name name version))
1244 (sha256
1245 (base32
1246 "1jx56ma351p8af8dvavygjwf6ipa7qbgq7bpdsymwj27apdnixfy"))))
1247 (build-system gnu-build-system)
1248 (arguments
c17fb659
MB
1249 '(#:parallel-build? #f ;fails with -j64
1250 #:configure-flags
952fe2da
KK
1251 (list (string-append "--with-opensp-includes="
1252 (assoc-ref %build-inputs "opensp")
1253 "/include/OpenSP"))))
1254 (native-inputs
1255 `(("autoconf" ,autoconf)
1256 ("automake" ,automake)
1257 ("gengetopt" ,gengetopt)
1258 ("help2man" ,help2man)
1259 ("libtool" ,libtool)
1260 ("pkg-config" ,pkg-config)))
1261 (inputs
1262 `(("curl" ,curl)
1263 ("libxml++-2" ,libxml++-2)
1264 ("opensp" ,opensp)))
1265 (home-page "http://libofx.sourceforge.net/")
1266 (synopsis "Library supporting the Open Financial Exchange format")
1267 (description
8b08cf4f 1268 "The LibOFX library is an API designed to allow applications to very easily
952fe2da
KK
1269support OFX command responses, usually provided by financial institutions. The
1270following three utilities are included with the library:
1271@enumerate
1272@item @code{ofxdump}
1273@item @code{ofx2qif}
1274@item @code{ofxconnect}
1275@end enumerate")
1276 (license license:gpl2+)))
1277
63ca1a89
KK
1278(define-public opensp
1279 (package
1280 (name "opensp")
1281 (version "1.5.2")
1282 (source (origin
1283 (method url-fetch)
1284 (uri (string-append "mirror://sourceforge/openjade/opensp/"
1285 version "/OpenSP-" version ".tar.gz"))
1286 (sha256
1287 (base32
1288 "1khpasr6l0a8nfz6kcf3s81vgdab8fm2dj291n5r2s53k228kx2p"))))
1289 (build-system gnu-build-system)
1290 (native-inputs
1291 `(("gettext" ,gettext-minimal)))
1292 (inputs
1293 `(("docbook-xml" ,docbook-xml-4.1.2)
1294 ("docbook-xsl" ,docbook-xsl)
1295 ("xmlto" ,xmlto)))
1296 (arguments
1297 `(;; TODO: Fix and enable tests.
1298 #:tests? #f
1299 #:phases
1300 (modify-phases %standard-phases
1301 (add-after 'unpack 'patch-docbook-paths
1302 (lambda* (#:key inputs #:allow-other-keys)
1303 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
1304 "/xml/dtd/docbook"))
1305 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
1306 "/xml/xsl/docbook-xsl-"
1307 ,(package-version docbook-xsl))))
1308 (substitute* (find-files "docsrc" "\\.xml$")
1309 (("/usr/share/sgml/docbook/xml-dtd-4.1.2") xmldoc)
1310 (("http://.*/docbookx\\.dtd")
1311 (string-append xmldoc "/docbookx.dtd")))
1312 ;; Directly pass the path to the stylesheet to xmlto.
1313 (substitute* "docsrc/Makefile.in"
1314 (("\\$\\(XMLTO\\)")
1315 (string-append "$(XMLTO) -x " xsldoc
1316 "/manpages/docbook.xsl")))
1317 #t))))))
1318 (home-page "http://openjade.sourceforge.net/")
1319 (synopsis "Suite of SGML/XML processing tools")
1320 (description "OpenSP is an object-oriented toolkit for SGML parsing and
1321entity management.")
1322 (license
1323 ;; expat license with added clause regarding advertising
1324 (license:non-copyleft
1325 "file://COPYING"
1326 "See COPYING in the distribution."))))
0edbb65d
GLV
1327
1328(define-public bitcoin-unlimited
1329 (package
1330 (name "bitcoin-unlimited")
1331 (version "1.7.0.0")
1332 (source
1333 (origin
1334 (method git-fetch)
1335 (uri (git-reference
1336 (url "https://github.com/BitcoinUnlimited/BitcoinUnlimited.git")
1337 (commit (string-append "bucash" version))))
1338 (file-name (git-file-name name version))
1339 (sha256
1340 (base32 "05rcd73mg2fb2zb6b1imzspck6jhcy3xymrr7n24kwjrzmvihdpx"))))
1341 (build-system gnu-build-system)
1342 (native-inputs
1343 `(("autoconf" ,autoconf)
1344 ("automake" ,automake)
1345 ("libtool" ,libtool)
1346 ("pkg-config" ,pkg-config)
1347 ("python" ,python) ; for the tests
1348 ("util-linux" ,util-linux) ; provides the hexdump command for tests
1349 ("qttools" ,qttools)))
1350 (inputs
1351 `(("bdb" ,bdb-4.8)
1352 ("boost" ,boost)
1353 ("libevent" ,libevent)
1354 ("miniupnpc" ,miniupnpc)
1355 ("openssl" ,openssl)
1356 ("protobuf" ,protobuf)
1357 ("qrencode" ,qrencode)
1358 ("qtbase" ,qtbase)
1359 ("zeromq" ,zeromq)
1360 ("zlib" ,zlib)))
1361 (arguments
1362 `(#:configure-flags
1363 (list
1364 ;; Boost is not found unless specified manually.
1365 (string-append "--with-boost="
1366 (assoc-ref %build-inputs "boost"))
1367 ;; XXX: The configure script looks up Qt paths by
1368 ;; `pkg-config --variable=host_bins Qt5Core`, which fails to pick
1369 ;; up executables residing in 'qttools', so we specify them here.
1370 (string-append "ac_cv_path_LRELEASE="
1371 (assoc-ref %build-inputs "qttools")
1372 "/bin/lrelease")
1373 (string-append "ac_cv_path_LUPDATE="
1374 (assoc-ref %build-inputs "qttools")
1375 "/bin/lupdate"))
1376 #:phases
1377 (modify-phases %standard-phases
1378 (add-after 'unpack 'fix-tests
1379 (lambda _
1380 ;; TODO: Find why utilprocess_tests never ends. Disable for now.
1381 (substitute* "src/test/utilprocess_tests.cpp"
1382 (("#if \\(BOOST_OS_LINUX && \\(BOOST_VERSION >= 106500\\)\\)")
1383 "#if 0"))
1384 #t))
1385 (add-before 'configure 'make-qt-deterministic
1386 (lambda _
1387 ;; Make Qt deterministic.
1388 (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")
1389 #t))
1390 (add-before 'check 'set-home
1391 (lambda _
1392 (setenv "HOME" (getenv "TMPDIR")) ; tests write to $HOME
1393 #t)))))
1394 (home-page "https://www.bitcoinunlimited.info/")
1395 (synopsis "Client for the Bitcoin Cash protocol")
1396 (description
1397 "Bitcoin Unlimited is a client for the Bitcoin Cash peer-to-peer
1398electronic cash system. This package provides a command line client and
1399a Qt GUI.")
1400 (license license:expat)))