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