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