projects/guix·blob ruby-team · refs

2661 lines · 101.7 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015, 2016, 2023 Andreas Enge <[email protected]>
3;;; Copyright © 2016-2018, 2023 Efraim Flashner <[email protected]>
4;;; Copyright © 2016 Alex Griffin <[email protected]>
5;;; Copyright © 2016, 2020, 2024, 2025 Hartmut Goebel <[email protected]>
6;;; Copyright © 2017 Carlo Zancanaro <[email protected]>
7;;; Copyright © 2017 Theodoros Foradis <[email protected]>
8;;; Copyright © 2017 Vasile Dumitrascu <[email protected]>
9;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <[email protected]>
10;;; Copyright © 2018 Eric Bavier <[email protected]>
11;;; Copyright © 2018 Adriano Peluso <[email protected]>
12;;; Copyright © 2018-2022, 2024, 2025 Nicolas Goaziou <[email protected]>
13;;; Copyright © 2018 Arun Isaac <[email protected]>
14;;; Copyright © 2019-2025 Guillaume Le Vaillant <[email protected]>
15;;; Copyright © 2019 Tanguy Le Carrour <[email protected]>
16;;; Copyright © 2019, 2020 Martin Becze <[email protected]>
17;;; Copyright © 2019 Sebastian Schott <[email protected]>
18;;; Copyright © 2020 Kei Kebreau <[email protected]>
19;;; Copyright © 2020 Christine Lemmer-Webber <[email protected]>
20;;; Copyright © 2020 Tom Zander <[email protected]>
21;;; Copyright © 2020, 2023 Marius Bakke <[email protected]>
22;;; Copyright © 2020, 2021, 2022, 2024, 2025 Vinicius Monego <[email protected]>
23;;; Copyright © 2020 Carlo Holl <[email protected]>
24;;; Copyright © 2020 Giacomo Leidi <[email protected]>
25;;; Copyright © 2021 ZmnSCPxj jxPCSnmZ <[email protected]>
26;;; Copyright © 2021 François J <[email protected]>
27;;; Copyright © 2021 Foo Chuan Wei <[email protected]>
28;;; Copyright © 2021, 2026 John Kehayias <[email protected]>
29;;; Copyright © 2022 Kyle Meyer <[email protected]>
30;;; Copyright © 2022 Aleksandr Vityazev <[email protected]>
31;;; Copyright © 2022, 2025-2026 Maxim Cournoyer <[email protected]>
32;;; Copyright © 2022 Philip McGrath <[email protected]>
33;;; Copyright © 2022 Collin J. Doering <[email protected]>
34;;; Copyright © 2023 dan <[email protected]>
35;;; Copyright © 2022 Justin Veilleux <[email protected]>
36;;; Copyright © 2023 Frank Pursel <[email protected]>
37;;; Copyright © 2023 Skylar Hill <[email protected]>
38;;; Copyright © 2023 Foundation Devices, Inc. <[email protected]>
39;;; Copyright © 2023 Attila Lendvai <[email protected]>
40;;; Copyright © 2024 Saku Laesvuori <[email protected]>
41;;; Copyright © 2024 Sharlatan Hellseher <[email protected]>
42;;; Copyright © 2025-2026 Hennadii Stepanov <[email protected]>
43;;; Copyright © 2025 James Smith <[email protected]>
44;;; Copyright © 2026 Robin Templeton <[email protected]>
45;;; Copyright © 2026 Artyom V. Poptsov <[email protected]>
46;;;
47;;; This file is part of GNU Guix.
48;;;
49;;; GNU Guix is free software; you can redistribute it and/or modify it
50;;; under the terms of the GNU General Public License as published by
51;;; the Free Software Foundation; either version 3 of the License, or (at
52;;; your option) any later version.
53;;;
54;;; GNU Guix is distributed in the hope that it will be useful, but
55;;; WITHOUT ANY WARRANTY; without even the implied warranty of
56;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
57;;; GNU General Public License for more details.
58;;;
59;;; You should have received a copy of the GNU General Public License
60;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
61
62(define-module (gnu packages finance)
63 #:use-module ((guix licenses) #:prefix license:)
64 #:use-module (guix packages)
65 #:use-module (guix download)
66 #:use-module (guix git-download)
67 #:use-module (guix build-system gnu)
68 #:use-module (guix build-system cargo)
69 #:use-module (guix build-system cmake)
70 #:use-module (guix build-system cargo)
71 #:use-module (guix build-system copy)
72 #:use-module (guix build-system emacs)
73 #:use-module (guix build-system haskell)
74 #:use-module (guix build-system pyproject)
75 #:use-module (guix build-system glib-or-gtk)
76 #:use-module (guix build-system go)
77 #:use-module (guix build-system qt)
78 #:use-module (guix deprecation)
79 #:use-module (guix gexp)
80 #:use-module (guix utils)
81 #:use-module (srfi srfi-26)
82 #:use-module (gnu packages)
83 #:use-module (gnu packages aidc)
84 #:use-module (gnu packages autotools)
85 #:use-module (gnu packages bash)
86 #:use-module (gnu packages base)
87 #:use-module (gnu packages bison)
88 #:use-module (gnu packages boost)
89 #:use-module (gnu packages build-tools)
90 #:use-module (gnu packages check)
91 #:use-module (gnu packages compression)
92 #:use-module (gnu packages cpp)
93 #:use-module (gnu packages crypto)
94 #:use-module (gnu packages curl)
95 #:use-module (gnu packages databases)
96 #:use-module (gnu packages docbook)
97 #:use-module (gnu packages documentation)
98 #:use-module (gnu packages dns)
99 #:use-module (gnu packages emacs)
100 #:use-module (gnu packages emacs-xyz)
101 #:use-module (gnu packages dbm)
102 #:use-module (gnu packages compiler-tools)
103 #:use-module (gnu packages freedesktop)
104 #:use-module (gnu packages gettext)
105 #:use-module (gnu packages glib)
106 #:use-module (gnu packages gnome)
107 #:use-module (gnu packages gnupg)
108 #:use-module (gnu packages golang)
109 #:use-module (gnu packages golang-web)
110 #:use-module (gnu packages golang-xyz)
111 #:use-module (gnu packages graphviz)
112 #:use-module (gnu packages groff)
113 #:use-module (gnu packages gsasl)
114 #:use-module (gnu packages gtk)
115 #:use-module (gnu packages haskell-check)
116 #:use-module (gnu packages haskell-web)
117 #:use-module (gnu packages haskell-xyz)
118 #:use-module (gnu packages imagemagick)
119 #:use-module (gnu packages iso-codes)
120 #:use-module (gnu packages jemalloc)
121 #:use-module (gnu packages libedit)
122 #:use-module (gnu packages libevent)
123 #:use-module (gnu packages libunwind)
124 #:use-module (gnu packages libusb)
125 #:use-module (gnu packages linux)
126 #:use-module (gnu packages man)
127 #:use-module (gnu packages maths)
128 #:use-module (gnu packages mpi)
129 #:use-module (gnu packages multiprecision)
130 #:use-module (gnu packages ncurses)
131 #:use-module (gnu packages networking)
132 #:use-module (gnu packages nss)
133 #:use-module (gnu packages perl)
134 #:use-module (gnu packages pdf)
135 #:use-module (gnu packages pkg-config)
136 #:use-module (gnu packages popt)
137 #:use-module (gnu packages protobuf)
138 #:use-module (gnu packages python)
139 #:use-module (gnu packages python-build)
140 #:use-module (gnu packages python-check)
141 #:use-module (gnu packages python-crypto)
142 #:use-module (gnu packages python-science)
143 #:use-module (gnu packages python-web)
144 #:use-module (gnu packages python-xyz)
145 #:use-module (gnu packages qt)
146 #:use-module (gnu packages readline)
147 #:use-module (gnu packages rust-apps)
148 #:use-module (gnu packages security-token)
149 #:use-module (gnu packages serialization)
150 #:use-module (gnu packages sphinx)
151 #:use-module (gnu packages sqlite)
152 #:use-module (gnu packages tex)
153 #:use-module (gnu packages texinfo)
154 #:use-module (gnu packages textutils)
155 #:use-module (gnu packages time)
156 #:use-module (gnu packages tls)
157 #:use-module (gnu packages upnp)
158 #:use-module (gnu packages web)
159 #:use-module (gnu packages xml)
160 #:use-module (gnu packages gnuzilla))
161
162(define-public bitcoin-core
163 ;; The support lifetimes for bitcoin-core versions can be found in
164 ;; <https://bitcoincore.org/en/lifecycle/#schedule>.
165 (package
166 (name "bitcoin-core")
167 (version "31.1")
168 (source (origin
169 (method url-fetch)
170 (uri
171 (string-append "https://bitcoincore.org/bin/bitcoin-core-"
172 version "/bitcoin-" version ".tar.gz"))
173 (sha256
174 (base32
175 "1jdgqrpqnqrxi508hwmy5my6xp9adkmmjirrk40ckr678ddishah"))))
176 (build-system qt-build-system)
177 (arguments
178 (list #:qtbase qtbase
179 #:configure-flags
180 #~(list
181 "-DBUILD_GUI=ON"
182 "-DBUILD_BENCH=ON"
183 "-DWITH_ZMQ=ON")
184 #:qtbase qtbase
185 #:phases
186 #~(modify-phases %standard-phases
187 (add-before 'build 'set-no-git-flag
188 (lambda _
189 ;; Make it clear we are not building from within a git repository
190 ;; (and thus no information regarding this build is available
191 ;; from git).
192 (setenv "BITCOIN_GENBUILD_NO_GIT" "1")))
193 (add-after 'check 'check-functional
194 (lambda _
195 (invoke
196 "python3" "./test/functional/test_runner.py" "--timeout-factor=2"
197 (string-append "--jobs=" (number->string (parallel-job-count)))))))))
198 (native-inputs
199 (list pkg-config
200 python ; for the tests
201 python-pyzmq ; for the tests
202 qttools))
203 (inputs
204 (list boost
205 capnproto
206 libevent
207 qrencode
208 qtwayland
209 sqlite
210 zeromq))
211 (home-page "https://bitcoincore.org/")
212 (synopsis "Bitcoin peer-to-peer client")
213 (description
214 "Bitcoin is a digital currency that enables instant payments to anyone
215anywhere in the world. It uses peer-to-peer technology to operate without
216central authority: managing transactions and issuing money are carried out
217collectively by the network. Bitcoin Core is the reference implementation
218of the bitcoin protocol. This package provides the Bitcoin Core command
219line client and a client based on Qt.")
220 (license license:expat)))
221
222(define-public bitcoin-knots
223 (package
224 (inherit bitcoin-core)
225 (name "bitcoin-knots")
226 (version "29.2.knots20251110")
227 (source (origin
228 (method url-fetch)
229 (uri (string-append
230 "https://bitcoinknots.org/files/" (version-major version)
231 ".x/" version "/bitcoin-" version ".tar.gz"))
232 (sha256
233 (base32
234 "04kh88xklyq5w2x0zykfas6ssxajp1z33c2899fq342jnfr510b6"))))
235 (arguments
236 (substitute-keyword-arguments arguments
237 ((#:configure-flags original-flags '())
238 #~(cons "-DWITH_QT_VERSION=6"
239 #$original-flags))))
240 (native-inputs
241 (modify-inputs native-inputs
242 (delete qttools)
243 (append imagemagick
244 librsvg
245 qttools)))
246 (home-page "https://bitcoinknots.org")
247 (synopsis "Enhanced Bitcoin node/wallet based on Bitcoin Core")
248 (description "Bitcoin Knots connects to the Bitcoin peer-to-peer network
249to download and fully validate blocks and transactions. It also includes a
250wallet and graphical user interface.")
251 (license license:expat)))
252
253(define-public bitcoin-cash-node
254 (package
255 (name "bitcoin-cash-node")
256 (version "29.0.0")
257 (source
258 (origin
259 (method git-fetch)
260 (uri (git-reference
261 (url "https://gitlab.com/bitcoin-cash-node/bitcoin-cash-node.git")
262 (commit (string-append "v" version))))
263 (file-name (git-file-name name version))
264 (sha256
265 (base32 "0fk0zfnl99552yfhzzvzj46lg16fr4dbgh0agp5pqll30wbk78d9"))))
266 (build-system cmake-build-system)
267 (native-inputs
268 (list help2man
269 pkg-config
270 python
271 python-scipy
272 qttools-5))
273 (inputs
274 (list bdb
275 boost
276 expat
277 gmp
278 jemalloc
279 libevent
280 libnatpmp
281 miniupnpc
282 openssl
283 qrencode
284 qtbase-5
285 zeromq
286 zlib))
287 (arguments
288 (list #:configure-flags #~(list "-DCLIENT_VERSION_IS_RELEASE=ON")
289 #:phases
290 #~(modify-phases %standard-phases
291 (add-before 'check 'set-home
292 (lambda _
293 ;; Tests write to $HOME.
294 (setenv "HOME" (getenv "TMPDIR"))))
295 (replace 'check
296 (lambda* (#:key tests? #:allow-other-keys)
297 (when tests?
298 (invoke "python3" "./test/functional/test_runner.py"
299 (string-append "--jobs=" (number->string
300 (parallel-job-count)))
301 ;; FIXME: rpc_bind test fails with:
302 ;; File ".../netutil.py", line 132, in addr_to_hex
303 ;; if '.' in addr: # IPv4
304 ;; TypeError: argument of type 'NoneType' is not
305 ;; iterable
306 "-x" "rpc_bind")))))))
307 (home-page "https://bitcoincashnode.org/")
308 (synopsis "Bitcoin Cash peer-to-peer client")
309 (description
310 "Bitcoin Cash is a digital currency that enables instant payments to
311anyone, anywhere in the world. It uses peer-to-peer technology to operate with
312no central authority: managing transactions and issuing money are carried out
313collectively by the network. Bitcoin Cash is a descendant of Bitcoin. It
314became a separate currency from the version supported by Bitcoin Core when the
315two split on August 1, 2017. Bitcoin Cash and the Bitcoin Core version of
316Bitcoin share the same transaction history up until the split.
317This package provides the Bitcoin Cash Node command line client and a client
318based on Qt.")
319 (license license:expat)))
320
321(define-public ghc-hledger
322 (package
323 (name "ghc-hledger")
324 (version "1.43.2")
325 (source
326 (origin
327 (method url-fetch)
328 (uri (hackage-uri "hledger" version))
329 (sha256
330 (base32 "043gw3amc29fbjxlzyc4m97bw5i5462352lmk61adlxcd12l47i1"))))
331 (build-system haskell-build-system)
332 (properties '((upstream-name . "hledger")))
333 (inputs (list ghc-decimal
334 ghc-diff
335 ghc-aeson
336 ghc-ansi-terminal
337 ghc-cmdargs
338 ghc-data-default
339 ghc-extra
340 ghc-githash
341 ghc-hashable
342 ghc-hledger-lib
343 ghc-http-client
344 ghc-http-types
345 ghc-lucid
346 ghc-math-functions
347 ghc-megaparsec
348 ghc-microlens
349 ghc-modern-uri
350 ghc-regex-tdfa
351 ghc-req
352 ghc-safe
353 ghc-shakespeare
354 ghc-split
355 ghc-tabular
356 ghc-tasty
357 ghc-temporary
358 ghc-text-ansi
359 ghc-timeit
360 ghc-unordered-containers
361 ghc-utf8-string
362 ghc-utility-ht
363 ghc-wizards))
364 (home-page "http://hledger.org")
365 (synopsis "Command-line interface for the hledger accounting system")
366 (description
367 "The command-line interface for the hledger accounting system. Its basic
368function is to read a plain text file describing financial transactions and
369produce useful reports.
370
371hledger is a robust, cross-platform set of tools for tracking money, time, or
372any other commodity, using double-entry accounting and a simple, editable file
373format, with command-line, terminal and web interfaces. It is a Haskell
374rewrite of Ledger, and one of the leading implementations of Plain Text
375Accounting.")
376 (license license:gpl3)))
377
378(define-public hledger
379 (package
380 (inherit ghc-hledger)
381 (name "hledger")
382 (arguments
383 (list
384 #:haddock? #f
385 #:phases
386 #~(modify-phases %standard-phases
387 (add-after 'install 'install-doc
388 (lambda _
389 (install-file "embeddedfiles/hledger.info" (string-append #$output "/share/info"))
390 (install-file "embeddedfiles/hledger.1" (string-append #$output "/man/man1"))))
391 (add-after 'register 'remove-libraries
392 (lambda* (#:key outputs #:allow-other-keys)
393 (delete-file-recursively (string-append (assoc-ref outputs "out") "/lib")))))))))
394
395(define-public homebank
396 (package
397 (name "homebank")
398 (version "5.10.2")
399 (source (origin
400 (method url-fetch)
401 (uri (string-append "https://www.gethomebank.org/public/sources"
402 "/homebank-" version ".tar.gz"))
403 (sha256
404 (base32
405 "1iy4dddcmpjgndpvjq2nbl0nwpdhds6pjrz2z345a8d2gvhazgph"))))
406 (build-system glib-or-gtk-build-system)
407 (native-inputs
408 (list pkg-config intltool))
409 (inputs
410 (list gtk+ libofx libsoup-minimal))
411 (home-page "https://gethomebank.org/en/index.php")
412 (synopsis "Graphical personal accounting application")
413 (description "HomeBank allows you to manage your personal accounts at
414home. The seeks to be lightweight, simple and easy to use. It brings
415features that allow you to analyze your finances in a detailed way instantly
416and dynamically with report tools based on filtering and graphical charts.")
417 (properties
418 '((release-monitoring-url . "https://www.gethomebank.org/en/downloads.php")))
419 (license license:gpl2+)))
420
421(define-public ledger
422 (package
423 (name "ledger")
424 (version "3.4.1")
425 (source
426 (origin
427 (method git-fetch)
428 (uri (git-reference
429 (url "https://github.com/ledger/ledger")
430 (commit (string-append "v" version))))
431 (file-name (git-file-name name version))
432 (sha256
433 (base32 "023265i1hd009jwsb8qpjgz8jjqn601rkk7fy1c0dklli7hbykna"))))
434 (build-system cmake-build-system)
435 (arguments
436 (list
437 #:imported-modules (append %cmake-build-system-modules
438 %pyproject-build-system-modules)
439 #:modules '((guix build cmake-build-system)
440 (guix build utils)
441 ((guix build pyproject-build-system) #:prefix py:))
442 #:configure-flags
443 #~(list "-DBUILD_DOCS:BOOL=ON"
444 "-DBUILD_WEB_DOCS:BOOL=ON"
445 "-DUSE_PYTHON:BOOL=ON"
446 "-DCMAKE_INSTALL_LIBDIR:PATH=lib")
447 #:phases
448 #~(modify-phases %standard-phases
449 (add-after 'unpack 'fix-python-installation-directory
450 (lambda* (#:key inputs outputs #:allow-other-keys)
451 ;; By default the package attempts to install its Python bindings
452 ;; to the Python store directory, which obviously does not work.
453 ;; Passing -DPython_SITEARCH in #:configure-flags has no effect.
454 (substitute* "src/CMakeLists.txt"
455 (("DESTINATION \\$\\{Python_SITEARCH\\}")
456 (string-append "DESTINATION "
457 (py:site-packages inputs outputs))))))
458 (add-before 'configure 'install-examples
459 (lambda* (#:key outputs #:allow-other-keys)
460 (let ((examples (string-append (assoc-ref outputs "out")
461 "/share/doc/ledger/examples")))
462 (install-file "test/input/sample.dat" examples)
463 (install-file "test/input/demo.ledger" examples)
464 (install-file "contrib/report" examples))))
465 (add-after 'build 'build-doc
466 (lambda _ (invoke "make" "doc")))
467 (add-before 'check 'check-setup
468 ;; One test fails if it can't set the timezone.
469 (lambda* (#:key inputs #:allow-other-keys)
470 (setenv "TZDIR"
471 (search-input-directory inputs
472 "share/zoneinfo")))))))
473 (inputs
474 (list boost-1.83
475 gmp
476 libedit
477 mpfr
478 python
479 utfcpp))
480 (native-inputs
481 (list groff texinfo tzdata-for-tests))
482 (home-page "https://ledger-cli.org/")
483 (synopsis "Command-line double-entry accounting program")
484 (description
485 "Ledger is a powerful, double-entry accounting system that is
486accessed from the UNIX command-line. This may put off some users, since
487there is no flashy UI, but for those who want unparalleled reporting
488access to their data there are few alternatives.
489
490Ledger uses text files for input. It reads the files and generates
491reports; there is no other database or stored state. To use Ledger,
492you create a file of your account names and transactions, run from the
493command line with some options to specify input and requested reports, and
494get output. The output is generally plain text, though you could generate
495a graph or html instead. Ledger is simple in concept, surprisingly rich
496in ability, and easy to use.")
497 ;; There are some extra licenses in files which do not presently get
498 ;; installed when you build this package. Different versions of the GPL
499 ;; are used in the contrib and python subdirectories. The bundled version
500 ;; of utfcpp is under the Boost 1.0 license. Also the file
501 ;; `tools/update_copyright_year` has an Expat license.
502 (license (list license:bsd-3
503 license:asl2.0 ; src/strptime.cc
504 (license:non-copyleft
505 "file://src/wcwidth.cc"
506 "See src/wcwidth.cc in the distribution.")))))
507
508(define-public emacs-ledger-mode
509 ;; The last release was on Nov 8, 2019 and doesn't build with Emacs 28.
510 (let ((commit "356d8049ede02c06db4f487d1d6076f74d6098c5")
511 (revision "1"))
512 (package
513 (name "emacs-ledger-mode")
514 (version (git-version "4.0.0" revision commit))
515 (source
516 (origin
517 (method git-fetch)
518 (uri (git-reference
519 (url "https://github.com/ledger/ledger-mode")
520 (commit commit)))
521 (file-name (git-file-name name version))
522 (sha256
523 (base32 "1wssagczhils0nx12b2nq2jk2gp9j26jn8nrqdrj255nzl40aia1"))))
524 (build-system emacs-build-system)
525 (arguments
526 (list
527 #:tests? #t
528 #:phases
529 #~(modify-phases %standard-phases
530 (add-after 'unpack 'do-not-require-tests-at-runtime
531 (lambda _
532 (substitute* "ledger-mode.el"
533 (("\\(require 'ledger-test\\)") ""))))
534 (add-after 'unpack 'patch-path
535 (lambda* (#:key inputs #:allow-other-keys)
536 (emacs-substitute-variables "ledger-exec.el"
537 ("ledger-binary-path" (search-input-file inputs "/bin/ledger")))))
538 (add-after 'build 'build-doc
539 (lambda _
540 (let ((target (string-append #$output "/share/info")))
541 (mkdir-p target)
542 (invoke "makeinfo" "-o" target
543 "../source/doc/ledger-mode.texi"))))
544 (replace 'check
545 (lambda* (#:key tests? #:allow-other-keys)
546 (when tests?
547 (with-directory-excursion "../source/test"
548 ;; Test does not respect `ledger-binary-path' and thus fails
549 (delete-file-recursively "report-test.el")
550 (invoke "make" "test"))))))))
551 (inputs
552 (list ledger))
553 (native-inputs
554 (list texinfo))
555 (home-page "https://ledger-cli.org/")
556 (synopsis "Command-line double-entry accounting program")
557 (description
558 "Ledger is a powerful, double-entry accounting system that is
559accessed from the UNIX command-line. This may put off some users, since
560there is no flashy UI, but for those who want unparalleled reporting
561access to their data there are few alternatives.
562
563Ledger uses text files for input. It reads the files and generates
564reports; there is no other database or stored state. To use Ledger,
565you create a file of your account names and transactions, run from the
566command line with some options to specify input and requested reports, and
567get output. The output is generally plain text, though you could generate
568a graph or html instead. Ledger is simple in concept, surprisingly rich
569in ability, and easy to use.
570
571This package provides the Emacs mode.")
572 (license license:gpl2+))))
573
574(define-public emacs-hledger-mode
575 (let ((commit "400bde42a8d2712af80cd7c773c9cdfbb63a515a")
576 (revision "1"))
577 (package
578 (name "emacs-hledger-mode")
579 (version (git-version "20220515" revision commit))
580 (source (origin
581 (method git-fetch)
582 (uri (git-reference
583 (url "https://github.com/narendraj9/hledger-mode")
584 (commit commit)))
585 (file-name (git-file-name name version))
586 (sha256
587 (base32
588 "0xmcfpr3rxli1adwypg18npl8hb8ak5rg6a6i26inzzqja6vr897"))))
589 (build-system emacs-build-system)
590 (propagated-inputs
591 (list emacs-popup
592 emacs-async
593 emacs-htmlize))
594 (arguments
595 '(#:include '("^[^/]+.el$")
596 #:exclude '()))
597 (home-page "https://github.com/narendraj9/hledger-mode")
598 (synopsis "Mode for writing journal entries for hledger")
599 (description
600 "This major mode for Emacs enables writing and managing hledger
601journal files. It generates some useful reports along with some financial
602ratios that can help you keep a check on your financial health for users of
603the plaintext accounting system hledger.")
604 (license license:gpl3))))
605
606(define-public geierlein
607 (package
608 (name "geierlein")
609 (version "0.9.13")
610 (source
611 (origin
612 (method git-fetch)
613 (uri (git-reference
614 (url "https://github.com/stesie/geierlein")
615 (commit (string-append "V" version))))
616 (file-name (git-file-name name version))
617 (sha256
618 (base32 "00zpwr3lk2vdmd60fgdwdk0xxs52wvnm19ln2m75yfphydvkglic"))))
619 (build-system gnu-build-system)
620 (arguments
621 `(#:tests? #f ; would require npm, python and a lot more
622 #:phases
623 (modify-phases %standard-phases
624 (delete 'configure) ; no configure script
625 (add-after 'unpack 'override-target-directory-and-tool-paths
626 (lambda* (#:key inputs outputs #:allow-other-keys)
627 (substitute* "Makefile"
628 (("prefix := .*")
629 (string-append "prefix := " (assoc-ref outputs "out") "\n"))
630 ;; Required for tests, unused for now:
631 ;;(("PYTHON := .*")
632 ;; (string-append (which "python") "\n")))
633 (("INSTALL := .*")
634 (string-append "INSTALL := " (which "install") "\n")))
635 (substitute* "bin/xgeierlein.in"
636 ;; Use icecat as XULRUNNER
637 (("^for search ")
638 (string-append "XULRUNNER=" (which "icecat") "\n"
639 "for search ")))
640 #t)))))
641 (inputs
642 (list icecat))
643 (home-page "https://stesie.github.io/geierlein/")
644 (synopsis "Free Elster client, for sending Germany VAT declarations")
645 (description
646 "Geierlein is a free Elster client, i.e. an application that
647sends VAT declarations to Germany's fiscal authorities.
648
649Currently it is *not* possible to send returns that are due annually
650(especially the income tax return) since the fiscal authority doesn't
651allow doing that off the ERiC library (which is proprietary however).
652It's not clear at the moment whether one day it will be possible to
653do so.")
654 (license license:agpl3+)))
655
656(define-public python-electrum-ecc
657 (package
658 (name "python-electrum-ecc")
659 (version "0.0.5")
660 (source
661 (origin
662 (method url-fetch)
663 (uri (pypi-uri "electrum_ecc" version))
664 (sha256
665 (base32 "1lmp5zmhabaxp6jha3xlsmqviivrxxhsy20x6z42ayqgd9cvhczp"))
666 (modules '((guix build utils)))
667 (snippet
668 '(begin
669 ;; Delete the vendored dependency.
670 (delete-file-recursively "libsecp256k1")))))
671 (build-system pyproject-build-system)
672 (arguments
673 (list
674 #:phases #~(modify-phases %standard-phases
675 (add-after 'unpack 'prepare-env
676 (lambda* (#:key inputs #:allow-other-keys)
677 ;; Do not attempt to compile vendored libsecp256k1.
678 (setenv "ELECTRUM_ECC_DONT_COMPILE" "1")
679 ;; Make the package find our libsecp256k1.
680 (substitute* "src/electrum_ecc/ecc_fast.py"
681 (("library_paths = \\[\\]")
682 (string-append
683 "library_paths = ['"
684 (search-input-file inputs "/lib/libsecp256k1.so")
685 "']"))))))))
686 (native-inputs (list python-pytest python-setuptools python-wheel))
687 (inputs (list libsecp256k1))
688 (home-page "https://github.com/spesmilo/electrum-ecc")
689 (synopsis "Pure python ctypes wrapper for libsecp256k1")
690 (description "This package provides a pure Python ctypes wrapper for
691@code{libsecp256k1}.")
692 (license license:expat)))
693
694(define-public electrum-aionostr
695 (package
696 (name "electrum-aionostr")
697 (version "0.1.0")
698 (source
699 (origin
700 (method url-fetch)
701 (uri (pypi-uri "electrum_aionostr" version))
702 (sha256
703 (base32 "117cgcll1p726qf8ar6mv1a4lgadkyf8c6l520p2g21367lghx1p"))))
704 (build-system pyproject-build-system)
705 (arguments
706 (list
707 ;; Test below fails to match an exit code, pointing to this in Click:
708 ;; https://github.com/pallets/click/pull/1489
709 ;; This was fixed in Click 8.2.0.
710 #:test-flags #~(list "-k" "not test_command_line_interface")))
711 (inputs (list python-aiohttp
712 python-aiohttp-socks
713 python-aiorpcx
714 python-cryptography
715 python-electrum-ecc))
716 (native-inputs (list python-click
717 python-pytest
718 python-setuptools))
719 (home-page "https://github.com/spesmilo/electrum-aionostr")
720 (synopsis "Asyncio nostr client")
721 (description "This package is a fork of @code{aionostr} that does not
722require Coincurve.")
723 (license license:bsd-3)))
724
725(define-public electrum
726 (package
727 (name "electrum")
728 (version "4.8.0")
729 (source
730 (origin
731 (method git-fetch)
732 (uri (git-reference
733 (url "https://github.com/spesmilo/electrum.git")
734 (commit version)))
735 (file-name (git-file-name name version))
736 (sha256
737 (base32 "0z7y14rhiw34j1phcagqjqnqrsys3p7ydr8qpkfxqk13k8404k0s"))))
738 (build-system pyproject-build-system)
739 (arguments
740 (list
741 ;; Either pycryptodomex or cryptography must be available.
742 ;; This package uses python-cryptography, but this test checks for
743 ;; cryptodomex anyway. Skip it since it's not useful.
744 #:test-flags #~(list "-k" "not test_pycryptodomex_is_available")
745 #:phases
746 #~(modify-phases %standard-phases
747 (add-after 'unpack 'relax-deps
748 (lambda _
749 (substitute* "contrib/requirements/requirements.txt"
750 ;; These packages have tight version requirements because
751 ;; the developer does not want to introduce Hatchling in
752 ;; the build environment. They do work at runtime.
753 (("attrs.*") "attrs")
754 (("dnspython.*") "dnspython"))))
755 (add-before 'check 'set-home
756 (lambda _ ; 3 tests run mkdir
757 (setenv "HOME" "/tmp"))))))
758 (native-inputs (list python-pytest python-setuptools))
759 (inputs
760 (list electrum-aionostr
761 python-aiohttp
762 python-aiohttp-socks
763 python-aiorpcx
764 python-attrs
765 python-certifi
766 python-cryptography
767 python-dnspython
768 python-electrum-ecc
769 python-hidapi
770 python-jsonpatch
771 python-protobuf
772 python-pyaes
773 python-pyqt-6
774 python-qdarkstyle
775 python-qrcode
776 zbar))
777 (home-page "https://electrum.org/")
778 (synopsis "Bitcoin wallet")
779 (description
780 "Electrum is a lightweight Bitcoin client, based on a client-server
781protocol. It supports Simple Payment Verification (SPV) and deterministic key
782generation from a seed. Your secret keys are encrypted and are never sent to
783other machines/servers. Electrum does not download the Bitcoin blockchain.")
784 (license license:expat)))
785
786(define-public electron-cash
787 (package
788 (name "electron-cash")
789 (version "4.4.1")
790 (source
791 (origin
792 (method git-fetch)
793 (uri (git-reference
794 (url "https://github.com/Electron-Cash/Electron-Cash")
795 (commit version)))
796 (file-name (git-file-name name version))
797 (sha256
798 (base32 "11xhlssr7bvdv3p256k87y35vjzyfd93p72w8f2xy7j5jh6abhp1"))))
799 (build-system pyproject-build-system)
800 (arguments
801 (list
802 #:tests? #f ; no tests
803 #:imported-modules `(,@%pyproject-build-system-modules
804 (guix build qt-utils))
805 #:modules '((guix build pyproject-build-system)
806 (guix build qt-utils)
807 (guix build utils))
808 #:phases
809 #~(modify-phases %standard-phases
810 (add-after 'unpack 'create-output-directories
811 (lambda _
812 ;; setup.py installs to ~/.local/share if this doesn't exist.
813 (mkdir-p (string-append #$output "/share"))))
814 (add-after 'unpack 'use-libsecp256k1-input
815 (lambda* (#:key inputs #:allow-other-keys)
816 (substitute* "electroncash/secp256k1.py"
817 (("libsecp256k1.so.0")
818 (search-input-file inputs "lib/libsecp256k1.so.0")))))
819 (add-after 'unpack 'relax-requirements
820 (lambda _
821 (substitute* "contrib/requirements/requirements.txt"
822 (("python-dateutil<2\\.9")
823 "python-dateutil"))))
824 (add-after 'install 'wrap-qt
825 (lambda* (#:key inputs #:allow-other-keys)
826 (wrap-qt-program "electron-cash"
827 #:output #$output #:inputs inputs))))))
828 (native-inputs (list python-setuptools))
829 (inputs
830 (list bash-minimal
831 libevent
832 libsecp256k1-bitcoin-cash
833 openssl
834 python-cython
835 python-dateutil
836 python-dnspython
837 python-ecdsa
838 python-hidapi
839 python-jsonrpclib-pelix
840 python-keepkey
841 python-pathvalidate
842 python-protobuf
843 python-pyaes
844 python-pyqt
845 python-pysocks
846 python-qdarkstyle
847 python-qrcode
848 python-requests
849 python-stem
850 python-trezor
851 qtsvg-5
852 zlib))
853 (home-page "https://electroncash.org/")
854 (synopsis "Bitcoin Cash wallet")
855 (description
856 "Electroncash is a lightweight Bitcoin Cash client, based on a client-server
857protocol. It supports Simple Payment Verification (SPV) and deterministic key
858generation from a seed. Your secret keys are encrypted and are never sent to
859other machines/servers. Electroncash does not download the Bitcoin Cash
860blockchain.")
861 (license license:expat)))
862
863(define-public monero
864 ;; This package bundles easylogging++ and lmdb.
865 ;; The bundled easylogging++ is modified, and the changes will not be
866 ;; upstreamed.
867 ;; The devs deem the lmdb driver too critical a consenus component, to use
868 ;; the system's dynamically linked library.
869 (package
870 (name "monero")
871 (version "0.18.5.1")
872 (source
873 (origin
874 (method git-fetch)
875 (uri (git-reference
876 (url "https://github.com/monero-project/monero")
877 (commit (string-append "v" version))
878 (recursive? #t)))
879 (file-name (git-file-name name version))
880 (modules '((guix build utils)))
881 (snippet
882 '(begin
883 ;; Delete bundled dependencies.
884 (for-each
885 delete-file-recursively
886 '("external/rapidjson"))))
887 (sha256
888 (base32 "0q8afdckhzbipf6cr05vv1nyf33n6d3w1ahi15rpr3b9p9y6zck2"))))
889 (build-system cmake-build-system)
890 (native-inputs
891 (list doxygen
892 graphviz
893 pkg-config
894 protobuf
895 python
896 qttools-5))
897 (inputs
898 (list boost
899 cppzmq
900 expat
901 hidapi
902 libsodium
903 libunwind
904 libusb
905 openssl
906 protobuf
907 rapidjson
908 readline
909 unbound
910 xz
911 zeromq))
912 (arguments
913 (list #:out-of-source? #t
914 #:configure-flags
915 #~(list "-DARCH=default"
916 "-DBUILD_TESTS=ON"
917 (string-append "-DReadline_ROOT_DIR="
918 #$(this-package-input "readline")))
919 #:phases
920 #~(modify-phases %standard-phases
921 ;; tests/core_tests need a valid HOME
922 (add-before 'configure 'set-home
923 (lambda _
924 (setenv "HOME" (getcwd))))
925 (add-after 'set-home 'change-log-path
926 (lambda _
927 (substitute* "contrib/epee/src/mlog.cpp"
928 (("epee::string_tools::get_current_module_folder\\(\\)")
929 "\".bitmonero\"")
930 (("return \\(")
931 "return ((std::string(getenv(\"HOME\"))) / "))))
932 (add-after 'change-log-path 'fix-file-permissions-for-tests
933 (lambda _
934 (for-each make-file-writable
935 (find-files "tests/data/" "wallet_9svHk1.*"))))
936 (replace 'check
937 ;; Only try tests that don't need access to network or system
938 (lambda* (#:key tests? #:allow-other-keys)
939 ;; Core tests sometimes fail, at least on i686-linux.
940 ;; Let's disable them for now and just try hash tests
941 ;; and unit tests.
942 ;; (invoke "make" "ARGS=-R 'hash|core_tests' --verbose" "test")))
943 (when tests?
944 (invoke "make" "ARGS=-R 'hash' --verbose" "test")
945 (let ((excluded-unit-tests
946 (string-join
947 '("AddressFromURL.Success"
948 "AddressFromURL.Failure"
949 "DNSResolver.IPv4Success"
950 "DNSResolver.DNSSECSuccess"
951 "DNSResolver.DNSSECFailure"
952 "DNSResolver.GetTXTRecord"
953 "is_hdd.linux_os_root"
954 "http_server.response_soft_limit"
955 "ban.subnet")
956 ":")))
957 (invoke "tests/unit_tests/unit_tests"
958 (string-append "--gtest_filter=-"
959 excluded-unit-tests))))))
960 (add-after 'install 'delete-unused-files
961 (lambda* (#:key outputs #:allow-other-keys)
962 (delete-file-recursively
963 (string-append #$output "/include")))))))
964 (home-page "https://web.getmonero.org/")
965 (synopsis "Command-line interface to the Monero currency")
966 (description
967 "Monero is a secure, private, untraceable currency. This package provides
968the Monero command line client and daemon.")
969 (license license:bsd-3)))
970
971(define-public monero-gui
972 (package
973 (name "monero-gui")
974 (version "0.18.5.1")
975 (source
976 (origin
977 (method git-fetch)
978 (uri (git-reference
979 (url "https://github.com/monero-project/monero-gui")
980 (commit (string-append "v" version))
981 (recursive? #t)))
982 (file-name (git-file-name name version))
983 (modules '((guix build utils)))
984 (snippet
985 '(begin
986 ;; Delete bundled monero sources, we already have them.
987 ;; See the 'extract-monero-sources' phase.
988 (delete-file-recursively "monero")))
989 (sha256
990 (base32 "0zcgxjs2agd6asl4rv2drwb82l92474smp3fdcpypp2772j23gnf"))))
991 (build-system qt-build-system)
992 (native-inputs
993 `(,@(package-native-inputs monero)
994 ("monero-source" ,(package-source monero))))
995 (inputs
996 (modify-inputs (package-inputs monero)
997 (append libgcrypt
998 monero
999 p2pool
1000 qtbase-5
1001 qtdeclarative-5
1002 qtgraphicaleffects
1003 qtquickcontrols-5
1004 qtquickcontrols2-5
1005 qtsvg-5
1006 qtwayland-5
1007 qtxmlpatterns-5)))
1008 (arguments
1009 (list #:tests? #f ; No tests
1010 #:configure-flags
1011 #~(list "-DARCH=default"
1012 "-DENABLE_PASS_STRENGTH_METER=ON"
1013 (string-append "-DReadline_ROOT_DIR="
1014 #$(this-package-input "readline")))
1015 #:phases
1016 #~(modify-phases %standard-phases
1017 (add-after 'unpack 'extract-monero-sources
1018 ;; Some of the monero package source code is required
1019 ;; to build the GUI.
1020 (lambda* (#:key inputs #:allow-other-keys)
1021 (mkdir-p "monero")
1022 (copy-recursively (assoc-ref inputs "monero-source")
1023 "monero")))
1024 (add-after 'extract-monero-sources 'fix-build
1025 (lambda _
1026 (substitute* "src/version.js.in"
1027 (("@VERSION_TAG_GUI@")
1028 #$version))
1029 (substitute* "external/CMakeLists.txt"
1030 (("add_library\\(quirc" all)
1031 (string-append
1032 "set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} -fPIC\")\n"
1033 all)))))
1034 (add-after 'unpack 'fix-p2pool-path
1035 (lambda* (#:key inputs #:allow-other-keys)
1036 (substitute* "src/p2pool/P2PoolManager.cpp"
1037 ;; Location for files created by P2Pool
1038 (("m_p2poolPath = QApplication::applicationDirPath\\(\\);")
1039 "m_p2poolPath = QStandardPaths::writableLocation(QStandardPaths::CacheLocation);")
1040 ;; Location of p2pool program
1041 (("m_p2pool = m_p2poolPath \\+ \"/p2pool\";")
1042 (string-append "m_p2pool = \""
1043 (search-input-file inputs "/bin/p2pool")
1044 "\";")))))
1045 (replace 'install
1046 (lambda _
1047 ;; Binary
1048 (let ((dir (string-append #$output "/bin")))
1049 (mkdir-p dir)
1050 (install-file "../build/bin/monero-wallet-gui" dir))
1051 ;; Icons
1052 (for-each
1053 (lambda (size)
1054 (let ((dir (string-append #$output
1055 "/share/icons/hicolor/"
1056 size
1057 "/apps")))
1058 (mkdir-p dir)
1059 (copy-file (string-append "../source/images/appicons/"
1060 size ".png")
1061 (string-append dir
1062 "/monero-gui.png"))))
1063 '("16x16" "24x24" "32x32" "48x48"
1064 "64x64" "96x96" "128x128" "256x256"))
1065 ;; Menu entry file
1066 (let ((dir (string-append #$output "/share/applications")))
1067 (mkdir-p dir)
1068 (call-with-output-file
1069 (string-append dir "/monero-gui.desktop")
1070 (lambda (port)
1071 (format port
1072 "[Desktop Entry]~@
1073 Type=Application~@
1074 Name=Monero wallet~@
1075 Exec=~a/bin/monero-wallet-gui~@
1076 Icon=monero-gui~@
1077 Categories=Office;Finance;~%"
1078 #$output))))))
1079 (add-after 'qt-wrap 'install-monerod-link
1080 ;; The monerod program must be available so that
1081 ;; monero-wallet-gui can start a Monero daemon if necessary.
1082 (lambda* (#:key inputs #:allow-other-keys)
1083 (symlink (search-input-file inputs "/bin/monerod")
1084 (string-append #$output "/bin/monerod")))))))
1085 (home-page "https://web.getmonero.org/")
1086 (synopsis "Graphical user interface for the Monero currency")
1087 (description
1088 "Monero is a secure, private, untraceable currency. This package provides
1089the Monero GUI client.")
1090 (license license:bsd-3)))
1091
1092(define-public python-bech32
1093 ;; XXX: No tags upstream.
1094 (let ((commit "231e4d88b15f3dc8faf7d339f365b84f6ab5cbcc")
1095 (revision "0"))
1096 (package
1097 (name "python-bech32")
1098 (version (git-version "1.2.0" revision commit))
1099 (source
1100 (origin
1101 (method git-fetch)
1102 (uri (git-reference
1103 (url "https://github.com/fiatjaf/bech32")
1104 (commit commit)))
1105 (file-name (git-file-name name version))
1106 (sha256
1107 (base32 "0wq6q0yrw3x42d81v445xy4nh2qlrn7swsydgpv81dkay11kajrz"))))
1108 (build-system pyproject-build-system)
1109 (arguments (list #:test-backend #~'unittest))
1110 (native-inputs (list python-setuptools))
1111 (home-page "https://github.com/fiatjaf/bech32")
1112 (synopsis "Reference implementation for Bech32 and Segwit addresses")
1113 (description "This package provides a python reference implementation for
1114Bech32 and segwit addresses.")
1115 (license license:expat))))
1116
1117(define-public python-trezor-agent
1118 ;; It is called 'libagent' in pypi; i.e. this is the library as opposed to
1119 ;; the toplevel app called trezor-agent.
1120 (package
1121 (name "python-trezor-agent")
1122 (version "0.15.0")
1123 (source
1124 (origin
1125 (method git-fetch)
1126 (uri (git-reference
1127 (url "https://github.com/romanz/trezor-agent")
1128 (commit (string-append "v" version))))
1129 (file-name (git-file-name name version))
1130 (sha256
1131 (base32 "09y55ys3x5krszh58yhl5gpdri0zrlhfld6psrmiyxfbp344asin"))))
1132 (build-system pyproject-build-system)
1133 (arguments
1134 (list
1135 #:test-flags
1136 ;; XXX: Requires $HOME to be /run/user.
1137 #~(list "-k" "not test_get_agent_sock_path")
1138 #:phases
1139 #~(modify-phases %standard-phases
1140 (add-after 'unpack 'remove-requires-backports-shutil-which
1141 ;; Remove requires on backport of shutil_which, as python 3.4+ has
1142 ;; a built-in implementation supported in python-trezor-agent.
1143 (lambda _
1144 (substitute* "setup.py"
1145 (("'backports.shutil_which>=3.5.1',") "")))))))
1146 (propagated-inputs
1147 (list python-bech32
1148 python-configargparse
1149 python-cryptography
1150 python-daemon
1151 python-docutils
1152 python-ecdsa
1153 python-hidapi
1154 python-mnemonic
1155 python-pymsgbox
1156 python-pynacl
1157 python-semver
1158 python-unidecode
1159 python-wheel))
1160 (native-inputs ; Only needed for running the tests
1161 (list gnupg
1162 python-mock
1163 python-pytest
1164 python-setuptools
1165 python-wheel))
1166 (home-page "https://github.com/romanz/trezor-agent")
1167 (synopsis "Use hardware wallets as SSH and GPG agent")
1168 (description
1169 "@code{libagent} is a library that allows using TREZOR, Keepkey and
1170Ledger Nano as a hardware SSH/GPG agent.")
1171 (license license:lgpl3)))
1172
1173(define-public trezor-gpg-pinentry-tk
1174 (package
1175 (name "trezor-gpg-pinentry-tk")
1176 (version "0.0.10")
1177 (source
1178 (origin
1179 (method git-fetch)
1180 (uri (git-reference
1181 (url "https://github.com/rendaw/trezor-gpg-pinentry-tk/")
1182 (commit (string-append "v" version))))
1183 (file-name (git-file-name name version))
1184 (sha256
1185 (base32 "1mblx4favmw4nf7k9rfl00ivv77kgdiwghyz4xv5cp0v410kjaqc"))))
1186 (build-system pyproject-build-system)
1187 (arguments (list #:tests? #f)) ; No test suite.
1188 (native-inputs (list python-setuptools))
1189 (inputs (list (list python "tk")))
1190 (home-page "https://github.com/rendaw/trezor-gpg-pinentry-tk")
1191 (synopsis "GPG pinentry program for use with @code{trezor-agent}")
1192 (description
1193 "This package provides a GPG pinentry program for use with
1194@code{trezor-agent}, or for people with number-only PINs. It displays
1195a grid of unlabeled buttons and supports configurable keyboard
1196settings.")
1197 (license license:bsd-2)))
1198
1199(define-public python-mnemonic
1200 (package
1201 (name "python-mnemonic")
1202 (version "0.21")
1203 (source
1204 (origin
1205 (method git-fetch)
1206 (uri (git-reference
1207 (url "https://github.com/trezor/python-mnemonic")
1208 (commit (string-append "v" version))))
1209 (file-name (git-file-name name version))
1210 (sha256
1211 (base32 "1r8cdlgqpmj71ap3kyhc2nq8dn29gmj7v8dlq8kgcy91jky94n8g"))))
1212 (build-system pyproject-build-system)
1213 (native-inputs
1214 (list python-poetry-core python-pytest))
1215 (propagated-inputs
1216 (list python-pbkdf2))
1217 (home-page "https://github.com/trezor/python-mnemonic")
1218 (synopsis "Implementation of Bitcoin BIP-0039")
1219 (description "@code{mnemonic} is a library that provides an implementation
1220of Bitcoin BIP-0039.")
1221 (license license:expat)))
1222
1223(define-public python-u2flib-host
1224 ;; The package is obsolete and superseded by python-fido2, but
1225 ;; needed for [email protected].
1226 (package
1227 (name "python-u2flib-host")
1228 (version "3.0.3")
1229 (source
1230 (origin
1231 (method url-fetch)
1232 (uri (pypi-uri "python-u2flib-host" version))
1233 (sha256
1234 (base32 "02pwafd5kyjpc310ys0pgnd0adff1laz18naxxwsfrllqafqnrxb"))))
1235 (build-system pyproject-build-system)
1236 (arguments
1237 (list
1238 #:test-flags
1239 #~(list
1240 "--deselect=test/test_soft.py::TestSoftU2FDevice::test_registeration"
1241 "--deselect=test/test_reg_auth.py::TestRegister::test_register" "-k"
1242 "not test_forget")))
1243 (propagated-inputs (list python-hidapi python-requests))
1244 (native-inputs (list python-cryptography python-pytest python-setuptools
1245 python-wheel))
1246 (home-page "https://github.com/Yubico/python-u2flib-host")
1247 (synopsis "Python based U2F host library")
1248 (description
1249 "The package provides library functionality for communicating with a U2F device over USB.")
1250 (license license:bsd-2)))
1251
1252(define-public python-ledgerblue
1253 (package
1254 (name "python-ledgerblue")
1255 (version "0.1.54")
1256 (source
1257 (origin
1258 (method url-fetch)
1259 (uri (pypi-uri "ledgerblue" version))
1260 (sha256
1261 (base32 "0ghpvxgih1zarp788qi1xh5xmprv6yhaxglfbix4974i7r4pszqy"))))
1262 (build-system pyproject-build-system)
1263 (arguments
1264 (list
1265 #:tests? #f))
1266 (native-inputs (list python-setuptools python-setuptools-scm python-wheel))
1267 (propagated-inputs (list python-bleak
1268 python-pyelftools
1269 python-pycryptodome
1270 python-ecpy
1271 python-future
1272 python-gnupg
1273 python-hidapi
1274 python-nfcpy
1275 python-pillow
1276 python-protobuf
1277 python-pycryptodomex
1278 python-pyscard
1279 python-u2flib-host
1280 python-websocket-client))
1281 (home-page "https://github.com/LedgerHQ/blue-loader-python")
1282 (synopsis "Python library to communicate with Ledger Blue/Nano S")
1283 (description "@code{ledgerblue} is a Python library to communicate with
1284Ledger Blue/Nano S.")
1285 (license license:asl2.0)))
1286
1287(define-public python-trezor
1288 (package
1289 (name "python-trezor")
1290 (version "0.20.0")
1291 (source
1292 (origin
1293 (method git-fetch)
1294 (uri (git-reference
1295 (url "https://github.com/trezor/trezor-firmware/")
1296 (commit (string-append "python/v" version))))
1297 (file-name (git-file-name name version))
1298 (sha256
1299 (base32 "06d4mw8iydgv2c3qxa47482k7dqpg89a2b6wd8f4g15ydn3gsfmn"))
1300 (modules
1301 '((guix build utils)
1302 (srfi srfi-26)
1303 (srfi srfi-1)
1304 (ice-9 ftw)))
1305 (snippet
1306 '(begin
1307 ;; Delete everything except ./python/
1308 (for-each delete-file-recursively
1309 (scandir "./" (negate (cut member <> '("python" "." "..")
1310 string=))))
1311 ;; Move ./python/* to the toplevel.
1312 (for-each (lambda (file-name)
1313 (rename-file (string-append "./python/" file-name)
1314 (string-append "./" file-name)))
1315 (scandir "./python/"
1316 (negate (cut member <> '("." "..") string=))))
1317 (delete-file-recursively "./python")
1318 ;; Delete now broken symbolic links.
1319 (for-each delete-file
1320 (append (find-files "." "^CHANGELOG.unreleased$")
1321 (find-files "." "^.towncrier.template.md$")))))))
1322 (build-system pyproject-build-system)
1323 (arguments
1324 (list
1325 #:test-flags
1326 #~(list "-k" (string-join
1327 ;; Failed to resolve 'data.trezor.io'
1328 (list "not test_core_basic"
1329 "test_core_code_hashes"
1330 "test_disallow_unsigned"
1331 "test_embedded_v2"
1332 "test_integrity_core"
1333 "test_integrity_legacy"
1334 "test_legacy_basic"
1335 "test_unsigned"
1336 "test_vendor_header")
1337 " and not "))
1338 #:phases
1339 #~(modify-phases %standard-phases
1340 (add-after 'unpack 'relax-requirements
1341 (lambda _
1342 (substitute* "pyproject.toml"
1343 (("platformdirs>=4.4.0") "platformdirs")))))))
1344 (propagated-inputs
1345 (list python-click
1346 python-construct
1347 python-construct-classes
1348 python-cryptography
1349 python-keyring
1350 python-libusb1
1351 python-mnemonic
1352 python-noiseprotocol
1353 python-platformdirs
1354 python-requests
1355 python-shamir-mnemonic
1356 python-slip10
1357 python-typing-extensions))
1358 (native-inputs
1359 (list nss-certs-for-test
1360 python-hatchling
1361 python-setuptools
1362 python-pytest))
1363 (home-page "https://github.com/trezor/python-trezor")
1364 (synopsis "Python library for communicating with TREZOR Hardware Wallet")
1365 (description "@code{trezor} is a Python library for communicating with
1366TREZOR Hardware Wallet.")
1367 (license license:lgpl3)))
1368
1369(define-public python-keepkey
1370 (package
1371 (name "python-keepkey")
1372 (version "7.2.1")
1373 (source
1374 (origin
1375 (method git-fetch)
1376 (uri (git-reference
1377 (url "https://github.com/keepkey/python-keepkey")
1378 (commit (string-append "v" version))))
1379 (file-name (git-file-name name version))
1380 (sha256
1381 (base32 "00hqppdj3s9y25x4ad59y8axq94dd4chhw9zixq32sdrd9v8z55a"))))
1382 (build-system pyproject-build-system)
1383 (arguments
1384 (list
1385 #:test-backend #~'custom
1386 #:test-flags #~(find-files "tests/unit" "\\.py$")))
1387 (native-inputs (list python-setuptools))
1388 (propagated-inputs
1389 (list python-ecdsa python-hidapi python-libusb1 python-mnemonic
1390 python-protobuf))
1391 (home-page "https://github.com/keepkey/python-keepkey")
1392 (synopsis "Python library for communicating with KeepKey Hardware Wallet")
1393 (description "@code{keepkey} is a Python library for communicating with
1394the KeepKey Hardware Wallet.")
1395 (license license:lgpl3)))
1396
1397(define-public ledger-agent
1398 (package
1399 (name "ledger-agent")
1400 (version "0.9.0")
1401 (source
1402 (origin
1403 (method url-fetch)
1404 (uri (pypi-uri "ledger_agent" version))
1405 (sha256
1406 (base32
1407 "03zj602m2rln9yvr08dswy56vzkbldp8b074ixwzz525dafblr92"))))
1408 (build-system pyproject-build-system)
1409 (arguments (list #:tests? #f)) ; No tests detected
1410 (inputs
1411 (list python-ledgerblue python-trezor-agent))
1412 (native-inputs
1413 (list python-setuptools python-wheel))
1414 (home-page "https://github.com/romanz/trezor-agent")
1415 (synopsis "Ledger as hardware SSH/GPG agent")
1416 (description "This package allows using Ledger as hardware SSH/GPG agent.")
1417 (license license:lgpl3)))
1418
1419(define-public trezor-agent
1420 (package
1421 (name "trezor-agent")
1422 ;; There are multiple Python apps/packages in the same git repo. The git
1423 ;; tag seems to track libagent's version (which is called
1424 ;; python-trezor-agent in the Guix namespace). Currently trezor-agent's
1425 ;; version is set in `agents/trezor/setup.py` to a different value than
1426 ;; libagent, but as discussed with upstream in issue
1427 ;; https://github.com/romanz/trezor-agent/issues/369, we are copying our
1428 ;; version from that of libagent.
1429 (version (package-version python-trezor-agent))
1430 (source
1431 (origin
1432 (method git-fetch)
1433 (uri (origin-uri (package-source python-trezor-agent)))
1434 (file-name (git-file-name name version))
1435 (sha256
1436 (base32 "09y55ys3x5krszh58yhl5gpdri0zrlhfld6psrmiyxfbp344asin"))
1437 (modules
1438 '((guix build utils)
1439 (ice-9 ftw)
1440 (srfi srfi-1)
1441 (srfi srfi-26)))
1442 (snippet
1443 '(begin
1444 ;; Delete everything except ./agents/trezor/
1445 (for-each delete-file-recursively
1446 (filter (lambda (full-name)
1447 (not (string-prefix? "./agents/trezor/" full-name)))
1448 (find-files ".")))
1449 ;; Move ./agents/trezor/* to the toplevel
1450 (for-each (lambda (file-name)
1451 (rename-file (string-append "./agents/trezor/" file-name)
1452 (string-append "./" file-name)))
1453 (scandir "./agents/trezor/"
1454 (negate (cut member <> '("." "..") string=))))
1455 (delete-file-recursively "./agents")
1456 ;; Without deleting ./libagent setuptools complains as follows:
1457 ;; "error: Multiple top-level packages discovered in a flat-layout: ['contrib', 'libagent']."
1458 (delete-file-recursively "./libagent")))))
1459 (build-system pyproject-build-system)
1460 (arguments
1461 (list
1462 #:tests? #f ; No tests there.
1463 #:phases
1464 #~(modify-phases %standard-phases
1465 (add-after 'wrap 'fixup-agent-py
1466 (lambda _
1467 ;; The wrap phase also wraps trezor_agent.py (besides the public
1468 ;; facing executable called trezor-agent). We need to undo that
1469 ;; wrapping. The reason this is needed is that the python easy
1470 ;; install generates a toplevel script (?) that messes with
1471 ;; argv[0] and then re-opens the python module. This fails when
1472 ;; the wrapped file is actually a shell script, not a python file.
1473 (delete-file
1474 (string-append #$output "/bin/.trezor_agent.py-real"))
1475 ;; Overwrite the wrapped one with the real thing.
1476 (install-file "./trezor_agent.py"
1477 (string-append #$output "/bin")))))))
1478 (inputs
1479 (list python-trezor python-trezor-agent))
1480 (native-inputs ; Only needed for running the tests
1481 (list python-attrs
1482 python-bech32
1483 python-simple-rlp
1484 python-setuptools
1485 python-wheel))
1486 (home-page "https://github.com/romanz/trezor-agent")
1487 (synopsis "Using Trezor as hardware SSH/GPG agent")
1488 (description
1489 "This package allows using Trezor as a hardware SSH/GPG agent.")
1490 (license license:lgpl3)))
1491
1492(define-public keepkey-agent
1493 (package
1494 (name "keepkey-agent")
1495 (version "0.9.0")
1496 (source
1497 (origin
1498 ;; TODO: Figure out how to build from
1499 ;; https://github.com/romanz/trezor-agent
1500 (method url-fetch)
1501 (uri (pypi-uri "keepkey_agent" version))
1502 (sha256
1503 (base32
1504 "03779gvlx70i0nnry98i4pl1d92604ix5x6jgdfkrdgzqbh5vj27"))))
1505 (build-system pyproject-build-system)
1506 (arguments
1507 (list #:tests? #f)) ;no tests in PyPI package
1508 (native-inputs
1509 (list python-setuptools))
1510 (inputs
1511 (list python-keepkey python-packaging python-trezor-agent))
1512 (home-page "https://github.com/romanz/trezor-agent")
1513 (synopsis "KeepKey as hardware SSH/GPG agent")
1514 (description "This package allows using KeepKey as a hardware SSH/GPG
1515agent.")
1516 (license license:lgpl3)))
1517
1518(define-public kitsas
1519 (package
1520 (name "kitsas")
1521 (version "5.11.1")
1522 (source (origin
1523 (method git-fetch)
1524 (uri (git-reference
1525 (url "https://github.com/artoh/kitupiikki")
1526 (commit (string-append "v" version))))
1527 (file-name (git-file-name name version))
1528 (sha256
1529 (base32
1530 "1rlg36r62ngl4zpqja7fv407i6xnax2wh7y5jcplsx3zi7nrnkk5"))))
1531 (build-system qt-build-system)
1532 (inputs (list libzip qtsvg qtwebengine qt5compat))
1533 (arguments
1534 (list #:tests? #f ; tests do not even build with Qt6 anymore
1535 #:qtbase qtbase ; use Qt6
1536 #:modules '((guix build qt-build-system)
1537 ((guix build gnu-build-system) #:prefix gnu:)
1538 (guix build utils))
1539 #:phases
1540 #~(modify-phases %standard-phases
1541 (replace 'configure
1542 (lambda* _
1543 (invoke "qmake" "kitsasproject.pro" "CONFIG+=release")))
1544 ;; The tests are not maintained and some don't even build
1545 (add-before 'configure 'disable-broken-tests
1546 (lambda _
1547 (substitute* "kitsasproject.pro"
1548 ((" *(unittest|testit).*") "")
1549 (("\\\\") ""))))
1550 (replace 'build (assoc-ref gnu:%standard-phases 'build))
1551 (replace 'install
1552 (lambda* _
1553 (install-file "kitsas/kitsas"
1554 (string-append #$output "/bin/"))
1555 (install-file "kitsas.png"
1556 (string-append #$output "/share/icons/"))
1557 (install-file "kitsas.desktop"
1558 (string-append #$output "/share/applications/")))))))
1559 (home-page "https://kitsas.fi")
1560 (synopsis "Finnish bookkeeping software for small organisations")
1561 (description
1562 "Kitsas is a Finnish accounting program with the following goals and
1563features:
1564
1565@itemize @bullet
1566@item Ease of use
1567@item Digital management of documents
1568@item Creating a digital archive
1569@item Built-in invoicing
1570@item Creating reports.
1571@end itemize")
1572 ;; GPLv3+ with additional terms:
1573 ;; - Modified versions of this software should be clearly mentioned as modified
1574 ;; - Kitsas Oy will not support any modified version of this software
1575 ;; - The name Kitsas Oy should not be used in any modified version
1576 (license license:gpl3+)))
1577
1578(define-public python-stdnum
1579 (package
1580 (name "python-stdnum")
1581 (version "2.1")
1582 (source
1583 (origin
1584 (method url-fetch)
1585 (uri (pypi-uri "python_stdnum" version))
1586 (sha256
1587 (base32 "0yir8hka3vmpk0qhiaffagkdjg3mjgai808s0razsggbd5cn80bb"))))
1588 (build-system pyproject-build-system)
1589 (native-inputs (list python-pytest python-setuptools))
1590 (home-page "https://arthurdejong.org/python-stdnum/")
1591 (synopsis "Python module to handle standardized number and code formats")
1592 (description
1593 "This is a Python library that aims to provide functions to handle,
1594parse and validate standard numbers.
1595The module supports more than 100 different number formats
1596amongst which a great number of VAT and other tax numbers,
1597personal identity and company identification codes,
1598international standard numbers (ISBN, IBAN, EAN, etc.)
1599and various other formats.
1600The module also includes implementations of the Verhoeff,
1601Luhn and family of ISO/IEC 7064 check digit algorithms.")
1602 (license license:lgpl2.1+)))
1603
1604(define-public python-schwifty
1605 (package
1606 (name "python-schwifty")
1607 (version "2025.9.0")
1608 (source
1609 (origin
1610 (method url-fetch)
1611 (uri (pypi-uri "schwifty" version))
1612 (sha256
1613 (base32 "16d0q1yzrh9fn6ybbsvhr9wbgld27rvn152w4wdcibidq2jbi0s2"))))
1614 (build-system pyproject-build-system)
1615 (native-inputs (list python-hatchling python-hatch-vcs python-pytest
1616 python-pydantic))
1617 (propagated-inputs (list python-importlib-resources python-pycountry
1618 python-rstr python-typing-extensions))
1619 (home-page "http://github.com/mdomke/schwifty/")
1620 (synopsis "Python module to work with IBANs and BICs")
1621 (description
1622 "schwifty is a Python library that let's you easily work with
1623IBANs and BICs as specified by the ISO. IBAN is the Internation Bank Account
1624Number and BIC the Business Identifier Code. Both are used for international
1625money transfer.")
1626 (license license:expat)))
1627
1628(define-public python-duniterpy
1629 (package
1630 (name "python-duniterpy")
1631 (version "1.2.1")
1632 (source
1633 (origin
1634 (method git-fetch)
1635 (uri (git-reference
1636 (url "https://git.duniter.org/clients/python/duniterpy")
1637 (commit version)))
1638 (file-name (git-file-name name version))
1639 (sha256
1640 (base32 "1ysh9b5lzg053hv4iw3zbn7hid05qssiwmrl8sir8qlk958r8x60"))))
1641 (build-system pyproject-build-system)
1642 (arguments
1643 (list
1644 #:phases
1645 #~(modify-phases %standard-phases
1646 (add-after 'unpack 'relax-requirements
1647 (lambda _
1648 (substitute* "pyproject.toml"
1649 (("mnemonic =.*")
1650 "mnemonic = '*'")))))))
1651 (native-inputs
1652 (list python-poetry-core
1653 python-pytest))
1654 (propagated-inputs
1655 (list python-base58
1656 python-graphql-core
1657 python-jsonschema
1658 python-libnacl
1659 python-mnemonic
1660 python-pyaes
1661 python-pypeg2
1662 python-websocket-client))
1663 (home-page "https://git.duniter.org/clients/python/duniterpy")
1664 (synopsis "Python implementation of Duniter API")
1665 (description "@code{duniterpy} is an implementation of
1666@uref{https://github.com/duniter/duniter/, duniter} API. Its
1667main features are:
1668@itemize
1669@item Support Duniter's Basic Merkle API and protocol
1670@item Asynchronous/synchronous without threads
1671@item Support HTTP, HTTPS and Web Socket transport for Basic Merkle API
1672@item Support Elasticsearch Duniter4j API
1673@item Duniter signing key
1674@item Sign/verify and encrypt/decrypt messages with the Duniter credentials
1675@end itemize")
1676 (license license:gpl3+)))
1677
1678(define-public silkaj
1679 (package
1680 (name "silkaj")
1681 ;; 0.12.1 (2025-07-08), all tests passed on the latest commit, revert back
1682 ;; to git tag when released.
1683 (properties '((commit . "dabe484ba1871030be33a1473ee473004e102763")
1684 (revision . "0")))
1685 (version (git-version "0.12.1"
1686 (assoc-ref properties 'revision)
1687 (assoc-ref properties 'commit)))
1688 (source
1689 (origin
1690 (method git-fetch)
1691 (uri (git-reference
1692 (url "https://git.duniter.org/clients/python/silkaj")
1693 (commit (assoc-ref properties 'commit))))
1694 (file-name (git-file-name name version))
1695 (sha256
1696 (base32 "08wg4q3y747apj5phq4ghjgg9cdr8mnyzjspjvd8v9qz08v5zg6b"))))
1697 (build-system pyproject-build-system)
1698 (arguments
1699 (list
1700 ;; tests: 224 passed, 4 skipped, 2 deselected
1701 #:test-flags
1702 ;; They require Poetry in the PATH.
1703 #~(list "--ignore=tests/integration/"
1704 ;; Network access is required.
1705 "--deselect=tests/unit/money/test_history.py::test_csv_output"
1706 ;; AssertionError: Expected 'mock' to have been called
1707 ;; once. Called 0 times
1708 "--deselect=tests/unit/test_auth.py::test_authentication_wif")
1709 #:phases
1710 #~(modify-phases %standard-phases
1711 (add-before 'check 'set-check-environment
1712 (lambda* (#:key inputs #:allow-other-keys)
1713 (setenv "TZ" "UTC")
1714 (setenv "TZDIR"
1715 (search-input-directory inputs
1716 "share/zoneinfo")))))))
1717 (native-inputs
1718 (list python-poetry-core
1719 python-pytest
1720 python-pytest-sugar
1721 tzdata-for-tests))
1722 (propagated-inputs
1723 (list python-duniterpy
1724 python-pendulum
1725 python-rich-click
1726 python-texttable))
1727 (home-page "https://git.duniter.org/clients/python/silkaj")
1728 (synopsis "Command line client for Duniter network")
1729 (description "Silkaj is a command line client for the
1730@uref{https://github.com/duniter/duniter/, Duniter} network.
1731
1732Its features are:
1733@itemize
1734@item information about currency,
1735@item issuers difficulty to generate next block,
1736@item network view of nodes,
1737@item list of last issuers,
1738@item send transactions,
1739@item get account amount.
1740@end itemize")
1741 (license license:agpl3+)))
1742
1743(define-public grisbi
1744 (package
1745 (name "grisbi")
1746 (version "2.0.5")
1747 (source
1748 (origin
1749 (method url-fetch)
1750 (uri (string-append
1751 "mirror://sourceforge/grisbi/grisbi%20stable/"
1752 (version-major+minor version) ".x/" version
1753 "/grisbi-" version ".tar.bz2"))
1754 (sha256
1755 (base32
1756 "0gvsqw1z5wkakyi3bkq71pqb094a8lv2nbgnxw2zqkabzjmxnfmx"))))
1757 (build-system glib-or-gtk-build-system)
1758 (arguments
1759 `(#:configure-flags (list "--without-ofx")))
1760 (propagated-inputs
1761 (list dconf))
1762 (native-inputs
1763 (list `(,glib "bin") ; glib-compile-schemas
1764 pkg-config intltool))
1765 (inputs
1766 (list gtk+ libgsf))
1767 (synopsis "Personal accounting application")
1768 (description "Grisbi is a personal accounting application written by
1769French developers that is designed to follow French accounting rules.
1770Grisbi can manage multiple accounts, currencies and users. It manages
1771third party, expenditure and receipt categories, budgetary lines,
1772financial years, budget estimates, bankcard management and other
1773information.")
1774 (home-page "https://grisbi.org")
1775 (license license:gpl2+)))
1776
1777(define-public gbonds
1778 ;; The last "upstream" commit is from about 2008, but the Debian maintainers
1779 ;; have effectively become the upstream with an extensive series of patches.
1780 ;; However, the patches are stored "unapplied", and some enhancements (like
1781 ;; a decade's worth of new data files) rely on the Debian packaging tools,
1782 ;; so building normally even from the patched sources would miss them.
1783 ;; Here, we do all of the patching in the origin, so that the result of
1784 ;; `guix build --source` is actually usable for building without Guix.
1785 (let ((revision "1")
1786 (commit "3054ee2f90cc7c03ed6b131177d09701c7a4fced"))
1787 (package
1788 (name "gbonds")
1789 (version (git-version "2.0.3" revision commit))
1790 (source
1791 (let ((unapplied
1792 (origin
1793 (method git-fetch)
1794 (uri (git-reference
1795 (url "https://salsa.debian.org/debian/gbonds.git")
1796 (commit commit)))
1797 (sha256
1798 (base32
1799 "1sqzzfymzxbnq6cjs5wvjbnvcrkdlimlmj2h7mlcaa9qqdpsgfki"))
1800 (file-name (git-file-name name version)))))
1801 (origin
1802 (inherit unapplied)
1803 (patches
1804 ;; The order matters.
1805 (map (cut file-append unapplied "/debian/patches/" <>)
1806 '("desktop-file"
1807 "POTFILES"
1808 "POTFILES.missing"
1809 "commands-compile"
1810 "egg-recent-model-compile"
1811 "gbonds-name-case"
1812 "copyright-update"
1813 "website-url"
1814 "link-libm"
1815 "xmldocs"
1816 "configure-compiler-warnings"
1817 "omf"
1818 "desktop-file-keywords"
1819 "replace-g_strcasecmp"
1820 "gtk3-port"
1821 "gsettings-port"
1822 "no-rarian-compat"
1823 "extern-gb_prefs"
1824 "use-treasury-api.patch")))
1825 (snippet
1826 #~(begin
1827 (use-modules (guix build utils)
1828 (srfi srfi-26))
1829
1830 ;; Remove generated files, which have not been patched.
1831 (for-each (lambda (pth)
1832 (when (file-exists? pth)
1833 (delete-file pth)))
1834 `(;; Things `make maintainer-clean` would do.
1835 "gbonds.spec"
1836 "src/marshal.c"
1837 "src/marshal.h"
1838 ;; Things upstream's distclean missed.
1839 "intltool-extract"
1840 "intltool-merge"
1841 "intltool-update"
1842 ;; Autotools generated files.
1843 "aclocal.m4"
1844 "config.guess"
1845 "config.h.in"
1846 "config.log"
1847 "config.sub"
1848 "configure"
1849 "depcomp"
1850 "intltool-extract.in"
1851 "intltool-merge.in"
1852 "intltool-update.in"
1853 "ltmain.sh"
1854 ,@(find-files "." "^Makefile\\.in$")))
1855
1856 ;; Arrange for `make install` to handle the additional
1857 ;; redemption data files added in the Debian packaging.
1858 (let* ((new-redemption-data-files
1859 (find-files "debian" "^sb[[:digit:]]+\\.asc$"))
1860 (names
1861 (map (cut substring <> (string-length "debian/"))
1862 new-redemption-data-files)))
1863 (for-each rename-file
1864 new-redemption-data-files
1865 (map (cut string-append "data/" <>)
1866 names))
1867 (substitute* "data/Makefile.am"
1868 (("redemption_DATA = \\\\")
1869 (apply string-append
1870 "redemption_DATA = \\"
1871 (map (cut string-append "\n\t" <> " \\")
1872 names))))))))))
1873 (outputs '("out" "debug"))
1874 (inputs (list gtk+
1875 glib
1876 json-glib
1877 libxml2
1878 libsoup-minimal-2
1879 cairo
1880 pango))
1881 (native-inputs (list autoconf
1882 automake
1883 intltool
1884 libtool
1885 patch
1886 pkg-config))
1887 (build-system glib-or-gtk-build-system)
1888 (home-page "https://gbonds.sourceforge.net")
1889 (synopsis "@acronym{U.S.} Savings Bond inventory program for GNOME")
1890 (description
1891 "GBonds is a @acronym{U.S.} Savings Bond inventory program for the
1892GNOME desktop environment. It allows you to track the current redemption
1893value and performance of your @acronym{U.S.} Savings Bonds and keep a valuable
1894record of the bonds you own.")
1895 (license license:gpl2+))))
1896
1897(define-public trezord-udev-rules
1898 (let ((commit "bff7fdfe436c727982cc553bdfb29a9021b423b0")
1899 (revision "0"))
1900 (package
1901 (name "trezord-udev-rules")
1902 (version (git-version "0.0.0" revision commit))
1903 (source
1904 (origin
1905 (method git-fetch)
1906 (uri (git-reference
1907 (url "https://github.com/trezor/trezor-common")
1908 (commit commit)))
1909 (sha256
1910 (base32
1911 "14mrirrn68if7ja6qdk9qlxs1hv0f21vrxy5ncnms0gx9iwakp2l"))
1912 (file-name (git-file-name name version))))
1913 (build-system copy-build-system)
1914 (arguments
1915 '(#:install-plan
1916 '(("./udev/51-trezor.rules" "lib/udev/rules.d/"))))
1917 (home-page "https://github.com/trezor/trezor-common")
1918 (synopsis "Udev rules for trezord")
1919 (description
1920 "This contains the udev rules for trezord. This will let a user run
1921trezord as a regular user instead of needing to it run as root.")
1922 (license license:lgpl3+))))
1923
1924(define-public trezord
1925 ;; XXX: The latest commit provides support for Go 1.24+, move back to the
1926 ;; tag when it is released.
1927 (let ((commit "a58468e4f70619d4ca7dd6404bdf9bdcff8011f0")
1928 (revision "0"))
1929 (package
1930 (name "trezord")
1931 (version (git-version "2.0.33" revision commit))
1932 (source
1933 (origin
1934 (method git-fetch)
1935 (uri (git-reference
1936 (url "https://github.com/trezor/trezord-go")
1937 (commit commit)))
1938 (sha256
1939 (base32 "15bqxg98wp4w8yc697rf228298dcxfmlvf7pzq370g852w8hm6q8"))
1940 (file-name (git-file-name name version))))
1941 (build-system go-build-system)
1942 (arguments
1943 (list
1944 #:install-source? #f
1945 #:import-path "github.com/trezor/trezord-go"))
1946 (native-inputs
1947 (list go-github-com-gorilla-csrf
1948 go-github-com-gorilla-handlers
1949 go-github-com-gorilla-mux
1950 go-gopkg-in-natefinch-lumberjack-v2))
1951 (home-page "https://trezor.io")
1952 (synopsis "Trezor Communication Daemon aka Trezor Bridge (written in Go)")
1953 (description
1954 "This allows a Trezor hardware wallet to communicate to the Trezor
1955wallet.")
1956 (license license:lgpl3+))))
1957
1958(define-public libofx
1959 (package
1960 (name "libofx")
1961 (version "0.10.9")
1962 (source (origin
1963 (method git-fetch)
1964 (uri (git-reference
1965 (url "https://github.com/libofx/libofx")
1966 (commit version)))
1967 (file-name (git-file-name name version))
1968 (sha256
1969 (base32
1970 "120hyhs4fkxrgpvd2p0hpf5v8dq0jjql2fzllk77m33m1c82pr18"))))
1971 (build-system gnu-build-system)
1972 (arguments
1973 (list
1974 #:parallel-build? #f ;fails with -j64
1975 #:configure-flags
1976 #~(list "--disable-static"
1977 (string-append "--with-opensp-includes="
1978 (search-input-directory %build-inputs
1979 "include/OpenSP")))))
1980 (native-inputs
1981 (list autoconf
1982 automake
1983 gengetopt
1984 help2man
1985 libtool
1986 pkg-config))
1987 (inputs (list curl libxml++ opensp))
1988 (home-page "http://libofx.sourceforge.net/")
1989 (synopsis "Library supporting the Open Financial Exchange format")
1990 (description
1991 "The LibOFX library is an API designed to allow applications to very easily
1992support OFX command responses, usually provided by financial institutions. The
1993following three utilities are included with the library:
1994@enumerate
1995@item @code{ofxdump}
1996@item @code{ofx2qif}
1997@item @code{ofxconnect}
1998@end enumerate")
1999 (license license:gpl2+)))
2000
2001(define-public beancount-language-server
2002 (package
2003 (name "beancount-language-server")
2004 (version "1.4.1")
2005 (source
2006 (origin
2007 (method git-fetch)
2008 (uri (git-reference
2009 (url "https://github.com/polarmutex/beancount-language-server")
2010 (commit (string-append "v" version))))
2011 (file-name (git-file-name name version))
2012 (sha256
2013 (base32 "0plldl148p2hy8z33h5a0dbz8vh8w6bbwa2i85zd7739639dh7vk"))))
2014 (build-system cargo-build-system)
2015 (arguments
2016 (list #:install-source? #f
2017 #:cargo-install-paths ''("crates/lsp")))
2018 (inputs (cargo-inputs 'beancount-language-server))
2019 (home-page "https://github.com/polarmutex/beancount-language-server")
2020 (synopsis "Language server for the Beancount accounting application")
2021 (description
2022 "This package provides a language server for the Beancount double-entry
2023accounting application.")
2024 (license license:expat)))
2025
2026(define-public beancount
2027 (package
2028 (name "beancount")
2029 (version "3.2.3")
2030 (source
2031 (origin
2032 (method git-fetch)
2033 (uri (git-reference
2034 (url "https://github.com/beancount/beancount")
2035 (commit version)))
2036 (file-name (git-file-name name version))
2037 (sha256
2038 (base32 "17v3gb4q0655dw7zylrnyzzs2br4x4xz3pc35sg51zjjpbfz2kr3"))))
2039 (arguments
2040 (list
2041 #:test-flags
2042 #~(list
2043 ;; run tests against the built library
2044 "--pyargs" "beancount"
2045 ;; disable tests supposed to run from the source repo
2046 "-k" "not test_export_basic and not test_example_files")))
2047 (build-system pyproject-build-system)
2048 (native-inputs
2049 (list bison
2050 flex
2051 gnupg
2052 meson
2053 ninja
2054 python-meson
2055 python-pytest
2056 python-setuptools
2057 python-wheel))
2058 (propagated-inputs
2059 (list python-bottle
2060 python-click
2061 python-dateutil
2062 python-regex))
2063 (home-page "https://beancount.github.io/")
2064 (synopsis "Command-line double-entry accounting tool")
2065 (description
2066 "Beancount is a double-entry bookkeeping computer language that lets you
2067define financial transaction records in a text file, read them in memory,
2068generate a variety of reports from them, and provides a web interface.")
2069 (license license:gpl2)))
2070
2071(define-deprecated/public-alias beancount-3 beancount)
2072
2073(define-public beanquery
2074 (package
2075 (name "beanquery")
2076 (version "0.2.0")
2077 (source
2078 (origin
2079 (method url-fetch)
2080 (uri (pypi-uri "beanquery" version))
2081 (sha256
2082 (base32 "0b6dhj9lcf3b347rsjb0k25qgsmqf9jnd0yizv3kad00745bawid"))
2083 (modules '((guix build utils)))
2084 (snippet #~(substitute* "pyproject.toml"
2085 (("tatsu-lts")
2086 "tatsu")))))
2087 (build-system pyproject-build-system)
2088 (arguments
2089 (list
2090 #:test-flags
2091 ;; Whitespace differences in these tests.
2092 #~(list "--ignore=beanquery/query_render_test.py")))
2093 (propagated-inputs
2094 (list beancount
2095 python-click
2096 python-dateutil
2097 python-tatsu))
2098 (native-inputs (list python-setuptools python-wheel python-pytest))
2099 (home-page "https://github.com/beancount/beanquery")
2100 (synopsis "Interactive interpreter for the Beancount Query Language")
2101 (description "A specialized SQL-like query client for Beancount ledger
2102files. It can run interactively or in batch mode. By providing a specialized
2103query engine that takes advantage of the structure of double-entry transactions,
2104it can easily generate custom reports specific to accounting purposes.")
2105 (license license:gpl2)))
2106
2107(define-public python-beangulp
2108 (package
2109 (name "python-beangulp")
2110 (version "0.2.0")
2111 (source
2112 (origin
2113 (method git-fetch) ; Pypi archive doesn't contain the test suite.
2114 (uri (git-reference
2115 (url "https://github.com/beancount/beangulp")
2116 (commit (string-append "v" version))))
2117 (file-name (git-file-name name version))
2118 (sha256
2119 (base32 "0zlanw88dq7czgsdvqwz2fgxamyrfnx15ymv4d7fnjrj04glpg47"))
2120 ;; TODO: Remove in the next release:
2121 ;; https://github.com/beancount/beangulp/commit/254bfb38ffed
2122 (patches (search-patches "python-beangulp-click-8.2-compat.patch"))))
2123 (build-system pyproject-build-system)
2124 (propagated-inputs
2125 (list beancount
2126 python-beautifulsoup4
2127 python-chardet
2128 python-petl
2129 python-click
2130 python-lxml
2131 python-magic))
2132 (native-inputs
2133 (list python-setuptools
2134 python-pytest))
2135 (home-page "https://github.com/beancount/beangulp")
2136 (synopsis "Library to facilitate importing data into a Beancount ledger.")
2137 (description "A framework for importing transactions into a Beancount ledger
2138from account statements and other documents and for managing documents.")
2139 (license license:gpl2)))
2140
2141(define-public fava
2142 (package
2143 (name "fava")
2144 (version "1.30.14")
2145 (source
2146 (origin
2147 (method url-fetch)
2148 (uri (pypi-uri "fava" version))
2149 (sha256
2150 (base32 "1jhp1iqkyplgpzsnjipz9gwsnxmki3nl8yjhv4vszzw01h9rr6c9"))))
2151 (build-system pyproject-build-system)
2152 (propagated-inputs
2153 (list beancount
2154 beanquery
2155 python-babel
2156 python-beangulp
2157 python-cheroot
2158 python-click
2159 python-flask
2160 python-flask-babel
2161 python-jinja2
2162 python-markdown2
2163 python-ply
2164 python-simplejson
2165 python-typing-extensions
2166 python-watchfiles
2167 python-werkzeug))
2168 (native-inputs
2169 (list python-babel
2170 python-pytest
2171 python-setuptools))
2172 (home-page "https://beancount.github.io/fava/")
2173 (synopsis "Web interface for the accounting tool Beancount")
2174 (description "Fava is a web interface for the double-entry bookkeeping
2175software Beancount with a focus on features and usability.")
2176 (license license:expat)))
2177
2178(define-public fava-envelope-airmail
2179 (package
2180 (name "fava-envelope-airmail")
2181 (version "2026.2.9")
2182 (source
2183 (origin
2184 (method url-fetch)
2185 (uri (pypi-uri "fava_envelope_airmail" version))
2186 (sha256
2187 (base32 "18kdic6rg9qizam6cgd2ljpapwiqh2dc3s6wsaz46kjc1yhhwjqy"))))
2188 (build-system pyproject-build-system)
2189 (arguments
2190 (list #:tests? #f)) ;no tests
2191 (propagated-inputs (list fava))
2192 (native-inputs (list python-pdm-backend))
2193 (home-page "https://github.com/stenius/fava-envelope-airmail")
2194 (synopsis "Envelope budgeting for Fava/Beancount")
2195 (description
2196 "Envelope budgeting for Fava/Beancount with stats, scheduled
2197transactions, and color-coded UI. It's a fork of
2198@url{https://github.com/memst/fava-envelope} (itself a fork of
2199@url{https://github.com/polarmutex/fava-envelope}) that adds several
2200enhancements for envelope budgeting.")
2201 (license license:expat)))
2202
2203(define-public emacs-beancount
2204 (let ((commit "37648f983ff42426b1f364831ce7d2d0d735686b")
2205 (revision "1"))
2206 (package
2207 (name "emacs-beancount")
2208 (version (git-version "0.9.0" revision commit))
2209 (source
2210 (origin
2211 (method git-fetch)
2212 (uri (git-reference
2213 (url "https://github.com/beancount/beancount-mode")
2214 (commit commit)))
2215 (sha256
2216 (base32 "15qx09pb3p3hnsshy1kvcnxx1lgpyyw532sv7q9lgg0qzp57q1av"))
2217 (file-name (git-file-name name version))))
2218 (build-system emacs-build-system)
2219 (arguments
2220 (list #:test-command #~(list "make" "test")))
2221 (native-inputs
2222 (list beancount))
2223 (home-page "https://github.com/beancount/beancount-mode")
2224 (synopsis "Emacs mode for Beancount")
2225 (description
2226 "Emacs-beancount is an Emacs mode for the Beancount accounting tool.")
2227 (license license:gpl3+))))
2228
2229(define-public ledger2beancount
2230 (package
2231 (name "ledger2beancount")
2232 (version "2.7")
2233 (source
2234 (origin
2235 (method git-fetch)
2236 (uri (git-reference
2237 (url "https://github.com/beancount/ledger2beancount")
2238 (commit version)))
2239 (file-name (git-file-name name version))
2240 (sha256
2241 (base32 "0mklxlfba3b6yhqkh6178pwlp4gn3zibjdirq8077m6ab3g0zcnq"))))
2242 (build-system copy-build-system)
2243 (arguments
2244 (list
2245 #:install-plan
2246 ''(("bin/ledger2beancount" "bin/")
2247 ("bin/ledger2beancount-ledger-config" "bin/")
2248 ("docs/ledger2beancount.1" "share/man/man1/")
2249 ("docs/ledger2beancount.5" "share/man/man5/")
2250 ("ledger2beancount.yaml" "share/doc/"))
2251 #:phases
2252 #~(modify-phases %standard-phases
2253 (add-before 'install 'build-man-pages
2254 (lambda _
2255 (invoke "make" "man")))
2256 (add-after 'install 'wrap
2257 (lambda _
2258 (for-each
2259 (lambda (program)
2260 (wrap-program (format #f "~A/~A" #$output program)
2261 `("PERL5LIB" = (,(getenv "PERL5LIB")))))
2262 (list "bin/ledger2beancount"
2263 "bin/ledger2beancount-ledger-config")))))))
2264 (native-inputs (list scdoc))
2265 (inputs
2266 (list bash-minimal
2267 perl
2268 perl-date-calc
2269 perl-datetime-format-strptime
2270 perl-enum
2271 perl-file-basedir
2272 perl-getopt-long-descriptive
2273 perl-list-moreutils
2274 perl-regexp-common
2275 perl-string-interpolate
2276 perl-yaml-libyaml))
2277 (home-page "https://github.com/beancount/ledger2beancount")
2278 (synopsis "Ledger to Beancount converter")
2279 (description "@code{ledger2beancount} automatically converts Ledger-based
2280textual ledgers to Beancount files.")
2281 (license license:gpl3+)))
2282
2283(define-public hledger-web
2284 (package
2285 (name "hledger-web")
2286 (version "1.43.2")
2287 (source
2288 (origin
2289 (method url-fetch)
2290 (uri (hackage-uri "hledger-web" version))
2291 (sha256
2292 (base32 "0d4sv9k3m7s0764lbq2l8w9p2p47cby177l0avl5w3fa9y8d0gyd"))))
2293 (build-system haskell-build-system)
2294 (properties '((upstream-name . "hledger-web")))
2295 (inputs (list ghc-decimal
2296 ghc-aeson
2297 ghc-base64
2298 ghc-blaze-html
2299 ghc-blaze-markup
2300 ghc-case-insensitive
2301 ghc-clientsession
2302 ghc-cmdargs
2303 ghc-conduit
2304 ghc-conduit-extra
2305 ghc-data-default
2306 ghc-extra
2307 ghc-file-embed
2308 ghc-githash
2309 ghc-hjsmin
2310 ghc-hledger
2311 ghc-hledger-lib
2312 ghc-hspec
2313 ghc-http-client
2314 ghc-http-conduit
2315 ghc-http-types
2316 ghc-megaparsec
2317 ghc-network
2318 ghc-safe
2319 ghc-shakespeare
2320 ghc-unix-compat
2321 ghc-unordered-containers
2322 ghc-utf8-string
2323 ghc-wai
2324 ghc-wai-cors
2325 ghc-wai-extra
2326 ghc-wai-handler-launch
2327 ghc-warp
2328 ghc-yaml
2329 ghc-yesod
2330 ghc-yesod-core
2331 ghc-yesod-form
2332 ghc-yesod-static
2333 ghc-yesod-test))
2334 (arguments
2335 (list
2336 #:haddock? #f
2337 #:phases
2338 #~(modify-phases %standard-phases
2339 ;; Tests write to $HOME.
2340 (add-before 'check 'set-home
2341 (lambda _
2342 (setenv "HOME" "/tmp")))
2343 (add-after 'register 'remove-libraries
2344 (lambda* (#:key outputs #:allow-other-keys)
2345 (delete-file-recursively (string-append (assoc-ref outputs "out") "/lib")))))))
2346 (home-page "http://hledger.org")
2347 (synopsis "Web-based user interface for the hledger accounting system")
2348 (description
2349 "This package provides a simple Web-based User
2350Interface (UI) for the hledger accounting system. It can be used as a
2351local, single-user UI, or as a multi-user UI for viewing, adding, and
2352editing on the Web.")
2353 (license license:gpl3)))
2354
2355(define-public quantlib
2356 (package
2357 (name "quantlib")
2358 (version "1.42.1")
2359 (source
2360 (origin
2361 (method url-fetch)
2362 (uri (string-append
2363 "https://github.com/lballabio/QuantLib/releases/download/v"
2364 version "/QuantLib-" version ".tar.gz"))
2365 (sha256
2366 (base32 "0zwrw8blhwyfilggvycv88qmn8ysgdahhriqvzcs71sc6ssiwnhj"))))
2367 (build-system gnu-build-system)
2368 (arguments
2369 `(#:configure-flags
2370 ,#~(list "--disable-static"
2371 (string-append "--prefix=" #$output))))
2372 (inputs (list boost))
2373 (home-page "https://www.quantlib.org")
2374 (synopsis "Library for quantitative finance")
2375 (description
2376 "The QuantLib project is aimed at providing a comprehensive software
2377framework for quantitative finance. QuantLib is a library for modeling,
2378trading, and risk management in real-life.")
2379 (license license:bsd-2)))
2380
2381(define-public optionmatrix
2382 (package
2383 (name "optionmatrix")
2384 (version "1.4.4")
2385 (source
2386 (origin
2387 (method url-fetch)
2388 (uri (string-append
2389 "mirror://sourceforge/optionmatrix/optionmatrix-"
2390 version ".tar.xz"))
2391 (sha256
2392 (base32 "0ijwj798jli5rw1dj8dkz6sqbsa4hia407imicrk3djqmhn1ky3z"))))
2393 (build-system gnu-build-system)
2394 (inputs
2395 (list gsl gtk+ ncurses))
2396 (native-inputs
2397 (list pkg-config texinfo
2398 (texlive-local-tree (list texlive-epsf texlive-texinfo))))
2399 (home-page "https://anthonybradford.github.io/optionmatrix/")
2400 (synopsis "Financial derivative calculator")
2401 (description
2402 "The OptionMatrix programs are financial derivative calculators. These
2403calculators are real-time multi-model option chain pricers with analytics and
2404interactive controls. This package provides a GTK+ graphical user interface
2405(@code{optionmatrix}) and a curses interface (@code{optionmatrix_console}).")
2406 (license license:gpl3+)))
2407
2408(define-public python-ta-lib
2409 (package
2410 (name "python-ta-lib")
2411 (version "0.7.1")
2412 (source
2413 (origin
2414 ;; Git repo contains Make rules to regenerate precompiled files
2415 (method git-fetch)
2416 (uri (git-reference
2417 (url "https://github.com/TA-Lib/ta-lib-python")
2418 (commit (string-append "v" version))))
2419 (file-name (git-file-name name version))
2420 (sha256
2421 (base32 "1x4rw991y87kh90b5fq6zzj9zhi32jr56xv1bm4dppcz724jx7xp"))))
2422 (build-system pyproject-build-system)
2423 (arguments
2424 (list
2425 ;; Ignore Polars test (not packaged, depends on Rust)
2426 #:test-flags #~(list "--ignore" "tests/test_polars.py")
2427 #:phases #~(modify-phases %standard-phases
2428 (add-after 'unpack 'delete-precompiled-files
2429 (lambda _
2430 (delete-file "talib/_ta_lib.c")))
2431 (add-before 'build 'regenerate-talibc
2432 (lambda _
2433 (invoke "make" "cython"))))))
2434 (inputs (list ta-lib))
2435 (propagated-inputs (list python-numpy))
2436 (native-inputs (list python-cython
2437 python-pandas
2438 python-pypa-build ; to satisfy requirements_dev.txt
2439 python-pytest
2440 python-setuptools
2441 python-wheel))
2442 (home-page "https://github.com/mrjbq7/ta-lib")
2443 (synopsis "Python wrapper for TA-Lib")
2444 (description
2445 "This is a Python wrapper for TA-Lib based on Cython. TA-Lib is a library
2446providing common functions for the technical analysis of financial market data.")
2447 (license license:bsd-2)))
2448
2449(define-public ta-lib
2450 (package
2451 (name "ta-lib")
2452 (version "0.7.1")
2453 (source
2454 (origin
2455 (method git-fetch)
2456 (uri (git-reference
2457 (url "https://github.com/TA-Lib/ta-lib")
2458 (commit (string-append "v" version))))
2459 (file-name (git-file-name name version))
2460 (sha256
2461 (base32 "0h7s9m1njb9w9qpyvddab7nimsa9wkg1g5y518jzwxfnwiibjrxn"))))
2462 (build-system gnu-build-system)
2463 (arguments
2464 (list #:tests? #f ; no tests
2465 #:configure-flags #~(list "--disable-static")))
2466 (native-inputs (list autoconf-2.71 automake libtool))
2467 (home-page "https://ta-lib.org")
2468 (synopsis "Technical analysis library")
2469 (description
2470 "TA-Lib is a library providing common functions for the technical
2471analysis of financial market data.")
2472 (license license:bsd-3)))
2473
2474(define-public python-mt-940
2475 (package
2476 (name "python-mt-940")
2477 (version "4.30.0")
2478 (source
2479 (origin
2480 (method git-fetch)
2481 (uri (git-reference
2482 (url "https://github.com/WoLpH/mt940.git")
2483 (commit (string-append "v" version))))
2484 (file-name (git-file-name name version))
2485 (sha256
2486 (base32 "13g5338aa8vgkx8g94vz5d8ynfq3jndvyh1nz6dlhw4axwr4x8dp"))))
2487 (properties '(("upstream-name" #{.}# "mt-940")))
2488 (build-system pyproject-build-system)
2489 (native-inputs (list python-pytest python-pyyaml python-setuptools))
2490 (home-page "https://mt940.readthedocs.io/")
2491 (synopsis "Python parser for MT940-encoded SWIFT data")
2492 (description
2493 "A library to parse MT940 files, a bank account statement exchange
2494format used by SWIFT. It returns smart Python collections for statistics
2495and manipulation.")
2496 (license license:bsd-3)))
2497
2498(define-public python-mt940
2499 (package
2500 (name "python-mt940")
2501 (version "0.7.0")
2502 (source
2503 (origin
2504 (method url-fetch)
2505 (uri (pypi-uri "mt940" version))
2506 (sha256
2507 (base32 "1m507a7l78k378a9r8xq61bcllyvxsrl02ivbk78i9dxd097xvcv"))))
2508 (build-system pyproject-build-system)
2509 (arguments
2510 (list
2511 #:test-backend #~'unittest))
2512 (native-inputs (list python-setuptools))
2513 (home-page "http://mt940.b2ck.com/")
2514 (synopsis "A simple module to parse MT940 files")
2515 (description "This package provides a simple module to parse MT940
2516files.")
2517 (license license:bsd-3)))
2518
2519(define-public python-qrbill
2520 (package
2521 (name "python-qrbill")
2522 ;; Version 1.2.0 is broken.
2523 ;; See: <https://github.com/claudep/swiss-qr-bill/issues/108>.
2524 (version "1.1.0")
2525 (source
2526 (origin
2527 (method git-fetch)
2528 (uri (git-reference
2529 (url "https://github.com/claudep/swiss-qr-bill")
2530 (commit (string-append "v" version))))
2531 (file-name (git-file-name name version))
2532 (sha256
2533 (base32 "1zsb90bvw62q4miv9wzarfkm4f6p2aivx4nnwxplpyjg73kylqqs"))))
2534 (build-system pyproject-build-system)
2535 (native-inputs
2536 (list python-pytest
2537 python-setuptools))
2538 (propagated-inputs
2539 (list python-iso3166
2540 python-stdnum
2541 python-qrcode
2542 python-svgwrite))
2543 (home-page "https://github.com/claudep/swiss-qr-bill")
2544 (synopsis "Python library and application for generating Swiss QR-bills")
2545 (description
2546 "@code{qrbill} generates Swiss QR-bill payment slips.
2547 It can be used as a stand-alone @acronym{CLI, Command Line Interface} as
2548well as a Python library.")
2549 (license license:expat)))
2550
2551(define-public xmrig
2552 (package
2553 (name "xmrig")
2554 (version "6.26.0")
2555 (source
2556 (origin
2557 (method git-fetch)
2558 (uri (git-reference
2559 (url "https://github.com/xmrig/xmrig")
2560 (commit (string-append "v" version))))
2561 (file-name (git-file-name name version))
2562 (sha256 (base32 "12s0nk3b1nyh76gqcfdr3158y0kcrkfprahajnbv0k34rp49m4k4"))
2563 (modules '((guix build utils)))
2564 (snippet
2565 ;; TODO: Try to use system libraries instead of bundled ones in
2566 ;; "src/3rdparty/". It requires changes to some "cmake/..." scripts
2567 ;; and to some source files.
2568 #~(begin
2569 (delete-file-recursively "src/3rdparty/hwloc")
2570 (substitute* "src/donate.h"
2571 (("constexpr const int kDefaultDonateLevel = 1;")
2572 "constexpr const int kDefaultDonateLevel = 0;")
2573 (("constexpr const int kMinimumDonateLevel = 1;")
2574 "constexpr const int kMinimumDonateLevel = 0;"))))))
2575 (build-system cmake-build-system)
2576 (inputs
2577 (list
2578 `(,hwloc "lib")
2579 libuv
2580 openssl))
2581 (arguments
2582 (list
2583 ;; There are no tests.
2584 #:tests? #f
2585 #:phases
2586 #~(modify-phases
2587 %standard-phases
2588 (replace 'install
2589 ;; There is no 'install' target, we must install xmrig manually
2590 (lambda* (#:key #:allow-other-keys)
2591 (install-file "xmrig"
2592 (string-append #$output "/bin")))))))
2593 (home-page "https://xmrig.com/")
2594 (synopsis "Monero miner")
2595 (description
2596 "XMRig is a high-performance, cross-platform RandomX, KawPow,
2597CryptoNight and GhostRider unified CPU/GPU miner and RandomX benchmark.
2598
2599Warning: upstream, by default, receives a percentage of the mining time. This
2600anti-functionality has been neutralized in Guix, but possibly not in all other
2601distributions.
2602
2603Warning: this software, because of its nature, has high energy consumption.
2604Also, the energy expenses might be higher than the cryptocurrency gained by
2605mining.")
2606 (license license:gpl3+)))
2607
2608(define-public p2pool
2609 (package
2610 (name "p2pool")
2611 (version "4.17")
2612 (source
2613 (origin
2614 (method git-fetch)
2615 (uri (git-reference
2616 (url "https://github.com/SChernykh/p2pool")
2617 (commit (string-append "v" version))
2618 (recursive? #t)))
2619 (file-name (git-file-name name version))
2620 (sha256 (base32 "058fflb18bxnlipi8wvl1487fpn0mn7j1xd5awpq8pyig8j9nbsb"))
2621 (modules '((guix build utils)))
2622 (snippet
2623 #~(for-each delete-file-recursively
2624 '("external/src/cppzmq"
2625 "external/src/curl"
2626 "external/src/libuv"
2627 "external/src/libzmq"
2628 "external/src/rapidjson"
2629 "external/src/robin-hood-hashing")))))
2630 (build-system cmake-build-system)
2631 (native-inputs
2632 (list xz))
2633 (inputs
2634 (list cppzmq curl libuv rapidjson robin-hood-hashing zeromq))
2635 (arguments
2636 (list ; FIXME: Linking fails when LTO is activated.
2637 #:configure-flags #~(list "-DWITH_LTO=OFF")
2638 #:phases
2639 #~(modify-phases %standard-phases
2640 (replace 'check
2641 (lambda* (#:key tests? #:allow-other-keys)
2642 (when tests?
2643 (mkdir-p "tests")
2644 (chdir "tests")
2645 (invoke "cmake" "-DWITH_LTO=OFF" "../../source/tests")
2646 (invoke "make" "-j" (number->string (parallel-job-count)))
2647 (invoke "xz" "-d" "sidechain_dump.dat.xz")
2648 (invoke "xz" "-d" "sidechain_dump_mini.dat.xz")
2649 (invoke "xz" "-d" "sidechain_dump_nano.dat.xz")
2650 (invoke "./p2pool_tests")
2651 (chdir ".."))))
2652 (replace 'install
2653 (lambda _
2654 (install-file "p2pool" (string-append #$output "/bin")))))))
2655 (home-page "https://p2pool.io/")
2656 (synopsis "Decentralized Monero mining pool")
2657 (description "Monero P2Pool is a peer-to-peer Monero mining pool. P2Pool
2658combines the advantages of pool and solo mining; you still fully control your
2659Monero node and what it mines, but you get frequent payouts like on a regular
2660pool.")
2661 (license license:gpl3)))