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