gnu: Add datafly.
[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>
369114be 9;;; Copyright © 2017, 2018, 2019, 2020 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>
c7210b96 22;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
20c6b9da
AE
23;;;
24;;; This file is part of GNU Guix.
25;;;
26;;; GNU Guix is free software; you can redistribute it and/or modify it
27;;; under the terms of the GNU General Public License as published by
28;;; the Free Software Foundation; either version 3 of the License, or (at
29;;; your option) any later version.
30;;;
31;;; GNU Guix is distributed in the hope that it will be useful, but
32;;; WITHOUT ANY WARRANTY; without even the implied warranty of
33;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34;;; GNU General Public License for more details.
35;;;
36;;; You should have received a copy of the GNU General Public License
37;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
38
39(define-module (gnu packages finance)
fa4f95a7
CB
40 #:use-module ((guix licenses) #:prefix license:)
41 #:use-module (guix packages)
42 #:use-module (guix download)
730553d7 43 #:use-module (guix git-download)
fa4f95a7
CB
44 #:use-module (guix build-system gnu)
45 #:use-module (guix build-system cmake)
0639a240 46 #:use-module (guix build-system copy)
805d7021 47 #:use-module (guix build-system emacs)
fa4f95a7 48 #:use-module (guix build-system python)
90bb244f 49 #:use-module (guix build-system glib-or-gtk)
01b37d0f 50 #:use-module (guix build-system go)
230e5db7 51 #:use-module (guix build-system qt)
90bb244f 52 #:use-module (guix utils)
5424f9bc 53 #:use-module (gnu packages)
054ff198
GLV
54 #:use-module (gnu packages aidc)
55 #:use-module (gnu packages autotools)
fa4f95a7
CB
56 #:use-module (gnu packages base)
57 #:use-module (gnu packages boost)
58 #:use-module (gnu packages check)
fc54da1d 59 #:use-module (gnu packages compression)
0a551443 60 #:use-module (gnu packages crypto)
952fe2da 61 #:use-module (gnu packages curl)
fa4f95a7 62 #:use-module (gnu packages databases)
63ca1a89 63 #:use-module (gnu packages docbook)
fa4f95a7
CB
64 #:use-module (gnu packages documentation)
65 #:use-module (gnu packages dns)
66 #:use-module (gnu packages emacs)
255d1bbe 67 #:use-module (gnu packages dbm)
63ca1a89 68 #:use-module (gnu packages gettext)
90bb244f
TLC
69 #:use-module (gnu packages gnome)
70 #:use-module (gnu packages glib)
df724c9c 71 #:use-module (gnu packages gnupg)
fa4f95a7
CB
72 #:use-module (gnu packages graphviz)
73 #:use-module (gnu packages groff)
90bb244f 74 #:use-module (gnu packages gtk)
59668de4 75 #:use-module (gnu packages jemalloc)
fa4f95a7
CB
76 #:use-module (gnu packages libedit)
77 #:use-module (gnu packages libevent)
78 #:use-module (gnu packages libunwind)
96f5e2e9 79 #:use-module (gnu packages libusb)
fa4f95a7 80 #:use-module (gnu packages linux)
952fe2da 81 #:use-module (gnu packages man)
fa4f95a7 82 #:use-module (gnu packages multiprecision)
0a551443 83 #:use-module (gnu packages networking)
fa4f95a7 84 #:use-module (gnu packages pkg-config)
952fe2da 85 #:use-module (gnu packages popt)
fa4f95a7
CB
86 #:use-module (gnu packages protobuf)
87 #:use-module (gnu packages python)
cc6f4912 88 #:use-module (gnu packages python-crypto)
589e3f4e 89 #:use-module (gnu packages python-web)
44d10b1f 90 #:use-module (gnu packages python-xyz)
fa4f95a7 91 #:use-module (gnu packages qt)
1d0865c1 92 #:use-module (gnu packages readline)
9d0c291e 93 #:use-module (gnu packages sphinx)
fa4f95a7
CB
94 #:use-module (gnu packages texinfo)
95 #:use-module (gnu packages textutils)
1ea8b3b1 96 #:use-module (gnu packages time)
fa4f95a7
CB
97 #:use-module (gnu packages tls)
98 #:use-module (gnu packages upnp)
99 #:use-module (gnu packages web)
100 #:use-module (gnu packages xml)
101 #:use-module (gnu packages gnuzilla))
20c6b9da
AE
102
103(define-public bitcoin-core
104 (package
105 (name "bitcoin-core")
90799c35 106 (version "0.19.1")
20c6b9da 107 (source (origin
8ba4d8a3
CB
108 (method url-fetch)
109 (uri
110 (string-append "https://bitcoincore.org/bin/bitcoin-core-"
111 version "/bitcoin-" version ".tar.gz"))
112 (sha256
113 (base32
114 "1h3w7brc18145np920vy7j5ms5hym59hvr40swdjx34fbdaisngj"))
115 (patches (search-patches "bitcoin-core-python-compat.patch"))))
20c6b9da
AE
116 (build-system gnu-build-system)
117 (native-inputs
118 `(("pkg-config" ,pkg-config)
1219a7cc
TGR
119 ("python" ,python) ; for the tests
120 ("util-linux" ,util-linux) ; provides the hexdump command for tests
0193812a 121 ("qttools" ,qttools)))
20c6b9da 122 (inputs
1219a7cc 123 `(("bdb" ,bdb-4.8) ; 4.8 required for compatibility
20c6b9da 124 ("boost" ,boost)
14ea30e4 125 ("libevent" ,libevent)
20c6b9da
AE
126 ("miniupnpc" ,miniupnpc)
127 ("openssl" ,openssl)
128 ("protobuf" ,protobuf)
0193812a 129 ("qtbase" ,qtbase)))
20c6b9da
AE
130 (arguments
131 `(#:configure-flags
8ba4d8a3
CB
132 (list
133 ;; Boost is not found unless specified manually.
134 (string-append "--with-boost="
135 (assoc-ref %build-inputs "boost"))
136 ;; XXX: The configure script looks up Qt paths by
137 ;; `pkg-config --variable=host_bins Qt5Core`, which fails to pick
138 ;; up executables residing in 'qttools', so we specify them here.
139 (string-append "ac_cv_path_LRELEASE="
140 (assoc-ref %build-inputs "qttools")
141 "/bin/lrelease")
142 (string-append "ac_cv_path_LUPDATE="
143 (assoc-ref %build-inputs "qttools")
144 "/bin/lupdate"))
20c6b9da 145 #:phases
8ba4d8a3
CB
146 (modify-phases %standard-phases
147 (add-before 'configure 'make-qt-deterministic
99629e5a 148 (lambda _
8ba4d8a3
CB
149 ;; Make Qt deterministic.
150 (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")
151 #t))
152 (add-before 'check 'set-home
20c6b9da 153 (lambda _
8ba4d8a3
CB
154 (setenv "HOME" (getenv "TMPDIR")) ; tests write to $HOME
155 #t))
156 (add-after 'check 'check-functional
bcfc54ff 157 (lambda _
8ba4d8a3
CB
158 (invoke
159 "python3" "./test/functional/test_runner.py"
160 (string-append "--jobs=" (number->string (parallel-job-count))))
161 #t)))))
20c6b9da
AE
162 (home-page "https://bitcoin.org/en/")
163 (synopsis "Bitcoin peer-to-peer client")
164 (description
165 "Bitcoin is a digital currency that enables instant payments to anyone
166anywhere in the world. It uses peer-to-peer technology to operate without
167central authority: managing transactions and issuing money are carried out
168collectively by the network. Bitcoin Core is the reference implementation
169of the bitcoin protocol. This package provides the Bitcoin Core command
170line client and a client based on Qt.")
171 (license license:expat)))
d3699b31 172
66b707a7
SS
173(define-public homebank
174 (package
175 (name "homebank")
115a1ed2 176 (version "5.4.2")
66b707a7
SS
177 (source (origin
178 (method url-fetch)
179 (uri (string-append "http://homebank.free.fr/public/homebank-"
180 version ".tar.gz"))
181 (sha256
182 (base32
115a1ed2 183 "0bkjvd819kw9cwmr3macggbg8yil3yc8v2za8pjrl6g746s89kn6"))))
66b707a7
SS
184 (build-system glib-or-gtk-build-system)
185 (native-inputs
186 `(("pkg-config" ,pkg-config)
187 ("intltool" ,intltool)))
188 (inputs
189 `(("gtk+" ,gtk+)
c7210b96 190 ("libofx" ,libofx)
66b707a7 191 ("libsoup" ,libsoup)))
66b707a7
SS
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")
e957bab7 203 (version "3.2.1")
8b7ac58c
TGR
204 (source
205 (origin
206 (method git-fetch)
207 (uri (git-reference
b0e7b699 208 (url "https://github.com/ledger/ledger")
8b7ac58c
TGR
209 (commit (string-append "v" version))))
210 (file-name (git-file-name name version))
211 (sha256
e957bab7 212 (base32 "0x6jxwss3wwzbzlwmnwb8yzjk8f9wfawif4f1b74z2qg6hc4r7f6"))))
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
b0e7b699 306 (url "https://github.com/ledger/ledger-mode")
0df201c0
RW
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
b0e7b699 380 (url "https://github.com/stesie/geierlein")
1fd71120
TGR
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
8ee3e4d9 458 `(#:tests? #f ; no tests
9475fd92
CZ
459 #:phases
460 (modify-phases %standard-phases
a2765029 461 (add-after 'unpack 'fix-prefix
9475fd92 462 (lambda* (#:key outputs #:allow-other-keys)
a2765029
TGR
463 (let ((out (assoc-ref outputs "out")))
464 ;; setup.py installs to ~/.local/share if sys.prefix/share isn't
465 ;; writable. sys.prefix points to Python's, not our, --prefix.
466 (mkdir-p (string-append out "/share"))
467 (substitute* "setup.py"
468 (("sys\\.prefix")
469 (format #f "\"~a\"" out)))
470 #t))))))
9475fd92
CZ
471 (home-page "https://electrum.org/")
472 (synopsis "Bitcoin wallet")
473 (description
474 "Electrum is a lightweight Bitcoin client, based on a client-server
475protocol. It supports Simple Payment Verification (SPV) and deterministic key
476generation from a seed. Your secret keys are encrypted and are never sent to
477other machines/servers. Electrum does not download the Bitcoin blockchain.")
478 (license license:expat)))
8514662b 479
a0bb0217
VC
480(define-public electron-cash
481 (package
a0bb0217 482 (name "electron-cash")
369114be 483 (version "4.0.15")
a0bb0217
VC
484 (source
485 (origin
d08c3e51
VC
486 (method git-fetch)
487 (uri (git-reference
b0e7b699 488 (url "https://github.com/Electron-Cash/Electron-Cash")
d08c3e51
VC
489 (commit version)))
490 (file-name (git-file-name name version))
a0bb0217 491 (sha256
369114be 492 (base32 "0bvj64fdxpi0dbivhgv509kqq503zjp7r7xckl8q5c48j5h1zik2"))))
e6a0cd9a 493 (build-system python-build-system)
1ea8b3b1 494 (inputs
e6a0cd9a 495 `(("libevent" ,libevent)
d08c3e51 496 ("libsecp256k1", libsecp256k1)
e6a0cd9a
GLV
497 ("openssl" ,openssl)
498 ("python-cython" ,python-cython)
1ea8b3b1 499 ("python-dateutil", python-dateutil)
e6a0cd9a
GLV
500 ("python-dnspython" ,python-dnspython)
501 ("python-ecdsa" ,python-ecdsa)
502 ("python-hidapi" ,python-hidapi)
503 ("python-jsonrpclib-pelix" ,python-jsonrpclib-pelix)
504 ("python-keepkey" ,python-keepkey)
505 ("python-protobuf" ,python-protobuf)
506 ("python-pyaes" ,python-pyaes)
507 ("python-pyqt" ,python-pyqt)
508 ("python-pysocks" ,python-pysocks)
509 ("python-qrcode" ,python-qrcode)
510 ("python-requests" ,python-requests)
511 ("python-stem" ,python-stem)
512 ("python-trezor" ,python-trezor)
513 ("qtsvg" ,qtsvg)
514 ("zlib" ,zlib)))
d08c3e51 515 (arguments
110888f8 516 `(#:tests? #f ; no tests
e6a0cd9a
GLV
517 #:modules ((guix build python-build-system)
518 (guix build qt-utils)
519 (guix build utils))
520 #:imported-modules (,@%python-build-system-modules
521 (guix build qt-utils))
522 #:phases
523 (modify-phases %standard-phases
44da8733 524 (add-after 'unpack 'create-output-directories
e6a0cd9a 525 (lambda* (#:key outputs #:allow-other-keys)
44da8733
TGR
526 ;; setup.py installs to ~/.local/share if this doesn't exist.
527 (mkdir-p (string-append (assoc-ref outputs "out") "/share"))
110888f8 528 #t))
e6a0cd9a
GLV
529 (add-after 'unpack 'use-libsecp256k1-input
530 (lambda* (#:key inputs #:allow-other-keys)
531 (substitute* "lib/secp256k1.py"
532 (("library_paths = .* 'libsecp256k1.so.0'.")
110888f8
TGR
533 (string-append "library_paths = ('" (assoc-ref inputs "libsecp256k1") "/lib/libsecp256k1.so.0'")))
534 #t))
e6a0cd9a
GLV
535 (add-after 'install 'wrap-qt
536 (lambda* (#:key outputs #:allow-other-keys)
537 (wrap-qt-program (assoc-ref outputs "out") "electron-cash")
538 #t)))))
a0bb0217
VC
539 (home-page "https://electroncash.org/")
540 (synopsis "Bitcoin Cash wallet")
541 (description
542 "Electroncash is a lightweight Bitcoin Cash client, based on a client-server
543protocol. It supports Simple Payment Verification (SPV) and deterministic key
544generation from a seed. Your secret keys are encrypted and are never sent to
545other machines/servers. Electroncash does not download the Bitcoin Cash blockchain.")
546 (license license:expat)))
547
8514662b
TF
548(define-public monero
549 ;; This package bundles easylogging++ and lmdb.
fc54da1d
GLV
550 ;; The bundled easylogging++ is modified, and the changes will not be
551 ;; upstreamed.
8514662b
TF
552 ;; The devs deem the lmdb driver too critical a consenus component, to use
553 ;; the system's dynamically linked library.
554 (package
555 (name "monero")
8809696e 556 (version "0.16.0.3")
8514662b
TF
557 (source
558 (origin
0a551443
TF
559 (method git-fetch)
560 (uri (git-reference
b0e7b699 561 (url "https://github.com/monero-project/monero")
fc54da1d
GLV
562 (commit (string-append "v" version))
563 (recursive? #t)))
136ff9a2 564 (file-name (git-file-name name version))
0a551443 565 (patches (search-patches "monero-use-system-miniupnpc.patch"))
fc54da1d
GLV
566 (modules '((guix build utils)))
567 (snippet
568 '(begin
569 ;; Delete bundled dependencies.
570 (for-each
571 delete-file-recursively
572 '("external/miniupnp" "external/rapidjson"
573 "external/unbound"))
574 #t))
8514662b 575 (sha256
8809696e 576 (base32 "1r9x3712vhb24dxxirfiwj5f9x0h4m7x0ngiiavf5983dfdlgz33"))))
8514662b
TF
577 (build-system cmake-build-system)
578 (native-inputs
579 `(("doxygen" ,doxygen)
8514662b 580 ("graphviz" ,graphviz)
fc54da1d 581 ("pkg-config" ,pkg-config)
b7a07bbd
GLV
582 ("protobuf" ,protobuf)
583 ("python" ,python)
fc54da1d 584 ("qttools" ,qttools)))
8514662b 585 (inputs
fc54da1d 586 `(("boost" ,boost)
0a551443 587 ("cppzmq" ,cppzmq)
8514662b 588 ("expat" ,expat)
fc54da1d 589 ("hidapi" ,hidapi)
fc54da1d 590 ("libsodium" ,libsodium)
b7a07bbd
GLV
591 ("libunwind" ,libunwind)
592 ("libusb" ,libusb)
fc54da1d 593 ("miniupnpc" ,miniupnpc)
8514662b 594 ("openssl" ,openssl)
b7a07bbd 595 ("protobuf" ,protobuf)
8514662b 596 ("rapidjson" ,rapidjson)
fc54da1d
GLV
597 ("readline" ,readline)
598 ("unbound" ,unbound)
599 ("xz" ,xz)
600 ("zeromq" ,zeromq)))
8514662b
TF
601 (arguments
602 `(#:out-of-source? #t
44554d86
GLV
603 #:configure-flags
604 (list "-DARCH=default"
605 "-DBUILD_TESTS=ON"
606 "-DBUILD_GUI_DEPS=ON"
607 (string-append "-DReadline_ROOT_DIR="
608 (assoc-ref %build-inputs "readline")))
8514662b
TF
609 #:phases
610 (modify-phases %standard-phases
611 ;; tests/core_tests need a valid HOME
612 (add-before 'configure 'set-home
613 (lambda _
614 (setenv "HOME" (getcwd))
615 #t))
fc54da1d 616 (add-after 'set-home 'change-log-path
8514662b
TF
617 (lambda _
618 (substitute* "contrib/epee/src/mlog.cpp"
619 (("epee::string_tools::get_current_module_folder\\(\\)")
fc54da1d
GLV
620 "\".bitmonero\"")
621 (("return \\(")
622 "return ((std::string(getenv(\"HOME\"))) / "))
8514662b 623 #t))
f8f2a944
GLV
624 (add-after 'change-log-path 'fix-file-permissions-for-tests
625 (lambda _
626 (for-each make-file-writable
627 (find-files "tests/data/" "wallet_9svHk1.*"))
628 #t))
fc54da1d 629 ;; Only try tests that don't need access to network or system
8514662b
TF
630 (replace 'check
631 (lambda _
2e5044cf
GLV
632 ;; Core tests sometimes fail, at least on i686-linux.
633 ;; Let's disable them for now and just try hash tests
634 ;; and unit tests.
635 ;; (invoke "make" "ARGS=-R 'hash|core_tests' --verbose" "test")))
636 (invoke "make" "ARGS=-R 'hash' --verbose" "test")))
8514662b
TF
637 (add-after 'check 'unit-tests
638 (lambda _
639 (let ((excluded-unit-tests
640 (string-join
641 '("AddressFromURL.Success"
642 "AddressFromURL.Failure"
643 "DNSResolver.IPv4Success"
644 "DNSResolver.DNSSECSuccess"
645 "DNSResolver.DNSSECFailure"
fc54da1d 646 "DNSResolver.GetTXTRecord"
fc54da1d 647 "is_hdd.linux_os_root")
8514662b 648 ":")))
797445be
TF
649 (invoke "tests/unit_tests/unit_tests"
650 (string-append "--gtest_filter=-"
b7a07bbd 651 excluded-unit-tests)))))
df90b6e7
GLV
652 (add-after 'install 'install-librandomx
653 (lambda* (#:key outputs #:allow-other-keys)
654 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
655 (install-file "external/randomx/librandomx.a" lib)
656 #t)))
b7a07bbd
GLV
657 (add-after 'install 'delete-dead-links
658 (lambda* (#:key outputs #:allow-other-keys)
659 (let ((out (assoc-ref outputs "out")))
660 (delete-file (string-append out "/lib/libprotobuf.so"))
661 (delete-file (string-append out "/lib/libusb-1.0.so"))
662 #t))))))
df90b6e7 663 (home-page "https://web.getmonero.org/")
8514662b
TF
664 (synopsis "Command-line interface to the Monero currency")
665 (description
fc54da1d
GLV
666 "Monero is a secure, private, untraceable currency. This package provides
667the Monero command line client and daemon.")
8514662b 668 (license license:bsd-3)))
79228a52 669
f7e24839 670(define-public monero-gui
79228a52 671 (package
f7e24839 672 (name "monero-gui")
39cc879a 673 (version "0.16.0.3")
79228a52
TF
674 (source
675 (origin
3902bc5c
TF
676 (method git-fetch)
677 (uri (git-reference
b0e7b699 678 (url "https://github.com/monero-project/monero-gui")
3902bc5c 679 (commit (string-append "v" version))))
398a96a2 680 (file-name (git-file-name name version))
79228a52 681 (sha256
39cc879a 682 (base32 "0iwjp8x5swy8i8pzrlm5v55awhm54cf48pm1vz98lcq361lhfzk6"))))
230e5db7 683 (build-system qt-build-system)
79228a52 684 (native-inputs
51bd1f5b
GLV
685 `(("monero-source" ,(package-source monero))
686 ("pkg-config" ,pkg-config)
6915d20f 687 ("qttools" ,qttools)))
79228a52
TF
688 (inputs
689 `(("boost" ,boost)
1362e529 690 ("hidapi" ,hidapi)
51bd1f5b 691 ("libgcrypt" ,libgcrypt)
1362e529 692 ("libsodium" ,libsodium)
b7a07bbd
GLV
693 ("libunwind" ,libunwind)
694 ("libusb" ,libusb)
79228a52 695 ("openssl" ,openssl)
b7a07bbd 696 ("protobuf" ,protobuf)
6915d20f
EF
697 ("qtbase" ,qtbase)
698 ("qtdeclarative" ,qtdeclarative)
699 ("qtgraphicaleffects" ,qtgraphicaleffects)
1362e529
GLV
700 ("qtlocation" ,qtlocation)
701 ("qtmultimedia" ,qtmultimedia)
6915d20f 702 ("qtquickcontrols" ,qtquickcontrols)
1362e529
GLV
703 ("qtquickcontrols2",qtquickcontrols2)
704 ("qtsvg" ,qtsvg)
1362e529 705 ("qtxmlpatterns" ,qtxmlpatterns)
79228a52
TF
706 ("unbound" ,unbound)))
707 (propagated-inputs
708 `(("monero" ,monero)))
709 (arguments
230e5db7 710 `(#:tests? #f ; No tests
1362e529 711 #:phases
79228a52 712 (modify-phases %standard-phases
51bd1f5b
GLV
713 (add-after 'unpack 'get-monero-extra-files
714 ;; Some headers and GnuPG public keys of the monero package source
715 ;; code are required to build the GUI.
716 (lambda* (#:key inputs #:allow-other-keys)
717 (invoke "tar" "-xv" "--wildcards" "--strip-components=1"
718 "-C" "monero"
719 "-f" (assoc-ref inputs "monero-source")
720 "*.asc" "*.h")
721 #t))
722 (add-after 'get-monero-extra-files 'fix-makefile-vars
79228a52
TF
723 (lambda _
724 (substitute* "src/zxcvbn-c/makefile"
725 (("\\?=") "="))
726 #t))
230e5db7
GLV
727 (add-after 'fix-makefile-vars 'fix-paths
728 (lambda* (#:key inputs outputs #:allow-other-keys)
729 (let ((boost (assoc-ref inputs "boost"))
730 (monero (assoc-ref inputs "monero"))
731 (openssl (assoc-ref inputs "openssl"))
732 (qttools (assoc-ref inputs "qttools"))
733 (out (assoc-ref outputs "out")))
734 (substitute* "monero-wallet-gui.pro"
735 (("-L/usr/local/lib")
736 "")
737 (("-L/usr/local/opt/openssl/lib")
738 (string-append "-L" openssl "/lib"))
739 (("-L/usr/local/opt/boost/lib")
740 (string-append "-L" boost "/lib"))
741 (("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease")
742 (string-append qttools "/bin/lrelease"))
743 (("\\$\\$\\[QT_INSTALL_BINS\\]/lupdate")
744 (string-append qttools "/bin/lupdate")))
745 (substitute* "deployment.pri"
746 (("/opt/\\$\\$\\{TARGET\\}/bin")
747 (string-append out "/bin")))
748 (substitute* "src/daemon/DaemonManager.cpp"
749 (("QApplication::applicationDirPath\\(\\) \\+ \"/monerod")
750 (string-append "\"" monero "/bin/monerod")))
751 #t)))
752 (add-after 'fix-paths 'make-qt-deterministic
1362e529
GLV
753 (lambda _
754 (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")
755 #t))
756 (add-after 'make-qt-deterministic 'fix-version
757 (lambda _
758 (substitute* "build.sh"
759 (("echo .*> version.js")
760 ""))
761 (with-output-to-file "version.js"
762 (lambda _
763 (format #t
764 "var GUI_VERSION = \"~a\"~@
765 var GUI_MONERO_VERSION = \"~a\"~%"
766 ,version
767 ,(package-version monero))))
768 #t))
230e5db7 769 (replace 'configure
79228a52 770 (lambda _
230e5db7 771 (mkdir-p "build")
1362e529 772 (chdir "build")
230e5db7
GLV
773 (invoke "qmake" "../monero-wallet-gui.pro" "CONFIG+=release")))
774 (add-before 'build 'build-zxcvbn-c
775 (lambda _
776 (invoke "make" "-C" "../src/zxcvbn-c"))))))
61fe56fc 777 (home-page "https://web.getmonero.org/")
79228a52
TF
778 (synopsis "Graphical user interface for the Monero currency")
779 (description
1362e529
GLV
780 "Monero is a secure, private, untraceable currency. This package provides
781the Monero GUI client.")
79228a52 782 (license license:bsd-3)))
00d3f022
DM
783
784(define-public python-trezor-agent
785 (package
786 (name "python-trezor-agent")
37cff994 787 (version "0.13.1")
00d3f022
DM
788 (source
789 (origin
39a7b720
TGR
790 (method git-fetch)
791 (uri (git-reference
b0e7b699 792 (url "https://github.com/romanz/trezor-agent")
39a7b720
TGR
793 (commit (string-append "v" version))))
794 (file-name (git-file-name name version))
00d3f022 795 (sha256
37cff994 796 (base32 "0q99vbfd3h85s8rnjipnmldixabqmmlk5w9karv6f0rhyi54f4zv"))))
00d3f022
DM
797 (build-system python-build-system)
798 (arguments
799 `(#:phases
800 (modify-phases %standard-phases
df724c9c
VC
801 (add-after 'unpack 'remove-requires-backports-shutil-which
802 ;; Remove requires on backport of shutil_which, as python 3.4+ has
803 ;; a built-in implementation supported in python-trezor-agent.
804 (lambda _
805 (substitute* "setup.py"
806 (("'backports.shutil_which>=3.5.1',") ""))
807 #t))
00d3f022
DM
808 (delete 'check)
809 (add-after 'install 'check
810 (lambda* (#:key outputs inputs #:allow-other-keys)
39a7b720 811 ;; Make installed package available for running the tests.
00d3f022
DM
812 (add-installed-pythonpath inputs outputs)
813 (invoke "py.test"))))))
814 (propagated-inputs
df724c9c
VC
815 `(("python-configargparse" ,python-configargparse)
816 ("python-daemon" ,python-daemon)
817 ("python-docutils" ,python-docutils)
818 ("python-ecdsa" ,python-ecdsa)
00d3f022 819 ("python-ed25519" ,python-ed25519)
df724c9c
VC
820 ("python-mnemonic" ,python-mnemonic)
821 ("python-pymsgbox" ,python-pymsgbox)
00d3f022 822 ("python-semver" ,python-semver)
df724c9c
VC
823 ("python-unidecode" ,python-unidecode)
824 ("python-wheel" ,python-wheel)))
00d3f022 825 (native-inputs
df724c9c
VC
826 `(("gnupg" ,gnupg)
827 ("python-mock" ,python-mock)
00d3f022
DM
828 ("python-pytest" ,python-pytest)))
829 (home-page "https://github.com/romanz/trezor-agent")
df724c9c 830 (synopsis "Use hardware wallets as SSH and GPG agent")
00d3f022
DM
831 (description
832 "@code{libagent} is a library that allows using TREZOR, Keepkey and
833Ledger Nano as a hardware SSH/GPG agent.")
834 (license license:lgpl3)))
835
6e9749ef
DM
836(define-public python-mnemonic
837 (package
838 (name "python-mnemonic")
011ec062 839 (version "0.19")
6e9749ef
DM
840 (source
841 (origin
842 (method url-fetch)
843 (uri (pypi-uri "mnemonic" version))
844 (sha256
011ec062 845 (base32 "0cd9prmdj8wzdmc7lxbf9lz0xrlkvak5ignag406mmfbn81fndsf"))))
6e9749ef
DM
846 (build-system python-build-system)
847 (propagated-inputs
848 `(("python-pbkdf2" ,python-pbkdf2)))
849 (home-page "https://github.com/trezor/python-mnemonic")
850 (synopsis "Implementation of Bitcoin BIP-0039")
851 (description "@code{mnemonic} is a library that provides an implementation
852of Bitcoin BIP-0039.")
853 (license license:expat)))
854
855(define-public python2-mnemonic
856 (package-with-python2 python-mnemonic))
96f5e2e9
DM
857
858(define-public python-ledgerblue
859 (package
860 (name "python-ledgerblue")
861 (version "0.1.16")
862 (source
863 (origin
864 (method url-fetch)
865 (uri (pypi-uri "ledgerblue" version))
866 (sha256
867 (base32
868 "010mghaqh1cmz3a0ifc3f40mmyplilwlw7kpha2mzyrrff46p9gb"))))
869 (build-system python-build-system)
870 (propagated-inputs
871 `(("python-ecpy" ,python-ecpy)
872 ("python-future" ,python-future)
873 ("python-hidapi" ,python-hidapi)
874 ("python-pillow" ,python-pillow)
875 ("python-protobuf" ,python-protobuf)
876 ("python-pycrypto" ,python-pycrypto)))
877 (home-page "https://github.com/LedgerHQ/blue-loader-python")
878 (synopsis "Python library to communicate with Ledger Blue/Nano S")
879 (description "@code{ledgerblue} is a Python library to communicate with
880Ledger Blue/Nano S.")
881 (license license:asl2.0)))
882
883(define-public python2-ledgerblue
884 (package-with-python2 python-ledgerblue))
885
1dca32e3
DM
886(define-public python-trezor
887 (package
888 (name "python-trezor")
9e7fccda 889 (version "0.12.1")
1dca32e3
DM
890 (source
891 (origin
892 (method url-fetch)
893 (uri (pypi-uri "trezor" version))
894 (sha256
9e7fccda 895 (base32 "1w19m9lws55k9sjhras47hpfpqwq1jm5vy135nj65yhkblygqg19"))))
1dca32e3
DM
896 (build-system python-build-system)
897 (propagated-inputs
b4c698c8 898 `(("python-click" ,python-click)
8c16b8a4 899 ("python-construct" ,python-construct)
b4c698c8 900 ("python-ecdsa" ,python-ecdsa)
b4c698c8 901 ("python-libusb1" ,python-libusb1)
1dca32e3 902 ("python-mnemonic" ,python-mnemonic)
b4c698c8 903 ("python-requests" ,python-requests)
8c16b8a4 904 ("python-typing-extensions" ,python-typing-extensions)))
1dca32e3 905 (native-inputs
61497aa4
TGR
906 ;; For tests.
907 `(("protobuf" ,protobuf)
908 ("python-black" ,python-black)
909 ("python-protobuf" ,python-protobuf)
910 ("python-isort" ,python-isort)
911 ("python-pyqt" ,python-pyqt)
912 ("python-pytest" ,python-pytest)))
1dca32e3
DM
913 (home-page "https://github.com/trezor/python-trezor")
914 (synopsis "Python library for communicating with TREZOR Hardware Wallet")
915 (description "@code{trezor} is a Python library for communicating with
916TREZOR Hardware Wallet.")
917 (license license:lgpl3)))
918
d6ddeffc
DM
919(define-public python-keepkey
920 (package
921 (name "python-keepkey")
52311b51 922 (version "6.0.3")
d6ddeffc
DM
923 (source
924 (origin
925 (method url-fetch)
926 (uri (pypi-uri "keepkey" version))
927 (sha256
928 (base32
52311b51 929 "0z3d0m6364v9dv0njs4cd5m5ai6j6v35xaaxfxl90m9vmyxy81vd"))))
d6ddeffc
DM
930 (build-system python-build-system)
931 (arguments
932 `(#:phases
933 (modify-phases %standard-phases
934 (delete 'check)
935 (add-after 'install 'check
936 (lambda* (#:key inputs outputs #:allow-other-keys)
937 (add-installed-pythonpath inputs outputs)
938 (apply invoke "python" (find-files "tests/unit" "\\.py$")))))))
939 (propagated-inputs
940 `(("python-ecdsa" ,python-ecdsa)
941 ("python-hidapi" ,python-hidapi)
02d9e5d2 942 ("python-libusb1" ,python-libusb1)
d6ddeffc
DM
943 ("python-mnemonic" ,python-mnemonic)
944 ("python-protobuf" ,python-protobuf)))
945 (home-page "https://github.com/keepkey/python-keepkey")
946 (synopsis "Python library for communicating with KeepKey Hardware Wallet")
947 (description "@code{keepkey} is a Python library for communicating with
948the KeepKey Hardware Wallet.")
949 (license license:lgpl3)))
950
951(define-public python2-keepkey
952 (package-with-python2 python-keepkey))
953
d596fea5
DM
954(define-public ledger-agent
955 (package
956 (name "ledger-agent")
957 (version "0.9.0")
958 (source
959 (origin
960 (method url-fetch)
961 (uri (pypi-uri "ledger_agent" version))
962 (sha256
963 (base32
964 "03zj602m2rln9yvr08dswy56vzkbldp8b074ixwzz525dafblr92"))))
965 (build-system python-build-system)
966 (inputs
967 `(("python-ledgerblue" ,python-ledgerblue)
968 ("python-trezor-agent" ,python-trezor-agent)))
702a1012 969 (home-page "https://github.com/romanz/trezor-agent")
d596fea5
DM
970 (synopsis "Ledger as hardware SSH/GPG agent")
971 (description "This package allows using Ledger as hardware SSH/GPG agent.
972
5859fd6c
MB
973Usage for SSH: trezor-agent foo@@example.com --connect
974Usage for GPG: Initialize using trezor-gpg init \"Foo <foo@@example.com>\"
d596fea5
DM
975Then set the environment variable GNUPGHOME to
976\"${HOME}/.gnupg/trezor\".")
977 (license license:lgpl3)))
47c8ea99
DM
978
979(define-public trezor-agent
980 (package
981 (name "trezor-agent")
7fafdadd 982 (version "0.10.0")
47c8ea99
DM
983 (source
984 (origin
985 (method url-fetch)
986 (uri (pypi-uri "trezor_agent" version))
987 (sha256
988 (base32
7fafdadd
VC
989 "144657c7bn0a667dq5fv5r6j7iilxf3h9agj29v1m2qpq40g0az8"))))
990 (arguments
991 ;; Tests fail with "AttributeError: module 'attr' has no attribute 's'".
992 `(#:phases
993 (modify-phases %standard-phases
994 (add-after 'wrap 'fixup-agent-py
995 (lambda* (#:key inputs outputs #:allow-other-keys)
996 (let* ((out (assoc-ref outputs "out")))
997 ;; overwrite the wrapper with the real thing.
998 (install-file "./trezor_agent.py"
999 (string-append out "/bin"))
1000 #t))))))
47c8ea99
DM
1001 (build-system python-build-system)
1002 (inputs
1003 `(("python-trezor" ,python-trezor)
1004 ("python-trezor-agent" ,python-trezor-agent)))
7fafdadd
VC
1005 (native-inputs
1006 `(("python-hidapi" ,python-hidapi)))
1007 (home-page "https://github.com/romanz/trezor-agent")
47c8ea99
DM
1008 (synopsis "Using Trezor as hardware SSH/GPG agent")
1009 (description "This package allows using Trezor as a hardware SSH/GPG
1010agent.")
1011 (license license:lgpl3)))
50c4d676
DM
1012
1013(define-public keepkey-agent
1014 (package
1015 (name "keepkey-agent")
1016 (version "0.9.0")
1017 (source
1018 (origin
1019 (method url-fetch)
1020 (uri (pypi-uri "keepkey_agent" version))
1021 (sha256
1022 (base32
1023 "03779gvlx70i0nnry98i4pl1d92604ix5x6jgdfkrdgzqbh5vj27"))))
1024 (build-system python-build-system)
1025 (inputs
1026 `(("python-keepkey" ,python-keepkey)
1027 ("python-trezor-agent" ,python-trezor-agent)))
702a1012 1028 (home-page "https://github.com/romanz/trezor-agent")
50c4d676
DM
1029 (synopsis "KeepKey as hardware SSH/GPG agent")
1030 (description "This package allows using KeepKey as a hardware SSH/GPG
1031agent.")
1032 (license license:lgpl3)))
3da86c52
AP
1033
1034(define-public python-stdnum
1035 (package
1036 (name "python-stdnum")
e918eaf5 1037 (version "1.14")
3da86c52
AP
1038 (source
1039 (origin
1040 (method url-fetch)
1041 (uri (pypi-uri "python-stdnum" version))
1042 (sha256
e918eaf5 1043 (base32 "070vd9zgvq0jchs4xc4j1h4r1l1lg4wwb8xs3p25k8c2xjw94fpx"))))
3da86c52 1044 (build-system python-build-system)
200acbc3
MB
1045 (arguments
1046 '(#:phases (modify-phases %standard-phases
1047 (replace 'check
1048 (lambda _
1049 (invoke "nosetests"))))))
1050 (native-inputs
1051 `(("python-nose" ,python-nose)))
e918eaf5
TGR
1052 (home-page "https://arthurdejong.org/python-stdnum/")
1053 (synopsis "Python module to handle standardized number and code formats")
3da86c52
AP
1054 (description
1055 "This is a Python library that aims to provide functions to handle,
1056parse and validate standard numbers.
1057The module supports more than 100 different number formats
1058amongst which a great number of VAT and other tax numbers,
1059personal identity and company identification codes,
1060international standard numbers (ISBN, IBAN, EAN, etc.)
1061and various other formats.
1062The module also inclused implementations of the Verhoeff,
1063Luhn and family of ISO/IEC 7064 check digit algorithms. ")
1064 (license license:lgpl2.1+)))
1065
1066(define-public python2-stdnum
1067 (package-with-python2 python-stdnum))
730553d7 1068
c7299015
NG
1069(define-public python-duniterpy
1070 (package
1071 (name "python-duniterpy")
fbfaba8a 1072 (version "0.57.0")
c7299015
NG
1073 (source
1074 (origin
c1d79b49
NG
1075 (method url-fetch)
1076 (uri (pypi-uri "duniterpy" version))
c7299015 1077 (sha256
fbfaba8a 1078 (base32 "0rw2c7r9gcqhymp82gbk1ky45zqbypsi2q5x4vdwjc6g00kh7h6l"))))
c7299015 1079 (build-system python-build-system)
1427d888 1080 (arguments
c1d79b49
NG
1081 ;; FIXME: Tests fail with: "ModuleNotFoundError: No module named
1082 ;; 'tests'". Not sure how to handle this.
42a57df8
NG
1083 `(#:tests? #f
1084 #:phases
1085 (modify-phases %standard-phases
c1d79b49
NG
1086 ;; "setup.py" tries to open missing "requirements.txt".
1087 (add-after 'unpack 'ignore-missing-file
42a57df8 1088 (lambda _
c1d79b49
NG
1089 (substitute* "setup.py"
1090 (("open\\('requirements\\.txt'\\)") "[]"))
42a57df8 1091 #t)))))
c7299015 1092 (propagated-inputs
352033f3 1093 `(("aiohttp" ,python-aiohttp)
c1d79b49 1094 ("attrs" ,python-attrs)
352033f3
NG
1095 ("base58" ,python-base58)
1096 ("jsonschema" ,python-jsonschema)
1097 ("libnacl" ,python-libnacl)
1098 ("pyaes" ,python-pyaes)
1099 ("pylibscrypt" ,python-pylibscrypt)
1100 ("pypeg2" ,python-pypeg2)))
9f1a2be2 1101 (home-page "https://git.duniter.org/clients/python/duniterpy")
c7299015
NG
1102 (synopsis "Python implementation of Duniter API")
1103 (description "@code{duniterpy} is an implementation of
207a79b2 1104@uref{https://github.com/duniter/duniter/, duniter} API. Its
c7299015
NG
1105main features are:
1106@itemize
207a79b2
NG
1107@item Support Duniter's Basic Merkle API and protocol
1108@item Asynchronous/synchronous without threads
1109@item Support HTTP, HTTPS and Web Socket transport for Basic Merkle API
1110@item Support Elasticsearch Duniter4j API
c7299015 1111@item Duniter signing key
207a79b2 1112@item Sign/verify and encrypt/decrypt messages with the Duniter credentials
c7299015
NG
1113@end itemize")
1114 (license license:gpl3+)))
1115
730553d7
NG
1116(define-public silkaj
1117 (package
1118 (name "silkaj")
293bc15d 1119 (version "0.7.6")
730553d7
NG
1120 (source
1121 (origin
293bc15d
NG
1122 (method url-fetch)
1123 (uri (pypi-uri "silkaj" version))
730553d7 1124 (sha256
293bc15d 1125 (base32 "0hrn0jwg415z7wjkp0myvw85wszlfi18f56j03075xxakr4dmi2j"))))
730553d7
NG
1126 (build-system python-build-system)
1127 (arguments
e627052f 1128 `(#:tests? #f)) ;no test
730553d7 1129 (inputs
c14b3a8d
NG
1130 `(("click" ,python-click)
1131 ("duniterpy" ,python-duniterpy)
c14b3a8d 1132 ("pynacl" ,python-pynacl)
f41378b7
NG
1133 ("tabulate" ,python-tabulate)
1134 ("texttable" ,python-texttable)))
293bc15d 1135 (home-page "https://git.duniter.org/clients/python/silkaj")
730553d7
NG
1136 (synopsis "Command line client for Duniter network")
1137 (description "@code{Silkaj} is a command line client for the
1138@uref{https://github.com/duniter/duniter/, Duniter} network.
1139
1140Its features are:
1141@itemize
1142@item information about currency,
1143@item issuers difficulty to generate next block,
1144@item network view of nodes,
1145@item list of last issuers,
1146@item send transactions,
1147@item get account amount.
1148@end itemize")
1149 (license license:agpl3+)))
90bb244f
TLC
1150
1151(define-public grisbi
1152 (package
1153 (name "grisbi")
1154 (version "1.2.2")
1155 (source
1156 (origin
1157 (method url-fetch)
1158 (uri (string-append
1159 "mirror://sourceforge/grisbi/grisbi%20stable/"
1160 (version-major+minor version) ".x/" version
1161 "/grisbi-" version ".tar.bz2"))
1162 (sha256
1163 (base32
1164 "1piiyyxjsjbw9gcqydvknzxmmfgh8kdqal12ywrxyxih2afwnvbw"))))
1165 (build-system glib-or-gtk-build-system)
1166 (arguments
1167 `(#:configure-flags (list "--without-ofx")))
1168 (propagated-inputs
1169 `(("dconf" ,dconf)))
1170 (native-inputs
1171 `(("glib" ,glib "bin") ; glib-compile-schemas
1172 ("pkg-config" ,pkg-config)
1173 ("intltool" ,intltool)))
1174 (inputs
1175 `(("gtk+" ,gtk+)
1176 ("libgsf" ,libgsf)))
1177 (synopsis "Personal accounting application")
1178 (description "Grisbi is a personal accounting application written by
1179French developers that is designed to follow French accounting rules.
1180Grisbi can manage multiple accounts, currencies and users. It manages
1181third party, expenditure and receipt categories, budgetary lines,
1182financial years, budget estimates, bankcard management and other
1183information.")
9c99cb22 1184 (home-page "https://grisbi.org")
90bb244f 1185 (license license:gpl2+)))
01b37d0f 1186
0639a240
MB
1187(define-public trezord-udev-rules
1188 (let ((commit "bff7fdfe436c727982cc553bdfb29a9021b423b0")
1189 (revision "0"))
1190 (package
1191 (name "trezord-udev-rules")
1192 (version (git-version "0.0.0" revision commit))
1193 (source
1194 (origin
1195 (method git-fetch)
1196 (uri (git-reference
b0e7b699 1197 (url "https://github.com/trezor/trezor-common")
0639a240
MB
1198 (commit commit)))
1199 (sha256
1200 (base32
1201 "14mrirrn68if7ja6qdk9qlxs1hv0f21vrxy5ncnms0gx9iwakp2l"))
1202 (file-name (git-file-name name version))))
1203 (build-system copy-build-system)
1204 (arguments
1205 '(#:install-plan
1206 '(("./udev/51-trezor.rules" "lib/udev/rules.d/"))))
1207 (home-page "https://github.com/trezor/trezor-common")
1208 (synopsis "Udev rules for trezord")
1209 (description
1210 "This contains the udev rules for trezord. This will let a user run
1211trezord as a regular user instead of needing to it run as root.")
1212 (license license:lgpl3+))))
1213
01b37d0f 1214(define-public trezord
1215 (package
1216 (name "trezord")
abb37b3c 1217 (version "2.0.29")
01b37d0f 1218 (source
1219 (origin
1220 (method git-fetch)
1221 (uri (git-reference
b0e7b699 1222 (url "https://github.com/trezor/trezord-go")
01b37d0f 1223 (commit (string-append "v" version))))
1224 (sha256
1225 (base32
abb37b3c 1226 "1ks1fa0027s3xp0z6qp0dxmayvrb4dwwscfhbx7da0khp153f2cp"))
01b37d0f 1227 (file-name (git-file-name name version))))
1228 (build-system go-build-system)
1229 (arguments
1230 '(#:import-path "github.com/trezor/trezord-go"))
1231 (home-page "https://trezor.io")
1232 (synopsis "Trezor Communication Daemon aka Trezor Bridge (written in Go)")
1233 (description "This allows a Trezor hardware wallet to communicate to the
1234Trezor wallet.")
1235 (license license:lgpl3+)))
af012922 1236
1237(define-public bitcoin-abc
1238 (package
af012922 1239 (name "bitcoin-abc")
4338d974 1240 (version "0.21.12")
af012922 1241 (source (origin
1242 (method url-fetch)
1243 (uri (string-append "https://download.bitcoinabc.org/"
28d46d9d 1244 version "/src/bitcoin-abc-"
af012922 1245 version ".tar.gz"))
1246 (sha256
1247 (base32
4338d974 1248 "1amzwy3gpl8ai90dsy7g0z51qq8vxfzbf642wn4bfynb8jmw3kx5"))))
f7237a2e 1249 (build-system cmake-build-system)
054ff198 1250 (native-inputs
f7237a2e 1251 `(("pkg-config" ,pkg-config)
054ff198
GLV
1252 ("python" ,python) ; for the tests
1253 ("util-linux" ,util-linux) ; provides the hexdump command for tests
1254 ("qttools" ,qttools)))
28d46d9d
GLV
1255 (inputs
1256 `(("bdb" ,bdb-5.3)
1257 ("boost" ,boost)
59668de4 1258 ("jemalloc" ,jemalloc)
28d46d9d
GLV
1259 ("libevent" ,libevent)
1260 ("miniupnpc" ,miniupnpc)
1261 ("openssl" ,openssl)
1262 ("protobuf" ,protobuf)
054ff198
GLV
1263 ("qrencode" ,qrencode)
1264 ("qtbase" ,qtbase)
f7237a2e 1265 ("zeromq" ,zeromq)
054ff198 1266 ("zlib" ,zlib)))
f7237a2e
GLV
1267 (arguments
1268 `(#:phases
1269 (modify-phases %standard-phases
1270 (add-before 'configure 'make-qt-deterministic
1271 (lambda _
1272 ;; Make Qt deterministic.
1273 (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")
1274 #t))
1275 (add-before 'check 'set-home
1276 (lambda _
1277 (setenv "HOME" (getenv "TMPDIR")) ; tests write to $HOME
1278 #t))
1279 (add-after 'check 'check-functional
1280 (lambda _
1281 (invoke
1282 "python3" "./test/functional/test_runner.py"
1283 (string-append "--jobs=" (number->string (parallel-job-count)))
1284 ;; TODO: find why the abc-miner-fund test fails.
1285 "--exclude=abc-miner-fund")
1286 #t)))))
af012922 1287 (home-page "https://www.bitcoinabc.org/")
1288 (synopsis "Bitcoin ABC peer-to-peer full node for the Bitcoin Cash protocol")
1289 (description
1290 "Bitcoin Cash brings sound money to the world, fulfilling the original
1291promise of Bitcoin as Peer-to-Peer Electronic Cash. Merchants and users are
1292empowered with low fees and reliable confirmations is a digital currency that
1293enables instant payments to anyone anywhere in the world. It uses
1294peer-to-peer technology to operate without central authority: managing
1295transactions and issuing money are carried out collectively by the network.
1296As a fork it implemented changes lowering the time between blocks and now
1297offers confimations after less than 5 seconds and have significantly lower
1298fees that BTC. Bitcoin ABC is the reference implementation of the Bitcoin
1299Cash protocol. This package provides the Bitcoin Cash command line client and
f7237a2e
GLV
1300a client based on Qt. This is a fork of Bitcoin Core.")
1301 (license license:expat)))
63ca1a89 1302
952fe2da
KK
1303(define-public libofx
1304 (package
1305 (name "libofx")
1306 (version "0.9.15")
1307 (source (origin
1308 (method git-fetch)
1309 (uri (git-reference
1310 (url "https://github.com/libofx/libofx")
1311 (commit version)))
1312 (file-name (git-file-name name version))
1313 (sha256
1314 (base32
1315 "1jx56ma351p8af8dvavygjwf6ipa7qbgq7bpdsymwj27apdnixfy"))))
1316 (build-system gnu-build-system)
1317 (arguments
c17fb659
MB
1318 '(#:parallel-build? #f ;fails with -j64
1319 #:configure-flags
952fe2da
KK
1320 (list (string-append "--with-opensp-includes="
1321 (assoc-ref %build-inputs "opensp")
1322 "/include/OpenSP"))))
1323 (native-inputs
1324 `(("autoconf" ,autoconf)
1325 ("automake" ,automake)
1326 ("gengetopt" ,gengetopt)
1327 ("help2man" ,help2man)
1328 ("libtool" ,libtool)
1329 ("pkg-config" ,pkg-config)))
1330 (inputs
1331 `(("curl" ,curl)
1332 ("libxml++-2" ,libxml++-2)
1333 ("opensp" ,opensp)))
1334 (home-page "http://libofx.sourceforge.net/")
1335 (synopsis "Library supporting the Open Financial Exchange format")
1336 (description
8b08cf4f 1337 "The LibOFX library is an API designed to allow applications to very easily
952fe2da
KK
1338support OFX command responses, usually provided by financial institutions. The
1339following three utilities are included with the library:
1340@enumerate
1341@item @code{ofxdump}
1342@item @code{ofx2qif}
1343@item @code{ofxconnect}
1344@end enumerate")
1345 (license license:gpl2+)))
1346
63ca1a89
KK
1347(define-public opensp
1348 (package
1349 (name "opensp")
1350 (version "1.5.2")
1351 (source (origin
1352 (method url-fetch)
1353 (uri (string-append "mirror://sourceforge/openjade/opensp/"
1354 version "/OpenSP-" version ".tar.gz"))
1355 (sha256
1356 (base32
1357 "1khpasr6l0a8nfz6kcf3s81vgdab8fm2dj291n5r2s53k228kx2p"))))
1358 (build-system gnu-build-system)
1359 (native-inputs
1360 `(("gettext" ,gettext-minimal)))
1361 (inputs
1362 `(("docbook-xml" ,docbook-xml-4.1.2)
1363 ("docbook-xsl" ,docbook-xsl)
1364 ("xmlto" ,xmlto)))
1365 (arguments
1366 `(;; TODO: Fix and enable tests.
1367 #:tests? #f
1368 #:phases
1369 (modify-phases %standard-phases
1370 (add-after 'unpack 'patch-docbook-paths
1371 (lambda* (#:key inputs #:allow-other-keys)
1372 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
1373 "/xml/dtd/docbook"))
1374 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
1375 "/xml/xsl/docbook-xsl-"
1376 ,(package-version docbook-xsl))))
1377 (substitute* (find-files "docsrc" "\\.xml$")
1378 (("/usr/share/sgml/docbook/xml-dtd-4.1.2") xmldoc)
1379 (("http://.*/docbookx\\.dtd")
1380 (string-append xmldoc "/docbookx.dtd")))
1381 ;; Directly pass the path to the stylesheet to xmlto.
1382 (substitute* "docsrc/Makefile.in"
1383 (("\\$\\(XMLTO\\)")
1384 (string-append "$(XMLTO) -x " xsldoc
1385 "/manpages/docbook.xsl")))
1386 #t))))))
1387 (home-page "http://openjade.sourceforge.net/")
1388 (synopsis "Suite of SGML/XML processing tools")
1389 (description "OpenSP is an object-oriented toolkit for SGML parsing and
1390entity management.")
1391 (license
1392 ;; expat license with added clause regarding advertising
1393 (license:non-copyleft
1394 "file://COPYING"
1395 "See COPYING in the distribution."))))
0edbb65d
GLV
1396
1397(define-public bitcoin-unlimited
1398 (package
1399 (name "bitcoin-unlimited")
35988130 1400 (version "1.9.0.0")
0edbb65d
GLV
1401 (source
1402 (origin
1403 (method git-fetch)
1404 (uri (git-reference
b0e7b699 1405 (url "https://github.com/BitcoinUnlimited/BitcoinUnlimited")
89c5b924 1406 (commit (string-append "BCHunlimited" version))))
0edbb65d
GLV
1407 (file-name (git-file-name name version))
1408 (sha256
35988130 1409 (base32 "1a64h7mcqdra4ahnw1nycp4ysx308ymgbl4yn5fj5jfaszdzvy0h"))))
0edbb65d
GLV
1410 (build-system gnu-build-system)
1411 (native-inputs
1412 `(("autoconf" ,autoconf)
1413 ("automake" ,automake)
1414 ("libtool" ,libtool)
1415 ("pkg-config" ,pkg-config)
1416 ("python" ,python) ; for the tests
1417 ("util-linux" ,util-linux) ; provides the hexdump command for tests
1418 ("qttools" ,qttools)))
1419 (inputs
1420 `(("bdb" ,bdb-4.8)
1421 ("boost" ,boost)
1422 ("libevent" ,libevent)
1423 ("miniupnpc" ,miniupnpc)
1424 ("openssl" ,openssl)
1425 ("protobuf" ,protobuf)
1426 ("qrencode" ,qrencode)
1427 ("qtbase" ,qtbase)
1428 ("zeromq" ,zeromq)
1429 ("zlib" ,zlib)))
1430 (arguments
1431 `(#:configure-flags
1432 (list
1433 ;; Boost is not found unless specified manually.
1434 (string-append "--with-boost="
1435 (assoc-ref %build-inputs "boost"))
1436 ;; XXX: The configure script looks up Qt paths by
1437 ;; `pkg-config --variable=host_bins Qt5Core`, which fails to pick
1438 ;; up executables residing in 'qttools', so we specify them here.
1439 (string-append "ac_cv_path_LRELEASE="
1440 (assoc-ref %build-inputs "qttools")
1441 "/bin/lrelease")
1442 (string-append "ac_cv_path_LUPDATE="
1443 (assoc-ref %build-inputs "qttools")
1444 "/bin/lupdate"))
1445 #:phases
1446 (modify-phases %standard-phases
89c5b924
GLV
1447 (add-after 'unpack 'fix-build
1448 (lambda _
1449 ;; The 'stack' header was not included in unlimited.cpp, which
1450 ;; caused the build to fail.
1451 (substitute* "src/unlimited.cpp"
1452 (("#include <queue>" all)
1453 (string-append all "\n#include <stack>")))
1454 #t))
0edbb65d
GLV
1455 (add-after 'unpack 'fix-tests
1456 (lambda _
89c5b924
GLV
1457 ;; TODO: Find why txvalidationcache_tests fails and
1458 ;; utilprocess_tests never ends. Disable for now.
1459 (substitute* "src/Makefile.test.include"
1460 (("test/txvalidationcache_tests.cpp")
1461 "")
1462 (("test/utilprocess_tests.cpp")
1463 ""))
0edbb65d
GLV
1464 #t))
1465 (add-before 'configure 'make-qt-deterministic
1466 (lambda _
1467 ;; Make Qt deterministic.
1468 (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")
1469 #t))
1470 (add-before 'check 'set-home
1471 (lambda _
1472 (setenv "HOME" (getenv "TMPDIR")) ; tests write to $HOME
1473 #t)))))
1474 (home-page "https://www.bitcoinunlimited.info/")
1475 (synopsis "Client for the Bitcoin Cash protocol")
1476 (description
1477 "Bitcoin Unlimited is a client for the Bitcoin Cash peer-to-peer
1478electronic cash system. This package provides a command line client and
1479a Qt GUI.")
1480 (license license:expat)))
f1f72484 1481
3e6aa0ce
T
1482(define-public fulcrum
1483 (package
1484 (name "fulcrum")
737b87ce 1485 (version "1.1.1")
3e6aa0ce
T
1486 (source
1487 (origin
1488 (method url-fetch)
1489 (uri (string-append "https://gitlab.com/FloweeTheHub/fulcrum/-/archive/v"
1490 version "/fulcrum-v" version ".tar.gz"))
1491 (sha256
737b87ce 1492 (base32 "04w5gw02d39caa8a0l6wkn87kc43zzad2prqsyrcq97vlbkdx6x6"))))
3e6aa0ce
T
1493 (build-system gnu-build-system)
1494 (arguments
1495 `(#:phases
1496 (modify-phases %standard-phases
1497 ;; Call qmake instead of configure to create a Makefile.
1498 (replace 'configure
1499 (lambda _
1500 (invoke
1501 "qmake"
1502 (string-append "PREFIX=" %output)
1503 "features="))))))
1504 (native-inputs
1505 `(("qttools" ,qttools)))
1506 (inputs
1507 `(("python" ,python)
1508 ("qtbase" ,qtbase)
1509 ("rocksdb" ,rocksdb)
1510 ("zlib" ,zlib)))
1511 (home-page "https://gitlab.com/FloweeTheHub/fulcrum/")
1512 (synopsis "Fast and nimble SPV server for Bitcoin Cash")
1513 (description
1514 "Flowee Fulcrum is a server that is the back-end for @acronym{SPV,
1515Simplified Payment Verification} wallets, it provides the full API for those
1516walets in a fast and small server. The full data is stored in a full node,
1517like Flowee the Hub, which Fulcrum connects to over RPC.")
1518 (license license:gpl3+)))
1519
87b343f7
T
1520(define-public flowee
1521 (package
1522 (name "flowee")
1bea1b35 1523 (version "2020.04.1")
87b343f7
T
1524 (source
1525 (origin
1526 (method url-fetch)
1527 (uri (string-append "https://gitlab.com/FloweeTheHub/thehub/-/archive/"
1528 version "/thehub-" version ".tar.gz"))
1529 (sha256
1bea1b35 1530 (base32 "1vwvaxm3b71pfx8l4rrv06wqks6xdf2333w856b36s1bzvj53rhc"))))
87b343f7
T
1531 (build-system cmake-build-system)
1532 (arguments
1533 `(#:configure-flags '("-Dbuild_tests=ON" "-Denable_gui=OFF")
1534 #:phases
1535 (modify-phases %standard-phases
1536 (add-before 'configure 'make-qt-deterministic
1537 (lambda _
1538 ;; Make Qt deterministic.
1539 (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")
1540 #t))
1541 (add-before 'configure 'disable-black-box
1542 ;; the black-box testing runs full hubs and lets them interact.
1543 ;; this is more fragile and a slow machine, or low memory machine, may
1544 ;; make the tests timeout and fail. We just disable them here.
1545 (lambda _
1546 (substitute* "testing/CMakeLists.txt"
1547 (("test_api") ""))
cc6653e7
T
1548 (substitute* "testing/CMakeLists.txt"
1549 (("add_subdirectory\\(api\\)") ""))
87b343f7
T
1550 #t))
1551 (add-after 'configure 'set-build-info
1552 ;; Their genbuild.sh to generate a build.h fails in guix (no .git dir) .
1553 ;; Its purpose is to write the tag name in the build.h file. We do that
1554 ;; here instead.
1555 (lambda _
1556 (with-output-to-file "include/build.h"
1557 (lambda _
1558 (display
1559 (string-append "#define BUILD_DESC " "\"", version "\""))))))
1560 (add-before 'check 'set-home
1561 (lambda _
1562 (setenv "HOME" (getenv "TMPDIR")) ; tests write to $HOME
1563 #t))
1564 (replace 'check
1565 (lambda _
1566 (invoke "make" "check" "-C" "testing"))))))
1567 (inputs
1568 `(("boost" ,boost)
1569 ("gmp" ,gmp)
1570 ("libevent" ,libevent)
1571 ("miniupnpc" ,miniupnpc)
1572 ("openssl" ,openssl)
1573 ("qtbase" ,qtbase)))
1574 (native-inputs
1575 `(("pkg-config" ,pkg-config)
1576 ("qttools" ,qttools)
1577 ("util-linux" ,util-linux))) ; provides the hexdump command for tests
1578 (home-page "https://flowee.org")
1579 (synopsis "Flowee infrastructure tools and services")
1580 (description
1581 "Flowee packages all tier-1 applications and services from the Flowee group.
1582This includes components like The Hub and Indexer which and various others
1583that allows you to run services and through them access the Bitcoin Cash networks.")
1584 (license license:gpl3+)))
1585
1586
f1f72484
CLW
1587(define-public beancount
1588 (package
1589 (name "beancount")
1590 (version "2.2.3")
1591 (source
1592 (origin
1593 (method url-fetch)
1594 (uri (pypi-uri "beancount" version))
1595 (sha256
1596 (base32
1597 "0pcfl2rx2ng06i4f9izdpnlnb1k0rdzsckbzzn4cn4ixfzyssm0m"))
1598 (patches (search-patches "beancount-disable-googleapis-fonts.patch"))))
1599 (build-system python-build-system)
1600 (arguments
1601 `(#:tests? #f ; Says test is missing, not sure why
1602 #:phases
1603 (modify-phases %standard-phases
1604 ;; Not importing the googleapis package for now
1605 (add-after 'unpack 'ignore-googleapis
1606 (lambda _
1607 (substitute* "setup.py"
1608 (("'google-api-python-client',") ""))
1609 #t)))))
9afc618e 1610 (inputs
f1f72484
CLW
1611 `(("python-beautifulsoup4" ,python-beautifulsoup4)
1612 ("python-bottle" ,python-bottle)
1613 ("python-chardet" ,python-chardet)
1614 ("python-dateutil" ,python-dateutil)
1615 ("python-lxml" ,python-lxml)
1616 ("python-magic" ,python-magic)
1617 ("python-ply" ,python-ply)
f1f72484 1618 ("python-requests" ,python-requests)))
74b992fb
MB
1619 (native-inputs
1620 `(("python-pytest" ,python-pytest)))
f1f72484
CLW
1621 (home-page "http://furius.ca/beancount")
1622 (synopsis "Command-line double-entry accounting tool")
1623 (description
1624 "Beancount is a double-entry bookkeeping computer language that lets you
1625define financial transaction records in a text file, read them in memory,
1626generate a variety of reports from them, and provides a web interface.")
1627 (license license:gpl2)))
805d7021
MB
1628
1629;; The beancount source ships with elisp in a subdirectory
1630(define-public emacs-beancount
1631 (package
1632 (inherit beancount)
1633 (name "emacs-beancount")
1634 (build-system emacs-build-system)
1635 (arguments
1636 `(#:tests? #f ;no tests
1637 #:phases
1638 (modify-phases %standard-phases
1639 (add-before 'install 'chdir-emacs
1640 (lambda _
1641 (chdir "editors/emacs")
1642 #t)))))
48cb6408
MB
1643 (inputs '())
1644 (native-inputs '())
805d7021
MB
1645 (synopsis "Emacs mode for beancount")
1646 (description
1647 "Emacs-beancount is an Emacs mode for the Beancount accounting tool.")))