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