projects/guix·blob python-team · refs

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