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