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