43eda97f1a8800c354cc0f5dbd67d9e232c7e852
[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 Martin Becze <mjbecze@riseup.net>
17 ;;; Copyright © 2019 Sebastian Schott <sschott@mailbox.org>
18 ;;; Copyright © 2020 Kei Kebreau <kkebreau@posteo.net>
19 ;;;
20 ;;; This file is part of GNU Guix.
21 ;;;
22 ;;; GNU Guix is free software; you can redistribute it and/or modify it
23 ;;; under the terms of the GNU General Public License as published by
24 ;;; the Free Software Foundation; either version 3 of the License, or (at
25 ;;; your option) any later version.
26 ;;;
27 ;;; GNU Guix is distributed in the hope that it will be useful, but
28 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
29 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 ;;; GNU General Public License for more details.
31 ;;;
32 ;;; You should have received a copy of the GNU General Public License
33 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
34
35 (define-module (gnu packages finance)
36 #:use-module ((guix licenses) #:prefix license:)
37 #:use-module (guix packages)
38 #:use-module (guix download)
39 #:use-module (guix git-download)
40 #:use-module (guix build-system gnu)
41 #:use-module (guix build-system cmake)
42 #:use-module (guix build-system python)
43 #:use-module (guix build-system glib-or-gtk)
44 #:use-module (guix build-system go)
45 #:use-module (guix build-system qt)
46 #:use-module (guix utils)
47 #:use-module (gnu packages)
48 #:use-module (gnu packages aidc)
49 #:use-module (gnu packages autotools)
50 #:use-module (gnu packages base)
51 #:use-module (gnu packages boost)
52 #:use-module (gnu packages check)
53 #:use-module (gnu packages compression)
54 #:use-module (gnu packages crypto)
55 #:use-module (gnu packages curl)
56 #:use-module (gnu packages databases)
57 #:use-module (gnu packages docbook)
58 #:use-module (gnu packages documentation)
59 #:use-module (gnu packages dns)
60 #:use-module (gnu packages emacs)
61 #:use-module (gnu packages dbm)
62 #:use-module (gnu packages gettext)
63 #:use-module (gnu packages gnome)
64 #:use-module (gnu packages glib)
65 #:use-module (gnu packages gnupg)
66 #:use-module (gnu packages graphviz)
67 #:use-module (gnu packages groff)
68 #:use-module (gnu packages gtk)
69 #:use-module (gnu packages libedit)
70 #:use-module (gnu packages libevent)
71 #:use-module (gnu packages libunwind)
72 #:use-module (gnu packages libusb)
73 #:use-module (gnu packages linux)
74 #:use-module (gnu packages man)
75 #:use-module (gnu packages multiprecision)
76 #:use-module (gnu packages networking)
77 #:use-module (gnu packages pkg-config)
78 #:use-module (gnu packages popt)
79 #:use-module (gnu packages protobuf)
80 #:use-module (gnu packages python)
81 #:use-module (gnu packages python-crypto)
82 #:use-module (gnu packages python-web)
83 #:use-module (gnu packages python-xyz)
84 #:use-module (gnu packages qt)
85 #:use-module (gnu packages readline)
86 #:use-module (gnu packages sphinx)
87 #:use-module (gnu packages texinfo)
88 #:use-module (gnu packages textutils)
89 #:use-module (gnu packages time)
90 #:use-module (gnu packages tls)
91 #:use-module (gnu packages upnp)
92 #:use-module (gnu packages version-control)
93 #:use-module (gnu packages web)
94 #:use-module (gnu packages xml)
95 #:use-module (gnu packages gnuzilla))
96
97 (define-public bitcoin-core
98 (package
99 (name "bitcoin-core")
100 (version "0.19.1")
101 (source (origin
102 (method url-fetch)
103 (uri
104 (string-append "https://bitcoincore.org/bin/bitcoin-core-"
105 version "/bitcoin-" version ".tar.gz"))
106 (sha256
107 (base32
108 "1h3w7brc18145np920vy7j5ms5hym59hvr40swdjx34fbdaisngj"))))
109 (build-system gnu-build-system)
110 (native-inputs
111 `(("pkg-config" ,pkg-config)
112 ("python" ,python) ; for the tests
113 ("util-linux" ,util-linux) ; provides the hexdump command for tests
114 ("qttools" ,qttools)))
115 (inputs
116 `(("bdb" ,bdb-4.8) ; 4.8 required for compatibility
117 ("boost" ,boost)
118 ("libevent" ,libevent)
119 ("miniupnpc" ,miniupnpc)
120 ("openssl" ,openssl)
121 ("protobuf" ,protobuf)
122 ("qtbase" ,qtbase)))
123 (arguments
124 `(#:configure-flags
125 (list
126 ;; Boost is not found unless specified manually.
127 (string-append "--with-boost="
128 (assoc-ref %build-inputs "boost"))
129 ;; XXX: The configure script looks up Qt paths by
130 ;; `pkg-config --variable=host_bins Qt5Core`, which fails to pick
131 ;; up executables residing in 'qttools', so we specify them here.
132 (string-append "ac_cv_path_LRELEASE="
133 (assoc-ref %build-inputs "qttools")
134 "/bin/lrelease")
135 (string-append "ac_cv_path_LUPDATE="
136 (assoc-ref %build-inputs "qttools")
137 "/bin/lupdate"))
138 #:phases
139 (modify-phases %standard-phases
140 (add-before 'configure 'make-qt-deterministic
141 (lambda _
142 ;; Make Qt deterministic.
143 (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")
144 #t))
145 (add-before 'check 'set-home
146 (lambda _
147 (setenv "HOME" (getenv "TMPDIR")) ; tests write to $HOME
148 #t))
149 (add-after 'check 'check-functional
150 (lambda _
151 (invoke "python3" "./test/functional/test_runner.py"
152 (string-append "--jobs=" (number->string (parallel-job-count))))
153 #t)))))
154 (home-page "https://bitcoin.org/en/")
155 (synopsis "Bitcoin peer-to-peer client")
156 (description
157 "Bitcoin is a digital currency that enables instant payments to anyone
158 anywhere in the world. It uses peer-to-peer technology to operate without
159 central authority: managing transactions and issuing money are carried out
160 collectively by the network. Bitcoin Core is the reference implementation
161 of the bitcoin protocol. This package provides the Bitcoin Core command
162 line client and a client based on Qt.")
163 (license license:expat)))
164
165 (define-public homebank
166 (package
167 (name "homebank")
168 (version "5.2.8")
169 (source (origin
170 (method url-fetch)
171 (uri (string-append "http://homebank.free.fr/public/homebank-"
172 version ".tar.gz"))
173 (sha256
174 (base32
175 "13ampiv68y30kc0p2560g3yz8whqpwnidfcnb9lndv93b9ca767y"))))
176 (build-system glib-or-gtk-build-system)
177 (native-inputs
178 `(("pkg-config" ,pkg-config)
179 ("intltool" ,intltool)))
180 (inputs
181 `(("gtk+" ,gtk+)
182 ("libsoup" ,libsoup)))
183 (arguments
184 `(#:configure-flags (list "-without-ofx"))) ; libofx is not available yet
185 (home-page "http://homebank.free.fr/")
186 (synopsis "Graphical personal accounting application")
187 (description "HomeBank allows you to manage your personal accounts at
188 home. The seeks to be lightweight, simple and easy to use. It brings
189 features that allow you to analyze your finances in a detailed way instantly
190 and dynamically with report tools based on filtering and graphical charts.")
191 (license license:gpl2+)))
192
193 (define-public ledger
194 (package
195 (name "ledger")
196 (version "3.1.3")
197 (source
198 (origin
199 (method git-fetch)
200 (uri (git-reference
201 (url "https://github.com/ledger/ledger.git")
202 (commit (string-append "v" version))))
203 (file-name (git-file-name name version))
204 (sha256
205 (base32 "0bfnrqrd6wqgsngfpqi30xh6yy86pwl25iwzrqy44q31r0zl4mm3"))))
206 (build-system cmake-build-system)
207 (arguments
208 `(#:configure-flags
209 `("-DBUILD_DOCS:BOOL=ON"
210 "-DBUILD_WEB_DOCS:BOOL=ON"
211 "-DUSE_PYTHON:BOOL=ON"
212 "-DCMAKE_INSTALL_LIBDIR:PATH=lib")
213 #:phases
214 (modify-phases %standard-phases
215 (add-before 'configure 'install-examples
216 (lambda* (#:key outputs #:allow-other-keys)
217 (let ((examples (string-append (assoc-ref outputs "out")
218 "/share/doc/ledger/examples")))
219 (install-file "test/input/sample.dat" examples)
220 (install-file "test/input/demo.ledger" examples))
221 #t))
222 (add-after 'build 'build-doc
223 (lambda _ (invoke "make" "doc")))
224 (add-before 'check 'check-setup
225 ;; One test fails if it can't set the timezone.
226 (lambda* (#:key inputs #:allow-other-keys)
227 (setenv "TZDIR"
228 (string-append (assoc-ref inputs "tzdata")
229 "/share/zoneinfo"))
230 ;; Skip failing test BaselineTest_cmd-org.
231 ;; This is a known upstream issue. See
232 ;; https://github.com/ledger/ledger/issues/550
233 (setenv "ARGS" "-E BaselineTest_cmd-org")
234 #t)))))
235 (inputs
236 `(("boost" ,boost)
237 ("gmp" ,gmp)
238 ("libedit" ,libedit)
239 ("mpfr" ,mpfr)
240 ("python" ,python-2)
241 ("tzdata" ,tzdata)
242 ("utfcpp" ,utfcpp)))
243 (native-inputs
244 `(("groff" ,groff)
245 ("texinfo" ,texinfo)))
246 (home-page "https://ledger-cli.org/")
247 (synopsis "Command-line double-entry accounting program")
248 (description
249 "Ledger is a powerful, double-entry accounting system that is
250 accessed from the UNIX command-line. This may put off some users, since
251 there is no flashy UI, but for those who want unparalleled reporting
252 access to their data there are few alternatives.
253
254 Ledger uses text files for input. It reads the files and generates
255 reports; there is no other database or stored state. To use Ledger,
256 you create a file of your account names and transactions, run from the
257 command line with some options to specify input and requested reports, and
258 get output. The output is generally plain text, though you could generate
259 a graph or html instead. Ledger is simple in concept, surprisingly rich
260 in ability, and easy to use.")
261 ;; There are some extra licenses in files which do not presently get
262 ;; installed when you build this package. Different versions of the GPL
263 ;; are used in the contrib and python subdirectories. The bundled version
264 ;; of utfcpp is under the Boost 1.0 license. Also the file
265 ;; `tools/update_copyright_year` has an Expat license.
266 (license (list license:bsd-3
267 license:asl2.0 ; src/strptime.cc
268 (license:non-copyleft
269 "file://src/wcwidth.cc"
270 "See src/wcwidth.cc in the distribution.")))))
271
272 (define-public emacs-ledger-mode
273 ;; There have been no new releases since 2016.
274 (let ((commit "253a20dc62e137ed0ed8e1dd8614ecba116610ea")
275 (revision "1"))
276 (package
277 (name "emacs-ledger-mode")
278 (version (git-version "3.1.1" revision commit))
279 (source
280 (origin
281 (method git-fetch)
282 (uri (git-reference
283 (url "https://github.com/ledger/ledger-mode.git")
284 (commit commit)))
285 (file-name (git-file-name name version))
286 (sha256
287 (base32 "06wrgkqpgvk17vibrk2qikdlqn8y63jg86marp1wgmram92mb3jk"))))
288 (build-system cmake-build-system)
289 (arguments
290 `(#:modules ((guix build cmake-build-system)
291 (guix build utils)
292 (guix build emacs-utils))
293 #:imported-modules (,@%cmake-build-system-modules
294 (guix build emacs-utils))
295 #:tests? #f ; there are none
296 #:phases
297 (modify-phases %standard-phases
298 (add-after 'unpack 'patch-site-dir
299 (lambda _
300 (substitute* "CMakeLists.txt"
301 (("DESTINATION share/emacs/site-lisp/ledger-mode")
302 "DESTINATION share/emacs/site-lisp"))
303 #t))
304 (add-before 'build 'patch-path
305 (lambda* (#:key inputs #:allow-other-keys)
306 (let ((ledger (assoc-ref inputs "ledger")))
307 (make-file-writable "ledger-exec.el")
308 (emacs-substitute-variables "ledger-exec.el"
309 ("ledger-binary-path" (string-append ledger "/bin/ledger"))))
310 #t))
311 (add-after 'build 'build-doc
312 (lambda* (#:key outputs #:allow-other-keys)
313 (let ((target (string-append (assoc-ref outputs "out")
314 "/share/info")))
315 (mkdir-p target)
316 (invoke "makeinfo" "-o" target
317 "../source/doc/ledger-mode.texi"))
318 #t))
319 (add-after 'install 'generate-autoload
320 (lambda* (#:key outputs #:allow-other-keys)
321 (let* ((site-dir (string-append (assoc-ref outputs "out")
322 "/share/emacs/site-lisp")))
323 (emacs-generate-autoloads ,name site-dir))
324 #t)))))
325 (inputs
326 `(("ledger" ,ledger)))
327 (native-inputs
328 `(("emacs-minimal" ,emacs-minimal)
329 ("texinfo" ,texinfo)))
330 (home-page "https://ledger-cli.org/")
331 (synopsis "Command-line double-entry accounting program")
332 (description
333 "Ledger is a powerful, double-entry accounting system that is
334 accessed from the UNIX command-line. This may put off some users, since
335 there is no flashy UI, but for those who want unparalleled reporting
336 access to their data there are few alternatives.
337
338 Ledger uses text files for input. It reads the files and generates
339 reports; there is no other database or stored state. To use Ledger,
340 you create a file of your account names and transactions, run from the
341 command line with some options to specify input and requested reports, and
342 get output. The output is generally plain text, though you could generate
343 a graph or html instead. Ledger is simple in concept, surprisingly rich
344 in ability, and easy to use.
345
346 This package provides the Emacs mode.")
347 (license license:gpl2+))))
348
349 (define-public geierlein
350 (package
351 (name "geierlein")
352 (version "0.9.13")
353 (source
354 (origin
355 (method git-fetch)
356 (uri (git-reference
357 (url "https://github.com/stesie/geierlein.git")
358 (commit (string-append "V" version))))
359 (file-name (git-file-name name version))
360 (sha256
361 (base32 "00zpwr3lk2vdmd60fgdwdk0xxs52wvnm19ln2m75yfphydvkglic"))))
362 (build-system gnu-build-system)
363 (arguments
364 `(#:tests? #f ; would require npm, python and a lot more
365 #:phases
366 (modify-phases %standard-phases
367 (delete 'configure) ; no configure script
368 (add-after 'unpack 'override-target-directory-and-tool-paths
369 (lambda* (#:key inputs outputs #:allow-other-keys)
370 (substitute* "Makefile"
371 (("prefix := .*")
372 (string-append "prefix := " (assoc-ref outputs "out") "\n"))
373 ;; Required for tests, unused for now:
374 ;;(("PYTHON := .*")
375 ;; (string-append (which "python") "\n")))
376 (("INSTALL := .*")
377 (string-append "INSTALL := " (which "install") "\n")))
378 (substitute* "bin/xgeierlein.in"
379 ;; Use icecat as XULRUNNER
380 (("^for search ")
381 (string-append "XULRUNNER=" (which "icecat") "\n"
382 "for search ")))
383 #t)))))
384 (inputs
385 `(("icecat" ,icecat)))
386 (home-page "https://stesie.github.io/geierlein/")
387 (synopsis "Free Elster client, for sending Germany VAT declarations")
388 (description
389 "Geierlein is a free Elster client, i.e. an application that
390 allows to send VAT declarations to Germany's fiscal authorities.
391
392 Currently it is *not* possible to send returns that are due annually
393 (especially the income tax return) since the fiscal authority doesn't
394 allow to do that off the ERiC library (which is proprietary however).
395 It's not clear at the moment whether one day it will be possible to
396 do so.")
397 (license license:agpl3+)))
398
399 (define-public electrum
400 (package
401 (name "electrum")
402 (version "3.3.8")
403 (source
404 (origin
405 (method url-fetch)
406 (uri (string-append "https://download.electrum.org/"
407 version "/Electrum-"
408 version ".tar.gz"))
409 (sha256
410 (base32 "1g00cj1pmckd4xis8r032wmraiv3vd3zc803hnyxa2bnhj8z3bg2"))
411 (modules '((guix build utils)))
412 (snippet
413 '(begin
414 ;; Delete the bundled dependencies.
415 (delete-file-recursively "packages")
416 #t))))
417 (build-system python-build-system)
418 (inputs
419 `(("python-pyaes" ,python-pyaes)
420 ("python-pysocks" ,python-pysocks)
421 ("python-sip" ,python-sip)
422 ("python-pyqt" ,python-pyqt)
423 ("python-ecdsa" ,python-ecdsa)
424 ("python-pbkdf2" ,python-pbkdf2)
425 ("python-requests" ,python-requests)
426 ("python-qrcode" ,python-qrcode)
427 ("python-protobuf" ,python-protobuf)
428 ("python-aiohttp" ,python-aiohttp)
429 ("python-aiohttp-socks" ,python-aiohttp-socks)
430 ("python-aiorpcx" ,python-aiorpcx)
431 ("python-certifi" ,python-certifi)
432 ("python-dnspython" ,python-dnspython)
433 ("python-jsonrpclib-pelix" ,python-jsonrpclib-pelix)))
434 (arguments
435 `(#:tests? #f ;; package doesn't have any tests
436 #:phases
437 (modify-phases %standard-phases
438 (add-before 'build 'patch-home
439 (lambda* (#:key outputs #:allow-other-keys)
440 (substitute* "setup.py"
441 (("~/.local/share")
442 (string-append (assoc-ref outputs "out") "/local/share"))))))))
443 (home-page "https://electrum.org/")
444 (synopsis "Bitcoin wallet")
445 (description
446 "Electrum is a lightweight Bitcoin client, based on a client-server
447 protocol. It supports Simple Payment Verification (SPV) and deterministic key
448 generation from a seed. Your secret keys are encrypted and are never sent to
449 other machines/servers. Electrum does not download the Bitcoin blockchain.")
450 (license license:expat)))
451
452 (define-public electron-cash
453 (package
454 (name "electron-cash")
455 (version "4.0.14")
456 (source
457 (origin
458 (method git-fetch)
459 (uri (git-reference
460 (url "https://github.com/Electron-Cash/Electron-Cash.git")
461 (commit version)))
462 (file-name (git-file-name name version))
463 (sha256
464 (base32 "1dp7cj1185h6xfz6jzh0iq58zvg3wq9hl96bkgxkf5h4ygni2vm6"))))
465 (build-system python-build-system)
466 (inputs
467 `(("libevent" ,libevent)
468 ("libsecp256k1", libsecp256k1)
469 ("openssl" ,openssl)
470 ("python-cython" ,python-cython)
471 ("python-dateutil", python-dateutil)
472 ("python-dnspython" ,python-dnspython)
473 ("python-ecdsa" ,python-ecdsa)
474 ("python-hidapi" ,python-hidapi)
475 ("python-jsonrpclib-pelix" ,python-jsonrpclib-pelix)
476 ("python-keepkey" ,python-keepkey)
477 ("python-protobuf" ,python-protobuf)
478 ("python-pyaes" ,python-pyaes)
479 ("python-pyqt" ,python-pyqt)
480 ("python-pysocks" ,python-pysocks)
481 ("python-qrcode" ,python-qrcode)
482 ("python-requests" ,python-requests)
483 ("python-stem" ,python-stem)
484 ("python-trezor" ,python-trezor)
485 ("qtsvg" ,qtsvg)
486 ("zlib" ,zlib)))
487 (arguments
488 `(#:tests? #f ; No tests
489 #:modules ((guix build python-build-system)
490 (guix build qt-utils)
491 (guix build utils))
492 #:imported-modules (,@%python-build-system-modules
493 (guix build qt-utils))
494 #:phases
495 (modify-phases %standard-phases
496 (add-after 'unpack 'patch-home
497 (lambda* (#:key outputs #:allow-other-keys)
498 (substitute* "setup.py"
499 (("~/.local/share")
500 (string-append (assoc-ref outputs "out") "/local/share")))))
501 (add-after 'unpack 'use-libsecp256k1-input
502 (lambda* (#:key inputs #:allow-other-keys)
503 (substitute* "lib/secp256k1.py"
504 (("library_paths = .* 'libsecp256k1.so.0'.")
505 (string-append "library_paths = ('" (assoc-ref inputs "libsecp256k1") "/lib/libsecp256k1.so.0'")))))
506 (add-after 'install 'wrap-qt
507 (lambda* (#:key outputs #:allow-other-keys)
508 (wrap-qt-program (assoc-ref outputs "out") "electron-cash")
509 #t)))))
510 (home-page "https://electroncash.org/")
511 (synopsis "Bitcoin Cash wallet")
512 (description
513 "Electroncash is a lightweight Bitcoin Cash client, based on a client-server
514 protocol. It supports Simple Payment Verification (SPV) and deterministic key
515 generation from a seed. Your secret keys are encrypted and are never sent to
516 other machines/servers. Electroncash does not download the Bitcoin Cash blockchain.")
517 (license license:expat)))
518
519 (define-public monero
520 ;; This package bundles easylogging++ and lmdb.
521 ;; The bundled easylogging++ is modified, and the changes will not be
522 ;; upstreamed.
523 ;; The devs deem the lmdb driver too critical a consenus component, to use
524 ;; the system's dynamically linked library.
525 (package
526 (name "monero")
527 (version "0.15.0.5")
528 (source
529 (origin
530 (method git-fetch)
531 (uri (git-reference
532 (url "https://github.com/monero-project/monero.git")
533 (commit (string-append "v" version))
534 (recursive? #t)))
535 (file-name (git-file-name name version))
536 (patches (search-patches "monero-use-system-miniupnpc.patch"))
537 (modules '((guix build utils)))
538 (snippet
539 '(begin
540 ;; Delete bundled dependencies.
541 (for-each
542 delete-file-recursively
543 '("external/miniupnp" "external/rapidjson"
544 "external/unbound"))
545 #t))
546 (sha256
547 (base32
548 "06zzwa0y8ic6x3y2fy501788r51p4klanyvmm76ywrwf087njlkv"))))
549 (build-system cmake-build-system)
550 (native-inputs
551 `(("doxygen" ,doxygen)
552 ("git" ,git)
553 ("graphviz" ,graphviz)
554 ("pkg-config" ,pkg-config)
555 ("protobuf" ,protobuf)
556 ("python" ,python)
557 ("qttools" ,qttools)))
558 (inputs
559 `(("boost" ,boost)
560 ("cppzmq" ,cppzmq)
561 ("expat" ,expat)
562 ("hidapi" ,hidapi)
563 ("libsodium" ,libsodium)
564 ("libunwind" ,libunwind)
565 ("libusb" ,libusb)
566 ("miniupnpc" ,miniupnpc)
567 ("openssl" ,openssl)
568 ("protobuf" ,protobuf)
569 ("rapidjson" ,rapidjson)
570 ("readline" ,readline)
571 ("unbound" ,unbound)
572 ("xz" ,xz)
573 ("zeromq" ,zeromq)))
574 (arguments
575 `(#:out-of-source? #t
576 #:configure-flags
577 (list "-DARCH=default"
578 "-DBUILD_TESTS=ON"
579 "-DBUILD_GUI_DEPS=ON"
580 (string-append "-DReadline_ROOT_DIR="
581 (assoc-ref %build-inputs "readline")))
582 #:phases
583 (modify-phases %standard-phases
584 ;; tests/core_tests need a valid HOME
585 (add-before 'configure 'set-home
586 (lambda _
587 (setenv "HOME" (getcwd))
588 #t))
589 (add-after 'set-home 'change-log-path
590 (lambda _
591 (substitute* "contrib/epee/src/mlog.cpp"
592 (("epee::string_tools::get_current_module_folder\\(\\)")
593 "\".bitmonero\"")
594 (("return \\(")
595 "return ((std::string(getenv(\"HOME\"))) / "))
596 #t))
597 (add-after 'change-log-path 'fix-file-permissions-for-tests
598 (lambda _
599 (for-each make-file-writable
600 (find-files "tests/data/" "wallet_9svHk1.*"))
601 #t))
602 ;; Only try tests that don't need access to network or system
603 (replace 'check
604 (lambda _
605 ;; Core tests sometimes fail, at least on i686-linux.
606 ;; Let's disable them for now and just try hash tests
607 ;; and unit tests.
608 ;; (invoke "make" "ARGS=-R 'hash|core_tests' --verbose" "test")))
609 (invoke "make" "ARGS=-R 'hash' --verbose" "test")))
610 (add-after 'check 'unit-tests
611 (lambda _
612 (let ((excluded-unit-tests
613 (string-join
614 '("AddressFromURL.Success"
615 "AddressFromURL.Failure"
616 "DNSResolver.IPv4Success"
617 "DNSResolver.DNSSECSuccess"
618 "DNSResolver.DNSSECFailure"
619 "DNSResolver.GetTXTRecord"
620 "is_hdd.linux_os_root")
621 ":")))
622 (invoke "tests/unit_tests/unit_tests"
623 (string-append "--gtest_filter=-"
624 excluded-unit-tests)))))
625 (add-after 'install 'install-librandomx
626 (lambda* (#:key outputs #:allow-other-keys)
627 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
628 (install-file "external/randomx/librandomx.a" lib)
629 #t)))
630 (add-after 'install 'delete-dead-links
631 (lambda* (#:key outputs #:allow-other-keys)
632 (let ((out (assoc-ref outputs "out")))
633 (delete-file (string-append out "/lib/libprotobuf.so"))
634 (delete-file (string-append out "/lib/libusb-1.0.so"))
635 #t))))))
636 (home-page "https://web.getmonero.org/")
637 (synopsis "Command-line interface to the Monero currency")
638 (description
639 "Monero is a secure, private, untraceable currency. This package provides
640 the Monero command line client and daemon.")
641 (license license:bsd-3)))
642
643 (define-public monero-gui
644 (package
645 (name "monero-gui")
646 (version "0.15.0.4")
647 (source
648 (origin
649 (method git-fetch)
650 (uri (git-reference
651 (url "https://github.com/monero-project/monero-gui.git")
652 (commit (string-append "v" version))))
653 (file-name (git-file-name name version))
654 (sha256
655 (base32
656 "12m5fgnxkr11q2arx1m5ccpxqm5ljcvm6l547dwqn297zs5jim4z"))))
657 (build-system qt-build-system)
658 (native-inputs
659 `(("pkg-config" ,pkg-config)
660 ("qttools" ,qttools)))
661 (inputs
662 `(("boost" ,boost)
663 ("hidapi" ,hidapi)
664 ("libsodium" ,libsodium)
665 ("libunwind" ,libunwind)
666 ("libusb" ,libusb)
667 ("openssl" ,openssl)
668 ("protobuf" ,protobuf)
669 ("qtbase" ,qtbase)
670 ("qtdeclarative" ,qtdeclarative)
671 ("qtgraphicaleffects" ,qtgraphicaleffects)
672 ("qtlocation" ,qtlocation)
673 ("qtmultimedia" ,qtmultimedia)
674 ("qtquickcontrols" ,qtquickcontrols)
675 ("qtquickcontrols2",qtquickcontrols2)
676 ("qtsvg" ,qtsvg)
677 ("qtxmlpatterns" ,qtxmlpatterns)
678 ("unbound" ,unbound)))
679 (propagated-inputs
680 `(("monero" ,monero)))
681 (arguments
682 `(#:tests? #f ; No tests
683 #:phases
684 (modify-phases %standard-phases
685 (add-after 'unpack 'fix-makefile-vars
686 (lambda _
687 (substitute* "src/zxcvbn-c/makefile"
688 (("\\?=") "="))
689 #t))
690 (add-after 'fix-makefile-vars 'fix-paths
691 (lambda* (#:key inputs outputs #:allow-other-keys)
692 (let ((boost (assoc-ref inputs "boost"))
693 (monero (assoc-ref inputs "monero"))
694 (openssl (assoc-ref inputs "openssl"))
695 (qttools (assoc-ref inputs "qttools"))
696 (out (assoc-ref outputs "out")))
697 (substitute* "monero-wallet-gui.pro"
698 (("-L/usr/local/lib")
699 "")
700 (("-L/usr/local/opt/openssl/lib")
701 (string-append "-L" openssl "/lib"))
702 (("-L/usr/local/opt/boost/lib")
703 (string-append "-L" boost "/lib"))
704 (("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease")
705 (string-append qttools "/bin/lrelease"))
706 (("\\$\\$\\[QT_INSTALL_BINS\\]/lupdate")
707 (string-append qttools "/bin/lupdate")))
708 (substitute* "deployment.pri"
709 (("/opt/\\$\\$\\{TARGET\\}/bin")
710 (string-append out "/bin")))
711 (substitute* "src/daemon/DaemonManager.cpp"
712 (("QApplication::applicationDirPath\\(\\) \\+ \"/monerod")
713 (string-append "\"" monero "/bin/monerod")))
714 #t)))
715 (add-after 'fix-paths 'make-qt-deterministic
716 (lambda _
717 (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")
718 #t))
719 (add-after 'make-qt-deterministic 'fix-version
720 (lambda _
721 (substitute* "build.sh"
722 (("echo .*> version.js")
723 ""))
724 (with-output-to-file "version.js"
725 (lambda _
726 (format #t
727 "var GUI_VERSION = \"~a\"~@
728 var GUI_MONERO_VERSION = \"~a\"~%"
729 ,version
730 ,(package-version monero))))
731 #t))
732 (replace 'configure
733 (lambda _
734 (mkdir-p "build")
735 (chdir "build")
736 (invoke "qmake" "../monero-wallet-gui.pro" "CONFIG+=release")))
737 (add-before 'build 'build-zxcvbn-c
738 (lambda _
739 (invoke "make" "-C" "../src/zxcvbn-c"))))))
740 (home-page "https://web.getmonero.org/")
741 (synopsis "Graphical user interface for the Monero currency")
742 (description
743 "Monero is a secure, private, untraceable currency. This package provides
744 the Monero GUI client.")
745 (license license:bsd-3)))
746
747 (define-public monero-core
748 (deprecated-package "monero-core" monero-gui))
749
750 (define-public python-trezor-agent
751 (package
752 (name "python-trezor-agent")
753 (version "0.13.1")
754 (source
755 (origin
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))
761 (sha256
762 (base32 "0q99vbfd3h85s8rnjipnmldixabqmmlk5w9karv6f0rhyi54f4zv"))))
763 (build-system python-build-system)
764 (arguments
765 `(#:phases
766 (modify-phases %standard-phases
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))
774 (delete 'check)
775 (add-after 'install 'check
776 (lambda* (#:key outputs inputs #:allow-other-keys)
777 ;; Make installed package available for running the tests.
778 (add-installed-pythonpath inputs outputs)
779 (invoke "py.test"))))))
780 (propagated-inputs
781 `(("python-configargparse" ,python-configargparse)
782 ("python-daemon" ,python-daemon)
783 ("python-docutils" ,python-docutils)
784 ("python-ecdsa" ,python-ecdsa)
785 ("python-ed25519" ,python-ed25519)
786 ("python-mnemonic" ,python-mnemonic)
787 ("python-pymsgbox" ,python-pymsgbox)
788 ("python-semver" ,python-semver)
789 ("python-unidecode" ,python-unidecode)
790 ("python-wheel" ,python-wheel)))
791 (native-inputs
792 `(("gnupg" ,gnupg)
793 ("python-mock" ,python-mock)
794 ("python-pytest" ,python-pytest)))
795 (home-page "https://github.com/romanz/trezor-agent")
796 (synopsis "Use hardware wallets as SSH and GPG agent")
797 (description
798 "@code{libagent} is a library that allows using TREZOR, Keepkey and
799 Ledger Nano as a hardware SSH/GPG agent.")
800 (license license:lgpl3)))
801
802 (define-public python-mnemonic
803 (package
804 (name "python-mnemonic")
805 (version "0.19")
806 (source
807 (origin
808 (method url-fetch)
809 (uri (pypi-uri "mnemonic" version))
810 (sha256
811 (base32 "0cd9prmdj8wzdmc7lxbf9lz0xrlkvak5ignag406mmfbn81fndsf"))))
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
818 of Bitcoin BIP-0039.")
819 (license license:expat)))
820
821 (define-public python2-mnemonic
822 (package-with-python2 python-mnemonic))
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
846 Ledger Blue/Nano S.")
847 (license license:asl2.0)))
848
849 (define-public python2-ledgerblue
850 (package-with-python2 python-ledgerblue))
851
852 (define-public python-trezor
853 (package
854 (name "python-trezor")
855 (version "0.11.3")
856 (source
857 (origin
858 (method url-fetch)
859 (uri (pypi-uri "trezor" version))
860 (sha256
861 (base32
862 "0211m027vlvyqy83kwbjjjxalb04xgf1klv0h0y0f0yhj07516n7"))))
863 (build-system python-build-system)
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)
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"))))))
873 (propagated-inputs
874 `(("python-click" ,python-click)
875 ("python-construct" ,python-construct)
876 ("python-ecdsa" ,python-ecdsa)
877 ("python-libusb1" ,python-libusb1)
878 ("python-mnemonic" ,python-mnemonic)
879 ("python-pyblake2" ,python-pyblake2)
880 ("python-requests" ,python-requests)
881 ("python-typing-extensions" ,python-typing-extensions)))
882 (native-inputs
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)))
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
893 TREZOR Hardware Wallet.")
894 (license license:lgpl3)))
895
896 (define-public python-keepkey
897 (package
898 (name "python-keepkey")
899 (version "6.0.3")
900 (source
901 (origin
902 (method url-fetch)
903 (uri (pypi-uri "keepkey" version))
904 (sha256
905 (base32
906 "0z3d0m6364v9dv0njs4cd5m5ai6j6v35xaaxfxl90m9vmyxy81vd"))))
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)
919 ("python-libusb1" ,python-libusb1)
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
925 the KeepKey Hardware Wallet.")
926 (license license:lgpl3)))
927
928 (define-public python2-keepkey
929 (package-with-python2 python-keepkey))
930
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
950 Usage for SSH: trezor-agent foo@@example.com --connect
951 Usage for GPG: Initialize using trezor-gpg init \"Foo <foo@@example.com>\"
952 Then set the environment variable GNUPGHOME to
953 \"${HOME}/.gnupg/trezor\".")
954 (license license:lgpl3)))
955
956 (define-public trezor-agent
957 (package
958 (name "trezor-agent")
959 (version "0.10.0")
960 (source
961 (origin
962 (method url-fetch)
963 (uri (pypi-uri "trezor_agent" version))
964 (sha256
965 (base32
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))))))
978 (build-system python-build-system)
979 (inputs
980 `(("python-trezor" ,python-trezor)
981 ("python-trezor-agent" ,python-trezor-agent)))
982 (native-inputs
983 `(("python-hidapi" ,python-hidapi)))
984 (home-page "https://github.com/romanz/trezor-agent")
985 (synopsis "Using Trezor as hardware SSH/GPG agent")
986 (description "This package allows using Trezor as a hardware SSH/GPG
987 agent.")
988 (license license:lgpl3)))
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
1008 agent.")
1009 (license license:lgpl3)))
1010
1011 (define-public python-stdnum
1012 (package
1013 (name "python-stdnum")
1014 (version "1.13")
1015 (source
1016 (origin
1017 (method url-fetch)
1018 (uri (pypi-uri "python-stdnum" version))
1019 (sha256
1020 (base32
1021 "0q4128rjdgavywhzlm2gz2n5ybc9b9sxs81g50dvxf5q7z9q63qj"))))
1022 (build-system python-build-system)
1023 (arguments
1024 '(#:phases (modify-phases %standard-phases
1025 (replace 'check
1026 (lambda _
1027 (invoke "nosetests"))))))
1028 (native-inputs
1029 `(("python-nose" ,python-nose)))
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,
1036 parse and validate standard numbers.
1037 The module supports more than 100 different number formats
1038 amongst which a great number of VAT and other tax numbers,
1039 personal identity and company identification codes,
1040 international standard numbers (ISBN, IBAN, EAN, etc.)
1041 and various other formats.
1042 The module also inclused implementations of the Verhoeff,
1043 Luhn 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))
1048
1049 (define-public python-duniterpy
1050 (package
1051 (name "python-duniterpy")
1052 (version "0.56.0")
1053 (source
1054 (origin
1055 (method url-fetch)
1056 (uri (pypi-uri "duniterpy" version))
1057 (sha256
1058 (base32 "1h8d8cnr6k5sw4cqy8r82zy4ldzpvn4nlk2221lz2haqq7xm4s5z"))))
1059 (build-system python-build-system)
1060 (arguments
1061 ;; FIXME: Tests fail with: "ModuleNotFoundError: No module named
1062 ;; 'tests'". Not sure how to handle this.
1063 `(#:tests? #f
1064 #:phases
1065 (modify-phases %standard-phases
1066 ;; "setup.py" tries to open missing "requirements.txt".
1067 (add-after 'unpack 'ignore-missing-file
1068 (lambda _
1069 (substitute* "setup.py"
1070 (("open\\('requirements\\.txt'\\)") "[]"))
1071 #t)))))
1072 (propagated-inputs
1073 `(("aiohttp" ,python-aiohttp)
1074 ("attrs" ,python-attrs)
1075 ("base58" ,python-base58)
1076 ("jsonschema" ,python-jsonschema)
1077 ("libnacl" ,python-libnacl)
1078 ("pyaes" ,python-pyaes)
1079 ("pylibscrypt" ,python-pylibscrypt)
1080 ("pypeg2" ,python-pypeg2)))
1081 (home-page "https://git.duniter.org/clients/python/duniterpy")
1082 (synopsis "Python implementation of Duniter API")
1083 (description "@code{duniterpy} is an implementation of
1084 @uref{https://github.com/duniter/duniter/, duniter} API. Its
1085 main features are:
1086 @itemize
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
1091 @item Duniter signing key
1092 @item Sign/verify and encrypt/decrypt messages with the Duniter credentials
1093 @end itemize")
1094 (license license:gpl3+)))
1095
1096 (define-public silkaj
1097 (package
1098 (name "silkaj")
1099 (version "0.7.6")
1100 (source
1101 (origin
1102 (method url-fetch)
1103 (uri (pypi-uri "silkaj" version))
1104 (sha256
1105 (base32 "0hrn0jwg415z7wjkp0myvw85wszlfi18f56j03075xxakr4dmi2j"))))
1106 (build-system python-build-system)
1107 (arguments
1108 `(#:tests? #f)) ;no test
1109 (inputs
1110 `(("click" ,python-click)
1111 ("duniterpy" ,python-duniterpy)
1112 ("ipaddress" ,python-ipaddress)
1113 ("pynacl" ,python-pynacl)
1114 ("tabulate" ,python-tabulate)
1115 ("texttable" ,python-texttable)))
1116 (home-page "https://git.duniter.org/clients/python/silkaj")
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
1121 Its 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+)))
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
1160 French developers that is designed to follow French accounting rules.
1161 Grisbi can manage multiple accounts, currencies and users. It manages
1162 third party, expenditure and receipt categories, budgetary lines,
1163 financial years, budget estimates, bankcard management and other
1164 information.")
1165 (home-page "https://grisbi.org")
1166 (license license:gpl2+)))
1167
1168 (define-public trezord
1169 (package
1170 (name "trezord")
1171 (version "2.0.17")
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
1180 "0nqzpq0i3crh0i4r1cppja5sn3rwi1fv9afxzwzv63096x5l30a7"))
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
1188 Trezor wallet.")
1189 (license license:lgpl3+)))
1190
1191 (define-public bitcoin-abc
1192 (package
1193 (inherit bitcoin-core)
1194 (name "bitcoin-abc")
1195 (version "0.20.7")
1196 (source (origin
1197 (method url-fetch)
1198 (uri (string-append "https://download.bitcoinabc.org/"
1199 version "/src/bitcoin-abc-"
1200 version ".tar.gz"))
1201 (sha256
1202 (base32
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)))
1212 (inputs
1213 `(("bdb" ,bdb-5.3)
1214 ("boost" ,boost)
1215 ("libevent" ,libevent)
1216 ("miniupnpc" ,miniupnpc)
1217 ("openssl" ,openssl)
1218 ("protobuf" ,protobuf)
1219 ("qrencode" ,qrencode)
1220 ("qtbase" ,qtbase)
1221 ("zlib" ,zlib)))
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
1226 promise of Bitcoin as Peer-to-Peer Electronic Cash. Merchants and users are
1227 empowered with low fees and reliable confirmations is a digital currency that
1228 enables instant payments to anyone anywhere in the world. It uses
1229 peer-to-peer technology to operate without central authority: managing
1230 transactions and issuing money are carried out collectively by the network.
1231 As a fork it implemented changes lowering the time between blocks and now
1232 offers confimations after less than 5 seconds and have significantly lower
1233 fees that BTC. Bitcoin ABC is the reference implementation of the Bitcoin
1234 Cash protocol. This package provides the Bitcoin Cash command line client and
1235 a client based on Qt. This is a fork of Bitcoin Core.")))
1236
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
1252 '(#:parallel-build? #f ;fails with -j64
1253 #:configure-flags
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
1271 "The LibOFX library is an API designed to allow applications to very easily
1272 support OFX command responses, usually provided by financial institutions. The
1273 following 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
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
1324 entity management.")
1325 (license
1326 ;; expat license with added clause regarding advertising
1327 (license:non-copyleft
1328 "file://COPYING"
1329 "See COPYING in the distribution."))))
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
1401 electronic cash system. This package provides a command line client and
1402 a Qt GUI.")
1403 (license license:expat)))