Commit | Line | Data |
---|---|---|
20c6b9da | 1 | ;;; GNU Guix --- Functional package management for GNU |
fe7fa353 | 2 | ;;; Copyright © 2015, 2016 Andreas Enge <andreas@enge.fr> |
136ff9a2 | 3 | ;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il> |
d3699b31 | 4 | ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com> |
cb0866c3 | 5 | ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com> |
9475fd92 | 6 | ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au> |
8514662b | 7 | ;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org> |
14e09e90 | 8 | ;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com> |
9859800f | 9 | ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
5424f9bc | 10 | ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org> |
3da86c52 | 11 | ;;; Copyright © 2018 Adriano Peluso <catonano@gmail.com> |
8f4d15f1 | 12 | ;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr> |
948e888d | 13 | ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net> |
20c6b9da AE |
14 | ;;; |
15 | ;;; This file is part of GNU Guix. | |
16 | ;;; | |
17 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
18 | ;;; under the terms of the GNU General Public License as published by | |
19 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
20 | ;;; your option) any later version. | |
21 | ;;; | |
22 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
23 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
24 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
25 | ;;; GNU General Public License for more details. | |
26 | ;;; | |
27 | ;;; You should have received a copy of the GNU General Public License | |
28 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
29 | ||
30 | (define-module (gnu packages finance) | |
fa4f95a7 CB |
31 | #:use-module ((guix licenses) #:prefix license:) |
32 | #:use-module (guix packages) | |
33 | #:use-module (guix download) | |
730553d7 | 34 | #:use-module (guix git-download) |
fa4f95a7 CB |
35 | #:use-module (guix build-system gnu) |
36 | #:use-module (guix build-system cmake) | |
37 | #:use-module (guix build-system python) | |
5424f9bc | 38 | #:use-module (gnu packages) |
fa4f95a7 CB |
39 | #:use-module (gnu packages base) |
40 | #:use-module (gnu packages boost) | |
41 | #:use-module (gnu packages check) | |
0a551443 | 42 | #:use-module (gnu packages crypto) |
fa4f95a7 CB |
43 | #:use-module (gnu packages databases) |
44 | #:use-module (gnu packages documentation) | |
45 | #:use-module (gnu packages dns) | |
46 | #:use-module (gnu packages emacs) | |
255d1bbe | 47 | #:use-module (gnu packages dbm) |
df724c9c | 48 | #:use-module (gnu packages gnupg) |
fa4f95a7 CB |
49 | #:use-module (gnu packages graphviz) |
50 | #:use-module (gnu packages groff) | |
51 | #:use-module (gnu packages libedit) | |
52 | #:use-module (gnu packages libevent) | |
53 | #:use-module (gnu packages libunwind) | |
96f5e2e9 | 54 | #:use-module (gnu packages libusb) |
fa4f95a7 CB |
55 | #:use-module (gnu packages linux) |
56 | #:use-module (gnu packages multiprecision) | |
0a551443 | 57 | #:use-module (gnu packages networking) |
fa4f95a7 CB |
58 | #:use-module (gnu packages pkg-config) |
59 | #:use-module (gnu packages protobuf) | |
60 | #:use-module (gnu packages python) | |
cc6f4912 | 61 | #:use-module (gnu packages python-crypto) |
589e3f4e | 62 | #:use-module (gnu packages python-web) |
44d10b1f | 63 | #:use-module (gnu packages python-xyz) |
fa4f95a7 | 64 | #:use-module (gnu packages qt) |
1d0865c1 | 65 | #:use-module (gnu packages readline) |
9d0c291e | 66 | #:use-module (gnu packages sphinx) |
fa4f95a7 CB |
67 | #:use-module (gnu packages texinfo) |
68 | #:use-module (gnu packages textutils) | |
69 | #:use-module (gnu packages tls) | |
70 | #:use-module (gnu packages upnp) | |
71 | #:use-module (gnu packages web) | |
72 | #:use-module (gnu packages xml) | |
73 | #:use-module (gnu packages gnuzilla)) | |
20c6b9da AE |
74 | |
75 | (define-public bitcoin-core | |
76 | (package | |
77 | (name "bitcoin-core") | |
0a59cc6e | 78 | (version "0.17.1") |
20c6b9da AE |
79 | (source (origin |
80 | (method url-fetch) | |
81 | (uri | |
0a59cc6e | 82 | (string-append "https://bitcoincore.org/bin/bitcoin-core-" |
14ea30e4 | 83 | version "/bitcoin-" version ".tar.gz")) |
20c6b9da AE |
84 | (sha256 |
85 | (base32 | |
0a59cc6e | 86 | "0am4pnaf2cisv172jqx6jdpzx770agm8777163lkjbw3ryslymiy")))) |
20c6b9da AE |
87 | (build-system gnu-build-system) |
88 | (native-inputs | |
89 | `(("pkg-config" ,pkg-config) | |
e49e74f5 | 90 | ("python" ,python) ; for the tests |
0193812a MB |
91 | ("util-linux" ,util-linux) ; provides the hexdump command for tests |
92 | ("qttools" ,qttools))) | |
20c6b9da | 93 | (inputs |
fe7fa353 | 94 | `(("bdb" ,bdb-5.3) ; with 6.2.23, there is an error: ambiguous overload |
20c6b9da | 95 | ("boost" ,boost) |
14ea30e4 | 96 | ("libevent" ,libevent) |
20c6b9da AE |
97 | ("miniupnpc" ,miniupnpc) |
98 | ("openssl" ,openssl) | |
99 | ("protobuf" ,protobuf) | |
0193812a | 100 | ("qtbase" ,qtbase))) |
20c6b9da AE |
101 | (arguments |
102 | `(#:configure-flags | |
103 | (list | |
104 | ;; We use a bdb version newer than 4.8. | |
105 | "--with-incompatible-bdb" | |
106 | ;; Boost is not found unless specified manually. | |
107 | (string-append "--with-boost=" | |
0193812a MB |
108 | (assoc-ref %build-inputs "boost")) |
109 | ;; XXX: The configure script looks up Qt paths by | |
110 | ;; `pkg-config --variable=host_bins Qt5Core`, which fails to pick | |
111 | ;; up executables residing in 'qttools', so we specify them here. | |
112 | (string-append "ac_cv_path_LRELEASE=" | |
113 | (assoc-ref %build-inputs "qttools") | |
114 | "/bin/lrelease") | |
115 | (string-append "ac_cv_path_LUPDATE=" | |
116 | (assoc-ref %build-inputs "qttools") | |
117 | "/bin/lupdate")) | |
20c6b9da AE |
118 | #:phases |
119 | (modify-phases %standard-phases | |
99629e5a CD |
120 | (add-before 'configure 'make-qt-deterministic |
121 | (lambda _ | |
122 | ;; Make Qt deterministic. | |
123 | (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1") | |
124 | #t)) | |
20c6b9da AE |
125 | (add-before 'check 'set-home |
126 | (lambda _ | |
0e9600cb DM |
127 | (setenv "HOME" (getenv "TMPDIR")) ; Tests write to $HOME. |
128 | #t))))) | |
20c6b9da AE |
129 | (home-page "https://bitcoin.org/en/") |
130 | (synopsis "Bitcoin peer-to-peer client") | |
131 | (description | |
132 | "Bitcoin is a digital currency that enables instant payments to anyone | |
133 | anywhere in the world. It uses peer-to-peer technology to operate without | |
134 | central authority: managing transactions and issuing money are carried out | |
135 | collectively by the network. Bitcoin Core is the reference implementation | |
136 | of the bitcoin protocol. This package provides the Bitcoin Core command | |
137 | line client and a client based on Qt.") | |
138 | (license license:expat))) | |
d3699b31 AG |
139 | |
140 | (define-public ledger | |
141 | (package | |
142 | (name "ledger") | |
9859800f | 143 | (version "3.1.3") |
8b7ac58c TGR |
144 | (source |
145 | (origin | |
146 | (method git-fetch) | |
147 | (uri (git-reference | |
148 | (url "https://github.com/ledger/ledger.git") | |
149 | (commit (string-append "v" version)))) | |
150 | (file-name (git-file-name name version)) | |
151 | (sha256 | |
9859800f | 152 | (base32 "0bfnrqrd6wqgsngfpqi30xh6yy86pwl25iwzrqy44q31r0zl4mm3")))) |
d3699b31 AG |
153 | (build-system cmake-build-system) |
154 | (arguments | |
f90ed028 | 155 | `(#:configure-flags |
d3699b31 AG |
156 | `("-DBUILD_DOCS:BOOL=ON" |
157 | "-DBUILD_WEB_DOCS:BOOL=ON" | |
d3699b31 | 158 | "-DUSE_PYTHON:BOOL=ON" |
f90ed028 | 159 | "-DCMAKE_INSTALL_LIBDIR:PATH=lib") |
d3699b31 AG |
160 | #:phases |
161 | (modify-phases %standard-phases | |
162 | (add-before 'configure 'install-examples | |
163 | (lambda* (#:key outputs #:allow-other-keys) | |
164 | (let ((examples (string-append (assoc-ref outputs "out") | |
165 | "/share/doc/ledger/examples"))) | |
166 | (install-file "test/input/sample.dat" examples) | |
167 | (install-file "test/input/demo.ledger" examples)) | |
168 | #t)) | |
169 | (add-after 'build 'build-doc | |
1f3c4ba8 | 170 | (lambda _ (invoke "make" "doc"))) |
d3699b31 AG |
171 | (add-before 'check 'check-setup |
172 | ;; One test fails if it can't set the timezone. | |
173 | (lambda* (#:key inputs #:allow-other-keys) | |
174 | (setenv "TZDIR" | |
175 | (string-append (assoc-ref inputs "tzdata") | |
176 | "/share/zoneinfo")) | |
f90ed028 RW |
177 | ;; Skip failing test BaselineTest_cmd-org. |
178 | ;; This is a known upstream issue. See | |
179 | ;; https://github.com/ledger/ledger/issues/550 | |
180 | (setenv "ARGS" "-E BaselineTest_cmd-org") | |
181 | #t))))) | |
d3699b31 AG |
182 | (inputs |
183 | `(("boost" ,boost) | |
184 | ("gmp" ,gmp) | |
185 | ("libedit" ,libedit) | |
186 | ("mpfr" ,mpfr) | |
187 | ("python" ,python-2) | |
188 | ("tzdata" ,tzdata) | |
189 | ("utfcpp" ,utfcpp))) | |
190 | (native-inputs | |
f90ed028 | 191 | `(("groff" ,groff) |
d3699b31 | 192 | ("texinfo" ,texinfo))) |
b53a0c88 | 193 | (home-page "https://ledger-cli.org/") |
d3699b31 AG |
194 | (synopsis "Command-line double-entry accounting program") |
195 | (description | |
196 | "Ledger is a powerful, double-entry accounting system that is | |
197 | accessed from the UNIX command-line. This may put off some users, since | |
198 | there is no flashy UI, but for those who want unparalleled reporting | |
199 | access to their data there are few alternatives. | |
200 | ||
201 | Ledger uses text files for input. It reads the files and generates | |
202 | reports; there is no other database or stored state. To use Ledger, | |
203 | you create a file of your account names and transactions, run from the | |
204 | command line with some options to specify input and requested reports, and | |
205 | get output. The output is generally plain text, though you could generate | |
206 | a graph or html instead. Ledger is simple in concept, surprisingly rich | |
207 | in ability, and easy to use.") | |
208 | ;; There are some extra licenses in files which do not presently get | |
209 | ;; installed when you build this package. Different versions of the GPL | |
210 | ;; are used in the contrib and python subdirectories. The bundled version | |
211 | ;; of utfcpp is under the Boost 1.0 license. Also the file | |
212 | ;; `tools/update_copyright_year` has an Expat license. | |
213 | (license (list license:bsd-3 | |
214 | license:asl2.0 ; src/strptime.cc | |
215 | (license:non-copyleft | |
216 | "file://src/wcwidth.cc" | |
f90ed028 | 217 | "See src/wcwidth.cc in the distribution."))))) |
cb0866c3 | 218 | |
0df201c0 RW |
219 | (define-public emacs-ledger-mode |
220 | ;; There have been no new releases since 2016. | |
221 | (let ((commit "253a20dc62e137ed0ed8e1dd8614ecba116610ea") | |
222 | (revision "1")) | |
223 | (package | |
224 | (name "emacs-ledger-mode") | |
225 | (version (git-version "3.1.1" revision commit)) | |
226 | (source | |
227 | (origin | |
228 | (method git-fetch) | |
229 | (uri (git-reference | |
230 | (url "https://github.com/ledger/ledger-mode.git") | |
231 | (commit commit))) | |
232 | (file-name (git-file-name name version)) | |
233 | (sha256 | |
234 | (base32 "06wrgkqpgvk17vibrk2qikdlqn8y63jg86marp1wgmram92mb3jk")))) | |
235 | (build-system cmake-build-system) | |
236 | (arguments | |
237 | `(#:modules ((guix build cmake-build-system) | |
238 | (guix build utils) | |
239 | (guix build emacs-utils)) | |
240 | #:imported-modules (,@%cmake-build-system-modules | |
241 | (guix build emacs-utils)) | |
242 | #:tests? #f ; there are none | |
243 | #:phases | |
244 | (modify-phases %standard-phases | |
1c0dd730 PN |
245 | (add-before 'build 'patch-path |
246 | (lambda* (#:key inputs #:allow-other-keys) | |
247 | (let ((ledger (assoc-ref inputs "ledger"))) | |
248 | (make-file-writable "ledger-exec.el") | |
249 | (emacs-substitute-variables "ledger-exec.el" | |
250 | ("ledger-binary-path" (string-append ledger "/bin/ledger")))) | |
251 | #t)) | |
0df201c0 RW |
252 | (add-after 'build 'build-doc |
253 | (lambda* (#:key outputs #:allow-other-keys) | |
254 | (let ((target (string-append (assoc-ref outputs "out") | |
255 | "/share/info"))) | |
256 | (mkdir-p target) | |
257 | (invoke "makeinfo" "-o" target | |
258 | "../source/doc/ledger-mode.texi")) | |
259 | #t)) | |
260 | (add-after 'install 'relocate-elisp | |
261 | (lambda* (#:key outputs #:allow-other-keys) | |
262 | (let* ((site-dir (string-append (assoc-ref outputs "out") | |
263 | "/share/emacs/site-lisp")) | |
264 | (guix-dir (string-append site-dir "/guix.d")) | |
265 | (orig-dir (string-append site-dir "/ledger-mode")) | |
266 | (dest-dir (string-append guix-dir "/ledger-mode"))) | |
267 | (mkdir-p guix-dir) | |
268 | (rename-file orig-dir dest-dir) | |
269 | (emacs-generate-autoloads ,name dest-dir) | |
270 | #t)))))) | |
1c0dd730 PN |
271 | (inputs |
272 | `(("ledger" ,ledger))) | |
0df201c0 RW |
273 | (native-inputs |
274 | `(("emacs-minimal" ,emacs-minimal) | |
275 | ("texinfo" ,texinfo))) | |
276 | (home-page "https://ledger-cli.org/") | |
277 | (synopsis "Command-line double-entry accounting program") | |
278 | (description | |
279 | "Ledger is a powerful, double-entry accounting system that is | |
280 | accessed from the UNIX command-line. This may put off some users, since | |
281 | there is no flashy UI, but for those who want unparalleled reporting | |
282 | access to their data there are few alternatives. | |
283 | ||
284 | Ledger uses text files for input. It reads the files and generates | |
285 | reports; there is no other database or stored state. To use Ledger, | |
286 | you create a file of your account names and transactions, run from the | |
287 | command line with some options to specify input and requested reports, and | |
288 | get output. The output is generally plain text, though you could generate | |
289 | a graph or html instead. Ledger is simple in concept, surprisingly rich | |
290 | in ability, and easy to use. | |
291 | ||
292 | This package provides the Emacs mode.") | |
293 | (license license:gpl2+)))) | |
294 | ||
cb0866c3 HG |
295 | (define-public geierlein |
296 | (package | |
297 | (name "geierlein") | |
1c21e734 | 298 | (version "0.9.13") |
cb0866c3 HG |
299 | (source |
300 | (origin | |
1fd71120 TGR |
301 | (method git-fetch) |
302 | (uri (git-reference | |
303 | (url "https://github.com/stesie/geierlein.git") | |
304 | (commit (string-append "V" version)))) | |
305 | (file-name (git-file-name name version)) | |
cb0866c3 | 306 | (sha256 |
1fd71120 | 307 | (base32 "00zpwr3lk2vdmd60fgdwdk0xxs52wvnm19ln2m75yfphydvkglic")))) |
cb0866c3 HG |
308 | (build-system gnu-build-system) |
309 | (arguments | |
1fd71120 | 310 | `(#:tests? #f ; would require npm, python and a lot more |
cb0866c3 HG |
311 | #:phases |
312 | (modify-phases %standard-phases | |
1c21e734 | 313 | (delete 'configure) ; no configure script |
cb0866c3 HG |
314 | (add-after 'unpack 'override-target-directory-and-tool-paths |
315 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
316 | (substitute* "Makefile" | |
317 | (("prefix := .*") | |
318 | (string-append "prefix := " (assoc-ref outputs "out") "\n")) | |
319 | ;; Required for tests, unused for now: | |
320 | ;;(("PYTHON := .*") | |
321 | ;; (string-append (which "python") "\n"))) | |
322 | (("INSTALL := .*") | |
323 | (string-append "INSTALL := " (which "install") "\n"))) | |
324 | (substitute* "bin/xgeierlein.in" | |
325 | ;; Use icecat as XULRUNNER | |
326 | (("^for search ") | |
327 | (string-append "XULRUNNER=" (which "icecat") "\n" | |
328 | "for search "))) | |
329 | #t))))) | |
330 | (inputs | |
331 | `(("icecat" ,icecat))) | |
1e41bb1b | 332 | (home-page "https://stesie.github.io/geierlein/") |
cb0866c3 HG |
333 | (synopsis "Free Elster client, for sending Germany VAT declarations") |
334 | (description | |
335 | "Geierlein is a free Elster client, i.e. an application that | |
336 | allows to send VAT declarations to Germany's fiscal authorities. | |
337 | ||
338 | Currently it is *not* possible to send returns that are due annually | |
339 | (especially the income tax return) since the fiscal authority doesn't | |
340 | allow to do that off the ERiC library (which is proprietary however). | |
341 | It's not clear at the moment whether one day it will be possible to | |
342 | do so.") | |
343 | (license license:agpl3+))) | |
9475fd92 CZ |
344 | |
345 | (define-public electrum | |
346 | (package | |
347 | (name "electrum") | |
d09a8dff | 348 | (version "3.3.5") |
9475fd92 CZ |
349 | (source |
350 | (origin | |
351 | (method url-fetch) | |
352 | (uri (string-append "https://download.electrum.org/" | |
353 | version "/Electrum-" | |
354 | version ".tar.gz")) | |
355 | (sha256 | |
d09a8dff | 356 | (base32 "1csj0n96zlajnrs39wsazfj5lmy7v7n77cdz56lr8nkmchh6k9z1")) |
9475fd92 CZ |
357 | (modules '((guix build utils))) |
358 | (snippet | |
359 | '(begin | |
360 | ;; Delete the bundled dependencies. | |
361 | (delete-file-recursively "packages") | |
362 | #t)))) | |
363 | (build-system python-build-system) | |
364 | (inputs | |
47bd32d9 CZ |
365 | `(("python-pyaes" ,python-pyaes) |
366 | ("python-pysocks" ,python-pysocks) | |
367 | ("python-sip" ,python-sip) | |
368 | ("python-pyqt" ,python-pyqt) | |
369 | ("python-ecdsa" ,python-ecdsa) | |
370 | ("python-pbkdf2" ,python-pbkdf2) | |
371 | ("python-requests" ,python-requests) | |
372 | ("python-qrcode" ,python-qrcode) | |
373 | ("python-protobuf" ,python-protobuf) | |
81d59f44 VC |
374 | ("python-aiohttp" ,python-aiohttp) |
375 | ("python-aiohttp-socks" ,python-aiohttp-socks) | |
376 | ("python-aiorpcx" ,python-aiorpcx) | |
377 | ("python-certifi" ,python-certifi) | |
47bd32d9 CZ |
378 | ("python-dnspython" ,python-dnspython) |
379 | ("python-jsonrpclib-pelix" ,python-jsonrpclib-pelix))) | |
9475fd92 | 380 | (arguments |
47bd32d9 | 381 | `(#:tests? #f ;; package doesn't have any tests |
9475fd92 CZ |
382 | #:phases |
383 | (modify-phases %standard-phases | |
384 | (add-before 'build 'patch-home | |
385 | (lambda* (#:key outputs #:allow-other-keys) | |
386 | (substitute* "setup.py" | |
387 | (("~/.local/share") | |
388 | (string-append (assoc-ref outputs "out") "/local/share")))))))) | |
389 | (home-page "https://electrum.org/") | |
390 | (synopsis "Bitcoin wallet") | |
391 | (description | |
392 | "Electrum is a lightweight Bitcoin client, based on a client-server | |
393 | protocol. It supports Simple Payment Verification (SPV) and deterministic key | |
394 | generation from a seed. Your secret keys are encrypted and are never sent to | |
395 | other machines/servers. Electrum does not download the Bitcoin blockchain.") | |
396 | (license license:expat))) | |
8514662b | 397 | |
a0bb0217 VC |
398 | (define-public electron-cash |
399 | (package | |
400 | (inherit electrum) | |
401 | (name "electron-cash") | |
3542266a | 402 | (version "4.0.1") |
a0bb0217 VC |
403 | (source |
404 | (origin | |
405 | (method url-fetch) | |
406 | (uri (string-append "https://electroncash.org/downloads/" | |
407 | version | |
4e86e9d7 | 408 | "/win-linux/Electron-Cash-" |
a0bb0217 VC |
409 | version |
410 | ".tar.gz")) | |
411 | (sha256 | |
412 | (base32 | |
3542266a | 413 | "16fi03f23yb5r9s64x1a9wrxnvivlbawvrbq4d486yclzl1r7y48")) |
a0bb0217 VC |
414 | (modules '((guix build utils))) |
415 | (snippet | |
416 | '(begin | |
417 | ;; Delete the bundled dependencies. | |
418 | (delete-file-recursively "packages") | |
419 | #t)))) | |
420 | (home-page "https://electroncash.org/") | |
421 | (synopsis "Bitcoin Cash wallet") | |
422 | (description | |
423 | "Electroncash is a lightweight Bitcoin Cash client, based on a client-server | |
424 | protocol. It supports Simple Payment Verification (SPV) and deterministic key | |
425 | generation from a seed. Your secret keys are encrypted and are never sent to | |
426 | other machines/servers. Electroncash does not download the Bitcoin Cash blockchain.") | |
427 | (license license:expat))) | |
428 | ||
8514662b TF |
429 | (define-public monero |
430 | ;; This package bundles easylogging++ and lmdb. | |
431 | ;; The bundled easylogging++ is modified, and the changes will not be upstreamed. | |
432 | ;; The devs deem the lmdb driver too critical a consenus component, to use | |
433 | ;; the system's dynamically linked library. | |
434 | (package | |
435 | (name "monero") | |
0a551443 | 436 | (version "0.12.3.0") |
8514662b TF |
437 | (source |
438 | (origin | |
0a551443 TF |
439 | (method git-fetch) |
440 | (uri (git-reference | |
441 | (url "https://github.com/monero-project/monero") | |
442 | (commit (string-append "v" version)))) | |
136ff9a2 | 443 | (file-name (git-file-name name version)) |
0a551443 | 444 | (patches (search-patches "monero-use-system-miniupnpc.patch")) |
8514662b TF |
445 | (sha256 |
446 | (base32 | |
0a551443 | 447 | "14db9kgjm2ha93c2x5fjdw01xaqshn756qr3x2cnzyyjh7caz5qd")))) |
8514662b TF |
448 | (build-system cmake-build-system) |
449 | (native-inputs | |
450 | `(("doxygen" ,doxygen) | |
451 | ("googletest" ,googletest) | |
452 | ("graphviz" ,graphviz) | |
453 | ("pkg-config" ,pkg-config))) | |
454 | (inputs | |
455 | `(("bind" ,isc-bind) | |
456 | ("boost" ,boost) | |
0a551443 TF |
457 | ("zeromq" ,zeromq) |
458 | ("cppzmq" ,cppzmq) | |
8514662b | 459 | ("expat" ,expat) |
0a551443 | 460 | ("libsodium" ,libsodium) |
8514662b TF |
461 | ("libunwind" ,libunwind) |
462 | ("lmdb" ,lmdb) | |
0a551443 | 463 | ("miniupnpc" ,monero-miniupnpc) |
8514662b TF |
464 | ("openssl" ,openssl) |
465 | ("rapidjson" ,rapidjson) | |
466 | ("unbound" ,unbound))) | |
467 | (arguments | |
468 | `(#:out-of-source? #t | |
0a551443 | 469 | #:build-type "release" |
8514662b | 470 | #:configure-flags '("-DBUILD_TESTS=ON" |
fa7647c6 EF |
471 | ,@(if (string=? "aarch64-linux" (%current-system)) |
472 | '("-DARCH=armv8-a") | |
473 | '()) | |
8514662b TF |
474 | "-DBUILD_GUI_DEPS=ON") |
475 | #:phases | |
476 | (modify-phases %standard-phases | |
477 | ;; tests/core_tests need a valid HOME | |
478 | (add-before 'configure 'set-home | |
479 | (lambda _ | |
480 | (setenv "HOME" (getcwd)) | |
481 | #t)) | |
482 | (add-after 'set-home 'fix-wallet-path-for-unit-tests | |
483 | (lambda _ | |
484 | (substitute* "tests/unit_tests/serialization.cpp" | |
485 | (("\\.\\./\\.\\./\\.\\./\\.\\./") "../../")) | |
486 | #t)) | |
487 | (add-after 'fix-wallet-path-for-unit-tests 'change-log-path | |
488 | (lambda _ | |
489 | (substitute* "contrib/epee/src/mlog.cpp" | |
490 | (("epee::string_tools::get_current_module_folder\\(\\)") | |
491 | "\".bitmonero\"")) | |
492 | (substitute* "contrib/epee/src/mlog.cpp" | |
493 | (("return \\(") "return ((std::string(getenv(\"HOME\"))) / ")) | |
494 | #t)) | |
495 | (replace 'check | |
496 | (lambda _ | |
797445be TF |
497 | (invoke "make" "ARGS=-E 'unit_tests|libwallet_api_tests'" |
498 | "test"))) | |
8514662b TF |
499 | ;; The excluded unit tests need network access |
500 | (add-after 'check 'unit-tests | |
501 | (lambda _ | |
502 | (let ((excluded-unit-tests | |
503 | (string-join | |
504 | '("AddressFromURL.Success" | |
505 | "AddressFromURL.Failure" | |
506 | "DNSResolver.IPv4Success" | |
507 | "DNSResolver.DNSSECSuccess" | |
508 | "DNSResolver.DNSSECFailure" | |
509 | "DNSResolver.GetTXTRecord") | |
510 | ":"))) | |
797445be TF |
511 | (invoke "tests/unit_tests/unit_tests" |
512 | (string-append "--gtest_filter=-" | |
513 | excluded-unit-tests))))) | |
8514662b TF |
514 | (add-after 'install 'install-blockchain-import-export |
515 | (lambda* (#:key outputs #:allow-other-keys) | |
516 | (let* ((out (assoc-ref outputs "out")) | |
517 | (bin (string-append out "/bin"))) | |
518 | (install-file "bin/monero-blockchain-import" bin) | |
519 | (install-file "bin/monero-blockchain-export" bin))))))) | |
520 | (home-page "https://getmonero.org/") | |
521 | (synopsis "Command-line interface to the Monero currency") | |
522 | (description | |
523 | "Monero is a secure, private, untraceable currency. This package provides the | |
524 | Monero command line client and daemon.") | |
525 | (license license:bsd-3))) | |
79228a52 | 526 | |
f7e24839 | 527 | (define-public monero-gui |
79228a52 | 528 | (package |
f7e24839 | 529 | (name "monero-gui") |
3902bc5c | 530 | (version "0.12.2.0") |
79228a52 TF |
531 | (source |
532 | (origin | |
3902bc5c TF |
533 | (method git-fetch) |
534 | (uri (git-reference | |
f7e24839 | 535 | (url "https://github.com/monero-project/monero-gui") |
3902bc5c | 536 | (commit (string-append "v" version)))) |
398a96a2 | 537 | (file-name (git-file-name name version)) |
79228a52 TF |
538 | (sha256 |
539 | (base32 | |
3902bc5c | 540 | "1cnrkwh7kp64lnzz1xfmkf1mhsgm5gls292gpqai3jr8jydpkahl")))) |
79228a52 TF |
541 | (build-system gnu-build-system) |
542 | (native-inputs | |
543 | `(("doxygen" ,doxygen) | |
544 | ("graphviz" ,graphviz) | |
6915d20f EF |
545 | ("pkg-config" ,pkg-config) |
546 | ("qttools" ,qttools))) | |
79228a52 TF |
547 | (inputs |
548 | `(("boost" ,boost) | |
549 | ("libunwind" ,libunwind) | |
550 | ("openssl" ,openssl) | |
6915d20f EF |
551 | ("qtbase" ,qtbase) |
552 | ("qtdeclarative" ,qtdeclarative) | |
553 | ("qtgraphicaleffects" ,qtgraphicaleffects) | |
554 | ("qtquickcontrols" ,qtquickcontrols) | |
1d0865c1 | 555 | ("readline" ,readline) |
79228a52 TF |
556 | ("unbound" ,unbound))) |
557 | (propagated-inputs | |
558 | `(("monero" ,monero))) | |
559 | (arguments | |
560 | `(#:phases | |
561 | (modify-phases %standard-phases | |
562 | (delete 'configure) | |
563 | (delete 'check) | |
564 | (add-before 'build 'fix-makefile-vars | |
565 | (lambda _ | |
566 | (substitute* "src/zxcvbn-c/makefile" | |
567 | (("\\?=") "=")) | |
568 | #t)) | |
569 | (add-after 'fix-makefile-vars 'fix-library-paths | |
570 | (lambda* (#:key inputs #:allow-other-keys) | |
571 | (substitute* "monero-wallet-gui.pro" | |
572 | (("-L/usr/local/lib") "") | |
573 | (("-L/usr/local/opt/openssl/lib") | |
574 | (string-append "-L" | |
575 | (assoc-ref inputs "openssl") | |
576 | "/lib")) | |
577 | (("-L/usr/local/opt/boost/lib") | |
578 | (string-append "-L" | |
579 | (assoc-ref inputs "boost") | |
580 | "/lib"))) | |
581 | #t)) | |
582 | (add-after 'fix-library-paths 'fix-monerod-path | |
583 | (lambda* (#:key inputs #:allow-other-keys) | |
584 | (substitute* "src/daemon/DaemonManager.cpp" | |
585 | (("QApplication::applicationDirPath\\(\\) \\+ \"/monerod") | |
586 | (string-append "\""(assoc-ref inputs "monero") | |
587 | "/bin/monerod"))) | |
588 | #t)) | |
6915d20f EF |
589 | (add-after 'fix-monerod-path 'fix-qt-paths |
590 | (lambda* (#:key inputs #:allow-other-keys) | |
591 | (let* ((qttools (assoc-ref inputs "qttools")) | |
592 | (lrelease (string-append qttools "/bin/lrelease")) | |
593 | (lupdate (string-append qttools "/bin/lupdate"))) | |
594 | (substitute* "monero-wallet-gui.pro" | |
595 | (("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease") lrelease) | |
596 | (("\\$\\$\\[QT_INSTALL_BINS\\]/lupdate") lupdate)) | |
597 | #t))) | |
79228a52 TF |
598 | (replace 'build |
599 | (lambda _ | |
88d5ee44 | 600 | (invoke "./build.sh"))) |
79228a52 TF |
601 | (add-after 'build 'fix-install-path |
602 | (lambda* (#:key outputs #:allow-other-keys) | |
603 | (substitute* "build/Makefile" | |
604 | (("/opt/monero-wallet-gui") | |
605 | (assoc-ref outputs "out"))) | |
606 | #t)) | |
607 | (add-before 'install 'change-dir | |
608 | (lambda _ | |
6915d20f EF |
609 | (chdir "build"))) |
610 | (add-after 'install 'wrap-executable | |
611 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
612 | (let ((out (assoc-ref outputs "out"))) | |
613 | (wrap-program (string-append out "/bin/monero-wallet-gui") | |
614 | `("QT_PLUGIN_PATH" ":" prefix | |
615 | ,(map (lambda (label) | |
616 | (string-append (assoc-ref inputs label) | |
617 | "/lib/qt5/plugins")) | |
618 | '("qtbase" "qtdeclarative"))) | |
619 | `("QML2_IMPORT_PATH" ":" prefix | |
620 | ,(map (lambda (label) | |
621 | (string-append (assoc-ref inputs label) | |
622 | "/lib/qt5/qml")) | |
623 | '("qtdeclarative" "qtgraphicaleffects" | |
624 | "qtquickcontrols")))) | |
625 | #t)))))) | |
79228a52 TF |
626 | (home-page "https://getmonero.org/") |
627 | (synopsis "Graphical user interface for the Monero currency") | |
628 | (description | |
629 | "Monero is a secure, private, untraceable currency. This package provides the | |
630 | Monero GUI client.") | |
631 | (license license:bsd-3))) | |
00d3f022 | 632 | |
f7e24839 TF |
633 | (define-public monero-core |
634 | (deprecated-package "monero-core" monero-gui)) | |
635 | ||
00d3f022 DM |
636 | (define-public python-trezor-agent |
637 | (package | |
638 | (name "python-trezor-agent") | |
37cff994 | 639 | (version "0.13.1") |
00d3f022 DM |
640 | (source |
641 | (origin | |
39a7b720 TGR |
642 | (method git-fetch) |
643 | (uri (git-reference | |
644 | (url "https://github.com/romanz/trezor-agent.git") | |
645 | (commit (string-append "v" version)))) | |
646 | (file-name (git-file-name name version)) | |
00d3f022 | 647 | (sha256 |
37cff994 | 648 | (base32 "0q99vbfd3h85s8rnjipnmldixabqmmlk5w9karv6f0rhyi54f4zv")))) |
00d3f022 DM |
649 | (build-system python-build-system) |
650 | (arguments | |
651 | `(#:phases | |
652 | (modify-phases %standard-phases | |
df724c9c VC |
653 | (add-after 'unpack 'remove-requires-backports-shutil-which |
654 | ;; Remove requires on backport of shutil_which, as python 3.4+ has | |
655 | ;; a built-in implementation supported in python-trezor-agent. | |
656 | (lambda _ | |
657 | (substitute* "setup.py" | |
658 | (("'backports.shutil_which>=3.5.1',") "")) | |
659 | #t)) | |
00d3f022 DM |
660 | (delete 'check) |
661 | (add-after 'install 'check | |
662 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
39a7b720 | 663 | ;; Make installed package available for running the tests. |
00d3f022 DM |
664 | (add-installed-pythonpath inputs outputs) |
665 | (invoke "py.test")))))) | |
666 | (propagated-inputs | |
df724c9c VC |
667 | `(("python-configargparse" ,python-configargparse) |
668 | ("python-daemon" ,python-daemon) | |
669 | ("python-docutils" ,python-docutils) | |
670 | ("python-ecdsa" ,python-ecdsa) | |
00d3f022 | 671 | ("python-ed25519" ,python-ed25519) |
df724c9c VC |
672 | ("python-mnemonic" ,python-mnemonic) |
673 | ("python-pymsgbox" ,python-pymsgbox) | |
00d3f022 | 674 | ("python-semver" ,python-semver) |
df724c9c VC |
675 | ("python-unidecode" ,python-unidecode) |
676 | ("python-wheel" ,python-wheel))) | |
00d3f022 | 677 | (native-inputs |
df724c9c VC |
678 | `(("gnupg" ,gnupg) |
679 | ("python-mock" ,python-mock) | |
00d3f022 DM |
680 | ("python-pytest" ,python-pytest))) |
681 | (home-page "https://github.com/romanz/trezor-agent") | |
df724c9c | 682 | (synopsis "Use hardware wallets as SSH and GPG agent") |
00d3f022 DM |
683 | (description |
684 | "@code{libagent} is a library that allows using TREZOR, Keepkey and | |
685 | Ledger Nano as a hardware SSH/GPG agent.") | |
686 | (license license:lgpl3))) | |
687 | ||
688 | (define-public python2-trezor-agent | |
689 | (package-with-python2 python-trezor-agent)) | |
6e9749ef DM |
690 | |
691 | (define-public python-mnemonic | |
692 | (package | |
693 | (name "python-mnemonic") | |
694 | (version "0.18") | |
695 | (source | |
696 | (origin | |
697 | (method url-fetch) | |
698 | (uri (pypi-uri "mnemonic" version)) | |
699 | (sha256 | |
700 | (base32 | |
701 | "07bzfa5di6nv5xwwcwbypnflpj50wlfczhh6q6hg8w13g5m319q2")))) | |
702 | (build-system python-build-system) | |
703 | (propagated-inputs | |
704 | `(("python-pbkdf2" ,python-pbkdf2))) | |
705 | (home-page "https://github.com/trezor/python-mnemonic") | |
706 | (synopsis "Implementation of Bitcoin BIP-0039") | |
707 | (description "@code{mnemonic} is a library that provides an implementation | |
708 | of Bitcoin BIP-0039.") | |
709 | (license license:expat))) | |
710 | ||
711 | (define-public python2-mnemonic | |
712 | (package-with-python2 python-mnemonic)) | |
96f5e2e9 DM |
713 | |
714 | (define-public python-ledgerblue | |
715 | (package | |
716 | (name "python-ledgerblue") | |
717 | (version "0.1.16") | |
718 | (source | |
719 | (origin | |
720 | (method url-fetch) | |
721 | (uri (pypi-uri "ledgerblue" version)) | |
722 | (sha256 | |
723 | (base32 | |
724 | "010mghaqh1cmz3a0ifc3f40mmyplilwlw7kpha2mzyrrff46p9gb")))) | |
725 | (build-system python-build-system) | |
726 | (propagated-inputs | |
727 | `(("python-ecpy" ,python-ecpy) | |
728 | ("python-future" ,python-future) | |
729 | ("python-hidapi" ,python-hidapi) | |
730 | ("python-pillow" ,python-pillow) | |
731 | ("python-protobuf" ,python-protobuf) | |
732 | ("python-pycrypto" ,python-pycrypto))) | |
733 | (home-page "https://github.com/LedgerHQ/blue-loader-python") | |
734 | (synopsis "Python library to communicate with Ledger Blue/Nano S") | |
735 | (description "@code{ledgerblue} is a Python library to communicate with | |
736 | Ledger Blue/Nano S.") | |
737 | (license license:asl2.0))) | |
738 | ||
739 | (define-public python2-ledgerblue | |
740 | (package-with-python2 python-ledgerblue)) | |
741 | ||
1dca32e3 DM |
742 | (define-public python-trezor |
743 | (package | |
744 | (name "python-trezor") | |
4df33c32 | 745 | (version "0.11.2") |
1dca32e3 DM |
746 | (source |
747 | (origin | |
748 | (method url-fetch) | |
749 | (uri (pypi-uri "trezor" version)) | |
750 | (sha256 | |
751 | (base32 | |
4df33c32 | 752 | "1f0zfki12mnhidkfxpx2lpq1xim8f35i2d64bx9lf4m26xxv9x56")))) |
1dca32e3 | 753 | (build-system python-build-system) |
b4c698c8 VC |
754 | (arguments |
755 | `(#:phases | |
756 | (modify-phases %standard-phases | |
757 | ;; Default tests run device-specific tests which fail, only run specific tests. | |
758 | (replace 'check | |
759 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
8c16b8a4 VC |
760 | ;; Delete tests that require network access. |
761 | (delete-file "trezorlib/tests/unit_tests/test_tx_api.py") | |
762 | (invoke "python" "-m" "pytest" "--pyarg" "trezorlib.tests.unit_tests")))))) | |
1dca32e3 | 763 | (propagated-inputs |
b4c698c8 | 764 | `(("python-click" ,python-click) |
8c16b8a4 | 765 | ("python-construct" ,python-construct) |
b4c698c8 | 766 | ("python-ecdsa" ,python-ecdsa) |
b4c698c8 | 767 | ("python-libusb1" ,python-libusb1) |
1dca32e3 | 768 | ("python-mnemonic" ,python-mnemonic) |
b4c698c8 VC |
769 | ("python-pyblake2" ,python-pyblake2) |
770 | ("python-requests" ,python-requests) | |
8c16b8a4 | 771 | ("python-typing-extensions" ,python-typing-extensions))) |
1dca32e3 | 772 | (native-inputs |
8c16b8a4 VC |
773 | `(("protobuf" ,protobuf) ; Tests |
774 | ("python-black" ,python-black) ; Tests | |
775 | ("python-protobuf" ,python-protobuf) ; Tests | |
776 | ("python-isort" ,python-isort) ; Tests | |
b4c698c8 VC |
777 | ("python-pyqt" ,python-pyqt) ; Tests |
778 | ("python-pytest" ,python-pytest))) ; Tests | |
1dca32e3 DM |
779 | (home-page "https://github.com/trezor/python-trezor") |
780 | (synopsis "Python library for communicating with TREZOR Hardware Wallet") | |
781 | (description "@code{trezor} is a Python library for communicating with | |
782 | TREZOR Hardware Wallet.") | |
783 | (license license:lgpl3))) | |
784 | ||
785 | (define-public python2-trezor | |
786 | (package-with-python2 python-trezor)) | |
d596fea5 | 787 | |
d6ddeffc DM |
788 | (define-public python-keepkey |
789 | (package | |
790 | (name "python-keepkey") | |
52311b51 | 791 | (version "6.0.3") |
d6ddeffc DM |
792 | (source |
793 | (origin | |
794 | (method url-fetch) | |
795 | (uri (pypi-uri "keepkey" version)) | |
796 | (sha256 | |
797 | (base32 | |
52311b51 | 798 | "0z3d0m6364v9dv0njs4cd5m5ai6j6v35xaaxfxl90m9vmyxy81vd")))) |
d6ddeffc DM |
799 | (build-system python-build-system) |
800 | (arguments | |
801 | `(#:phases | |
802 | (modify-phases %standard-phases | |
803 | (delete 'check) | |
804 | (add-after 'install 'check | |
805 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
806 | (add-installed-pythonpath inputs outputs) | |
807 | (apply invoke "python" (find-files "tests/unit" "\\.py$"))))))) | |
808 | (propagated-inputs | |
809 | `(("python-ecdsa" ,python-ecdsa) | |
810 | ("python-hidapi" ,python-hidapi) | |
02d9e5d2 | 811 | ("python-libusb1" ,python-libusb1) |
d6ddeffc DM |
812 | ("python-mnemonic" ,python-mnemonic) |
813 | ("python-protobuf" ,python-protobuf))) | |
814 | (home-page "https://github.com/keepkey/python-keepkey") | |
815 | (synopsis "Python library for communicating with KeepKey Hardware Wallet") | |
816 | (description "@code{keepkey} is a Python library for communicating with | |
817 | the KeepKey Hardware Wallet.") | |
818 | (license license:lgpl3))) | |
819 | ||
820 | (define-public python2-keepkey | |
821 | (package-with-python2 python-keepkey)) | |
822 | ||
d596fea5 DM |
823 | (define-public ledger-agent |
824 | (package | |
825 | (name "ledger-agent") | |
826 | (version "0.9.0") | |
827 | (source | |
828 | (origin | |
829 | (method url-fetch) | |
830 | (uri (pypi-uri "ledger_agent" version)) | |
831 | (sha256 | |
832 | (base32 | |
833 | "03zj602m2rln9yvr08dswy56vzkbldp8b074ixwzz525dafblr92")))) | |
834 | (build-system python-build-system) | |
835 | (inputs | |
836 | `(("python-ledgerblue" ,python-ledgerblue) | |
837 | ("python-trezor-agent" ,python-trezor-agent))) | |
838 | (home-page "http://github.com/romanz/trezor-agent") | |
839 | (synopsis "Ledger as hardware SSH/GPG agent") | |
840 | (description "This package allows using Ledger as hardware SSH/GPG agent. | |
841 | ||
5859fd6c MB |
842 | Usage for SSH: trezor-agent foo@@example.com --connect |
843 | Usage for GPG: Initialize using trezor-gpg init \"Foo <foo@@example.com>\" | |
d596fea5 DM |
844 | Then set the environment variable GNUPGHOME to |
845 | \"${HOME}/.gnupg/trezor\".") | |
846 | (license license:lgpl3))) | |
47c8ea99 DM |
847 | |
848 | (define-public trezor-agent | |
849 | (package | |
850 | (name "trezor-agent") | |
7fafdadd | 851 | (version "0.10.0") |
47c8ea99 DM |
852 | (source |
853 | (origin | |
854 | (method url-fetch) | |
855 | (uri (pypi-uri "trezor_agent" version)) | |
856 | (sha256 | |
857 | (base32 | |
7fafdadd VC |
858 | "144657c7bn0a667dq5fv5r6j7iilxf3h9agj29v1m2qpq40g0az8")))) |
859 | (arguments | |
860 | ;; Tests fail with "AttributeError: module 'attr' has no attribute 's'". | |
861 | `(#:phases | |
862 | (modify-phases %standard-phases | |
863 | (add-after 'wrap 'fixup-agent-py | |
864 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
865 | (let* ((out (assoc-ref outputs "out"))) | |
866 | ;; overwrite the wrapper with the real thing. | |
867 | (install-file "./trezor_agent.py" | |
868 | (string-append out "/bin")) | |
869 | #t)))))) | |
47c8ea99 DM |
870 | (build-system python-build-system) |
871 | (inputs | |
872 | `(("python-trezor" ,python-trezor) | |
873 | ("python-trezor-agent" ,python-trezor-agent))) | |
7fafdadd VC |
874 | (native-inputs |
875 | `(("python-hidapi" ,python-hidapi))) | |
876 | (home-page "https://github.com/romanz/trezor-agent") | |
47c8ea99 DM |
877 | (synopsis "Using Trezor as hardware SSH/GPG agent") |
878 | (description "This package allows using Trezor as a hardware SSH/GPG | |
879 | agent.") | |
880 | (license license:lgpl3))) | |
50c4d676 DM |
881 | |
882 | (define-public keepkey-agent | |
883 | (package | |
884 | (name "keepkey-agent") | |
885 | (version "0.9.0") | |
886 | (source | |
887 | (origin | |
888 | (method url-fetch) | |
889 | (uri (pypi-uri "keepkey_agent" version)) | |
890 | (sha256 | |
891 | (base32 | |
892 | "03779gvlx70i0nnry98i4pl1d92604ix5x6jgdfkrdgzqbh5vj27")))) | |
893 | (build-system python-build-system) | |
894 | (inputs | |
895 | `(("python-keepkey" ,python-keepkey) | |
896 | ("python-trezor-agent" ,python-trezor-agent))) | |
897 | (home-page "http://github.com/romanz/trezor-agent") | |
898 | (synopsis "KeepKey as hardware SSH/GPG agent") | |
899 | (description "This package allows using KeepKey as a hardware SSH/GPG | |
900 | agent.") | |
901 | (license license:lgpl3))) | |
3da86c52 AP |
902 | |
903 | (define-public python-stdnum | |
904 | (package | |
905 | (name "python-stdnum") | |
906 | (version "1.8.1") | |
907 | (source | |
908 | (origin | |
909 | (method url-fetch) | |
910 | (uri (pypi-uri "python-stdnum" version)) | |
911 | (sha256 | |
912 | (base32 | |
913 | "0hvr47q32xbyiznpmbg4r8rcvxhnf0lwf33hcpnynyik57djy5np")))) | |
914 | (build-system python-build-system) | |
915 | (home-page | |
916 | "https://arthurdejong.org/python-stdnum/") | |
917 | (synopsis | |
918 | "Python module to handle standardized number and code formats") | |
919 | (description | |
920 | "This is a Python library that aims to provide functions to handle, | |
921 | parse and validate standard numbers. | |
922 | The module supports more than 100 different number formats | |
923 | amongst which a great number of VAT and other tax numbers, | |
924 | personal identity and company identification codes, | |
925 | international standard numbers (ISBN, IBAN, EAN, etc.) | |
926 | and various other formats. | |
927 | The module also inclused implementations of the Verhoeff, | |
928 | Luhn and family of ISO/IEC 7064 check digit algorithms. ") | |
929 | (license license:lgpl2.1+))) | |
930 | ||
931 | (define-public python2-stdnum | |
932 | (package-with-python2 python-stdnum)) | |
730553d7 | 933 | |
c7299015 NG |
934 | (define-public python-duniterpy |
935 | (package | |
936 | (name "python-duniterpy") | |
f918a296 | 937 | (version "0.54.1") |
c7299015 NG |
938 | (source |
939 | (origin | |
940 | (method git-fetch) | |
941 | ;; Pypi's default URI is missing "requirements.txt" file. | |
942 | (uri (git-reference | |
7dab3e61 | 943 | (url "https://git.duniter.org/clients/python/duniterpy.git") |
c7299015 NG |
944 | (commit version))) |
945 | (file-name (git-file-name name version)) | |
946 | (sha256 | |
947 | (base32 | |
f918a296 | 948 | "15z5wc3ahvv8axyiqmf7hd4y91ahh1x4bfmgsqxwygyhswl1yjq8")))) |
c7299015 | 949 | (build-system python-build-system) |
1427d888 NG |
950 | (arguments |
951 | ;; Tests fail with "AttributeError: module 'attr' has no attribute 's'". | |
42a57df8 NG |
952 | `(#:tests? #f |
953 | #:phases | |
954 | (modify-phases %standard-phases | |
955 | (add-after 'build 'build-documentation | |
956 | (lambda _ | |
957 | (invoke "make" "docs"))) | |
958 | (add-after 'build-documentation 'install-documentation | |
959 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
960 | (let* ((out (assoc-ref outputs "out")) | |
961 | (doc (string-append out "/share/doc/" ,name))) | |
962 | (mkdir-p doc) | |
963 | (copy-recursively "docs/_build/html" doc)) | |
964 | #t))))) | |
965 | (native-inputs | |
352033f3 NG |
966 | `(("sphinx" ,python-sphinx) |
967 | ("sphinx-rtd-theme" ,python-sphinx-rtd-theme))) | |
c7299015 | 968 | (propagated-inputs |
352033f3 NG |
969 | `(("aiohttp" ,python-aiohttp) |
970 | ("attr" ,python-attr) | |
971 | ("base58" ,python-base58) | |
972 | ("jsonschema" ,python-jsonschema) | |
973 | ("libnacl" ,python-libnacl) | |
974 | ("pyaes" ,python-pyaes) | |
975 | ("pylibscrypt" ,python-pylibscrypt) | |
976 | ("pypeg2" ,python-pypeg2))) | |
9f1a2be2 | 977 | (home-page "https://git.duniter.org/clients/python/duniterpy") |
c7299015 NG |
978 | (synopsis "Python implementation of Duniter API") |
979 | (description "@code{duniterpy} is an implementation of | |
207a79b2 | 980 | @uref{https://github.com/duniter/duniter/, duniter} API. Its |
c7299015 NG |
981 | main features are: |
982 | @itemize | |
207a79b2 NG |
983 | @item Support Duniter's Basic Merkle API and protocol |
984 | @item Asynchronous/synchronous without threads | |
985 | @item Support HTTP, HTTPS and Web Socket transport for Basic Merkle API | |
986 | @item Support Elasticsearch Duniter4j API | |
c7299015 | 987 | @item Duniter signing key |
207a79b2 | 988 | @item Sign/verify and encrypt/decrypt messages with the Duniter credentials |
c7299015 NG |
989 | @end itemize") |
990 | (license license:gpl3+))) | |
991 | ||
730553d7 NG |
992 | (define-public silkaj |
993 | (package | |
994 | (name "silkaj") | |
f41378b7 | 995 | (version "0.7.0") |
730553d7 NG |
996 | (source |
997 | (origin | |
998 | (method git-fetch) | |
999 | (uri (git-reference | |
1000 | (url "https://git.duniter.org/clients/python/silkaj.git") | |
1001 | (commit (string-append "v" version)))) | |
1002 | (file-name (git-file-name name version)) | |
1003 | (sha256 | |
1004 | (base32 | |
f41378b7 | 1005 | "0pnd5v15sgxxm114sbs0z24a4dars5hy1nabc9v9ask7kxzrxs9y")))) |
730553d7 NG |
1006 | (build-system python-build-system) |
1007 | (arguments | |
e627052f | 1008 | `(#:tests? #f)) ;no test |
730553d7 | 1009 | (inputs |
c14b3a8d NG |
1010 | `(("click" ,python-click) |
1011 | ("duniterpy" ,python-duniterpy) | |
1012 | ("ipaddress" ,python-ipaddress) | |
1013 | ("pynacl" ,python-pynacl) | |
f41378b7 NG |
1014 | ("tabulate" ,python-tabulate) |
1015 | ("texttable" ,python-texttable))) | |
730553d7 NG |
1016 | (home-page "https://silkaj.duniter.org/") |
1017 | (synopsis "Command line client for Duniter network") | |
1018 | (description "@code{Silkaj} is a command line client for the | |
1019 | @uref{https://github.com/duniter/duniter/, Duniter} network. | |
1020 | ||
1021 | Its features are: | |
1022 | @itemize | |
1023 | @item information about currency, | |
1024 | @item issuers difficulty to generate next block, | |
1025 | @item network view of nodes, | |
1026 | @item list of last issuers, | |
1027 | @item send transactions, | |
1028 | @item get account amount. | |
1029 | @end itemize") | |
1030 | (license license:agpl3+))) |