Commit | Line | Data |
---|---|---|
20c6b9da | 1 | ;;; GNU Guix --- Functional package management for GNU |
fe7fa353 | 2 | ;;; Copyright © 2015, 2016 Andreas Enge <andreas@enge.fr> |
fa7647c6 | 3 | ;;; Copyright © 2016, 2017 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> |
1c21e734 | 9 | ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> |
5424f9bc | 10 | ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org> |
20c6b9da AE |
11 | ;;; |
12 | ;;; This file is part of GNU Guix. | |
13 | ;;; | |
14 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
15 | ;;; under the terms of the GNU General Public License as published by | |
16 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
17 | ;;; your option) any later version. | |
18 | ;;; | |
19 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
20 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
21 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
22 | ;;; GNU General Public License for more details. | |
23 | ;;; | |
24 | ;;; You should have received a copy of the GNU General Public License | |
25 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
26 | ||
27 | (define-module (gnu packages finance) | |
fa4f95a7 CB |
28 | #:use-module ((guix licenses) #:prefix license:) |
29 | #:use-module (guix packages) | |
30 | #:use-module (guix download) | |
31 | #:use-module (guix build-system gnu) | |
32 | #:use-module (guix build-system cmake) | |
33 | #:use-module (guix build-system python) | |
5424f9bc | 34 | #:use-module (gnu packages) |
fa4f95a7 CB |
35 | #:use-module (gnu packages base) |
36 | #:use-module (gnu packages boost) | |
37 | #:use-module (gnu packages check) | |
38 | #:use-module (gnu packages databases) | |
39 | #:use-module (gnu packages documentation) | |
40 | #:use-module (gnu packages dns) | |
41 | #:use-module (gnu packages emacs) | |
42 | #:use-module (gnu packages graphviz) | |
43 | #:use-module (gnu packages groff) | |
44 | #:use-module (gnu packages libedit) | |
45 | #:use-module (gnu packages libevent) | |
46 | #:use-module (gnu packages libunwind) | |
96f5e2e9 | 47 | #:use-module (gnu packages libusb) |
fa4f95a7 CB |
48 | #:use-module (gnu packages linux) |
49 | #:use-module (gnu packages multiprecision) | |
50 | #:use-module (gnu packages pkg-config) | |
51 | #:use-module (gnu packages protobuf) | |
52 | #:use-module (gnu packages python) | |
cc6f4912 | 53 | #:use-module (gnu packages python-crypto) |
589e3f4e | 54 | #:use-module (gnu packages python-web) |
fa4f95a7 | 55 | #:use-module (gnu packages qt) |
1d0865c1 | 56 | #:use-module (gnu packages readline) |
fa4f95a7 CB |
57 | #:use-module (gnu packages texinfo) |
58 | #:use-module (gnu packages textutils) | |
59 | #:use-module (gnu packages tls) | |
60 | #:use-module (gnu packages upnp) | |
61 | #:use-module (gnu packages web) | |
62 | #:use-module (gnu packages xml) | |
63 | #:use-module (gnu packages gnuzilla)) | |
20c6b9da AE |
64 | |
65 | (define-public bitcoin-core | |
66 | (package | |
67 | (name "bitcoin-core") | |
0632c6a8 | 68 | (version "0.15.1") |
20c6b9da AE |
69 | (source (origin |
70 | (method url-fetch) | |
71 | (uri | |
72 | (string-append "https://bitcoin.org/bin/bitcoin-core-" | |
14ea30e4 | 73 | version "/bitcoin-" version ".tar.gz")) |
20c6b9da AE |
74 | (sha256 |
75 | (base32 | |
0632c6a8 | 76 | "1d22fgwdcn343kd95lh389hj417zwbmnhi29cij8n7wc0nz2vpil")))) |
20c6b9da AE |
77 | (build-system gnu-build-system) |
78 | (native-inputs | |
79 | `(("pkg-config" ,pkg-config) | |
e49e74f5 | 80 | ("python" ,python) ; for the tests |
0193812a MB |
81 | ("util-linux" ,util-linux) ; provides the hexdump command for tests |
82 | ("qttools" ,qttools))) | |
20c6b9da | 83 | (inputs |
fe7fa353 | 84 | `(("bdb" ,bdb-5.3) ; with 6.2.23, there is an error: ambiguous overload |
20c6b9da | 85 | ("boost" ,boost) |
14ea30e4 | 86 | ("libevent" ,libevent) |
20c6b9da AE |
87 | ("miniupnpc" ,miniupnpc) |
88 | ("openssl" ,openssl) | |
89 | ("protobuf" ,protobuf) | |
0193812a | 90 | ("qtbase" ,qtbase))) |
20c6b9da AE |
91 | (arguments |
92 | `(#:configure-flags | |
93 | (list | |
94 | ;; We use a bdb version newer than 4.8. | |
95 | "--with-incompatible-bdb" | |
96 | ;; Boost is not found unless specified manually. | |
97 | (string-append "--with-boost=" | |
0193812a MB |
98 | (assoc-ref %build-inputs "boost")) |
99 | ;; XXX: The configure script looks up Qt paths by | |
100 | ;; `pkg-config --variable=host_bins Qt5Core`, which fails to pick | |
101 | ;; up executables residing in 'qttools', so we specify them here. | |
102 | (string-append "ac_cv_path_LRELEASE=" | |
103 | (assoc-ref %build-inputs "qttools") | |
104 | "/bin/lrelease") | |
105 | (string-append "ac_cv_path_LUPDATE=" | |
106 | (assoc-ref %build-inputs "qttools") | |
107 | "/bin/lupdate")) | |
20c6b9da AE |
108 | #:phases |
109 | (modify-phases %standard-phases | |
110 | (add-before 'check 'set-home | |
111 | (lambda _ | |
112 | (setenv "HOME" (getenv "TMPDIR"))))))) ; Tests write to $HOME. | |
113 | (home-page "https://bitcoin.org/en/") | |
114 | (synopsis "Bitcoin peer-to-peer client") | |
115 | (description | |
116 | "Bitcoin is a digital currency that enables instant payments to anyone | |
117 | anywhere in the world. It uses peer-to-peer technology to operate without | |
118 | central authority: managing transactions and issuing money are carried out | |
119 | collectively by the network. Bitcoin Core is the reference implementation | |
120 | of the bitcoin protocol. This package provides the Bitcoin Core command | |
121 | line client and a client based on Qt.") | |
122 | (license license:expat))) | |
d3699b31 AG |
123 | |
124 | (define-public ledger | |
125 | (package | |
126 | (name "ledger") | |
127 | (version "3.1.1") | |
128 | (source (origin | |
129 | (method url-fetch) | |
130 | (uri (string-append | |
131 | "https://github.com/ledger/ledger/archive/v" | |
132 | version ".tar.gz")) | |
133 | (file-name (string-append name "-" version ".tar.gz")) | |
134 | (sha256 | |
135 | (base32 | |
5424f9bc EB |
136 | "12jlv3gsjhrja25q9hrwh73cdacd2l3c2yyn8qnijav9mdhnbw4h")) |
137 | (patches (search-patches "ledger-revert-boost-python-fix.patch" | |
138 | "ledger-fix-uninitialized.patch")))) | |
d3699b31 AG |
139 | (build-system cmake-build-system) |
140 | (arguments | |
141 | `(#:modules ((guix build cmake-build-system) | |
142 | (guix build utils) | |
143 | (guix build emacs-utils)) | |
144 | #:imported-modules (,@%cmake-build-system-modules | |
145 | (guix build emacs-utils)) | |
146 | #:configure-flags | |
147 | `("-DBUILD_DOCS:BOOL=ON" | |
148 | "-DBUILD_WEB_DOCS:BOOL=ON" | |
149 | "-DBUILD_EMACSLISP:BOOL=ON" | |
150 | "-DUSE_PYTHON:BOOL=ON" | |
151 | "-DCMAKE_INSTALL_LIBDIR:PATH=lib" | |
152 | ,(string-append "-DUTFCPP_INCLUDE_DIR:PATH=" | |
153 | (assoc-ref %build-inputs "utfcpp") | |
154 | "/include")) | |
155 | #:phases | |
156 | (modify-phases %standard-phases | |
157 | (add-before 'configure 'install-examples | |
158 | (lambda* (#:key outputs #:allow-other-keys) | |
159 | (let ((examples (string-append (assoc-ref outputs "out") | |
160 | "/share/doc/ledger/examples"))) | |
161 | (install-file "test/input/sample.dat" examples) | |
162 | (install-file "test/input/demo.ledger" examples)) | |
163 | #t)) | |
164 | (add-after 'build 'build-doc | |
165 | (lambda _ (zero? (system* "make" "doc")))) | |
166 | (add-before 'check 'check-setup | |
167 | ;; One test fails if it can't set the timezone. | |
168 | (lambda* (#:key inputs #:allow-other-keys) | |
169 | (setenv "TZDIR" | |
170 | (string-append (assoc-ref inputs "tzdata") | |
171 | "/share/zoneinfo")) | |
172 | #t)) | |
173 | (add-after 'install 'relocate-elisp | |
174 | (lambda* (#:key outputs #:allow-other-keys) | |
175 | (let* ((site-dir (string-append (assoc-ref outputs "out") | |
176 | "/share/emacs/site-lisp")) | |
177 | (guix-dir (string-append site-dir "/guix.d")) | |
178 | (orig-dir (string-append site-dir "/ledger-mode")) | |
179 | (dest-dir (string-append guix-dir "/ledger-mode"))) | |
180 | (mkdir-p guix-dir) | |
181 | (rename-file orig-dir dest-dir) | |
182 | (emacs-generate-autoloads ,name dest-dir)) | |
183 | #t))))) | |
184 | (inputs | |
185 | `(("boost" ,boost) | |
186 | ("gmp" ,gmp) | |
187 | ("libedit" ,libedit) | |
188 | ("mpfr" ,mpfr) | |
189 | ("python" ,python-2) | |
190 | ("tzdata" ,tzdata) | |
191 | ("utfcpp" ,utfcpp))) | |
192 | (native-inputs | |
b8fc3622 | 193 | `(("emacs" ,emacs-minimal) |
d3699b31 AG |
194 | ("groff" ,groff) |
195 | ("texinfo" ,texinfo))) | |
196 | (home-page "http://ledger-cli.org/") | |
197 | (synopsis "Command-line double-entry accounting program") | |
198 | (description | |
199 | "Ledger is a powerful, double-entry accounting system that is | |
200 | accessed from the UNIX command-line. This may put off some users, since | |
201 | there is no flashy UI, but for those who want unparalleled reporting | |
202 | access to their data there are few alternatives. | |
203 | ||
204 | Ledger uses text files for input. It reads the files and generates | |
205 | reports; there is no other database or stored state. To use Ledger, | |
206 | you create a file of your account names and transactions, run from the | |
207 | command line with some options to specify input and requested reports, and | |
208 | get output. The output is generally plain text, though you could generate | |
209 | a graph or html instead. Ledger is simple in concept, surprisingly rich | |
210 | in ability, and easy to use.") | |
211 | ;; There are some extra licenses in files which do not presently get | |
212 | ;; installed when you build this package. Different versions of the GPL | |
213 | ;; are used in the contrib and python subdirectories. The bundled version | |
214 | ;; of utfcpp is under the Boost 1.0 license. Also the file | |
215 | ;; `tools/update_copyright_year` has an Expat license. | |
216 | (license (list license:bsd-3 | |
217 | license:asl2.0 ; src/strptime.cc | |
218 | (license:non-copyleft | |
219 | "file://src/wcwidth.cc" | |
220 | "See src/wcwidth.cc in the distribution.") | |
221 | license:gpl2+)))) ; lisp/* | |
cb0866c3 HG |
222 | |
223 | (define-public geierlein | |
224 | (package | |
225 | (name "geierlein") | |
1c21e734 | 226 | (version "0.9.13") |
cb0866c3 HG |
227 | (source |
228 | (origin | |
229 | (method url-fetch) | |
230 | (uri (string-append "https://github.com/stesie/geierlein" | |
231 | "/archive/V" version ".tar.gz")) | |
232 | (file-name (string-append name "-" version ".tar.gz")) | |
233 | (sha256 | |
234 | (base32 | |
1c21e734 | 235 | "11jfa7mxvvf0ldhx0hsvjbx3xwvzvn2wrfjpms8c7qmrnqhwh4wp")))) |
cb0866c3 HG |
236 | (build-system gnu-build-system) |
237 | (arguments | |
238 | `(#:tests? #f ; would require npm, python and a lot more | |
239 | #:phases | |
240 | (modify-phases %standard-phases | |
1c21e734 | 241 | (delete 'configure) ; no configure script |
cb0866c3 HG |
242 | (add-after 'unpack 'override-target-directory-and-tool-paths |
243 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
244 | (substitute* "Makefile" | |
245 | (("prefix := .*") | |
246 | (string-append "prefix := " (assoc-ref outputs "out") "\n")) | |
247 | ;; Required for tests, unused for now: | |
248 | ;;(("PYTHON := .*") | |
249 | ;; (string-append (which "python") "\n"))) | |
250 | (("INSTALL := .*") | |
251 | (string-append "INSTALL := " (which "install") "\n"))) | |
252 | (substitute* "bin/xgeierlein.in" | |
253 | ;; Use icecat as XULRUNNER | |
254 | (("^for search ") | |
255 | (string-append "XULRUNNER=" (which "icecat") "\n" | |
256 | "for search "))) | |
257 | #t))))) | |
258 | (inputs | |
259 | `(("icecat" ,icecat))) | |
1e41bb1b | 260 | (home-page "https://stesie.github.io/geierlein/") |
cb0866c3 HG |
261 | (synopsis "Free Elster client, for sending Germany VAT declarations") |
262 | (description | |
263 | "Geierlein is a free Elster client, i.e. an application that | |
264 | allows to send VAT declarations to Germany's fiscal authorities. | |
265 | ||
266 | Currently it is *not* possible to send returns that are due annually | |
267 | (especially the income tax return) since the fiscal authority doesn't | |
268 | allow to do that off the ERiC library (which is proprietary however). | |
269 | It's not clear at the moment whether one day it will be possible to | |
270 | do so.") | |
271 | (license license:agpl3+))) | |
9475fd92 CZ |
272 | |
273 | (define-public electrum | |
274 | (package | |
275 | (name "electrum") | |
68aa384b | 276 | (version "3.0.5") |
9475fd92 CZ |
277 | (source |
278 | (origin | |
279 | (method url-fetch) | |
280 | (uri (string-append "https://download.electrum.org/" | |
281 | version "/Electrum-" | |
282 | version ".tar.gz")) | |
283 | (sha256 | |
284 | (base32 | |
68aa384b | 285 | "06z0a5p1jg93jialphslip8d72q9yg3651qqaf494gs3h9kw1sv1")) |
9475fd92 CZ |
286 | (modules '((guix build utils))) |
287 | (snippet | |
288 | '(begin | |
289 | ;; Delete the bundled dependencies. | |
290 | (delete-file-recursively "packages") | |
291 | #t)))) | |
292 | (build-system python-build-system) | |
293 | (inputs | |
47bd32d9 CZ |
294 | `(("python-pyaes" ,python-pyaes) |
295 | ("python-pysocks" ,python-pysocks) | |
296 | ("python-sip" ,python-sip) | |
297 | ("python-pyqt" ,python-pyqt) | |
298 | ("python-ecdsa" ,python-ecdsa) | |
299 | ("python-pbkdf2" ,python-pbkdf2) | |
300 | ("python-requests" ,python-requests) | |
301 | ("python-qrcode" ,python-qrcode) | |
302 | ("python-protobuf" ,python-protobuf) | |
303 | ("python-dnspython" ,python-dnspython) | |
304 | ("python-jsonrpclib-pelix" ,python-jsonrpclib-pelix))) | |
9475fd92 | 305 | (arguments |
47bd32d9 | 306 | `(#:tests? #f ;; package doesn't have any tests |
9475fd92 CZ |
307 | #:phases |
308 | (modify-phases %standard-phases | |
309 | (add-before 'build 'patch-home | |
310 | (lambda* (#:key outputs #:allow-other-keys) | |
311 | (substitute* "setup.py" | |
312 | (("~/.local/share") | |
313 | (string-append (assoc-ref outputs "out") "/local/share")))))))) | |
314 | (home-page "https://electrum.org/") | |
315 | (synopsis "Bitcoin wallet") | |
316 | (description | |
317 | "Electrum is a lightweight Bitcoin client, based on a client-server | |
318 | protocol. It supports Simple Payment Verification (SPV) and deterministic key | |
319 | generation from a seed. Your secret keys are encrypted and are never sent to | |
320 | other machines/servers. Electrum does not download the Bitcoin blockchain.") | |
321 | (license license:expat))) | |
8514662b TF |
322 | |
323 | (define-public monero | |
324 | ;; This package bundles easylogging++ and lmdb. | |
325 | ;; The bundled easylogging++ is modified, and the changes will not be upstreamed. | |
326 | ;; The devs deem the lmdb driver too critical a consenus component, to use | |
327 | ;; the system's dynamically linked library. | |
328 | (package | |
329 | (name "monero") | |
14e09e90 | 330 | (version "0.11.1.0") |
8514662b TF |
331 | (source |
332 | (origin | |
333 | (method url-fetch) | |
334 | (uri (string-append "https://github.com/monero-project/monero/archive/v" | |
335 | version ".tar.gz")) | |
336 | (file-name (string-append name "-" version ".tar.gz")) | |
337 | (modules '((guix build utils))) | |
338 | (snippet | |
339 | '(begin | |
340 | ;; Delete bundled dependencies. | |
341 | (for-each | |
342 | delete-file-recursively | |
343 | '("external/miniupnpc" "external/rapidjson" | |
344 | "external/unbound")) | |
345 | #t)) | |
346 | (sha256 | |
347 | (base32 | |
14e09e90 | 348 | "16shd834025jyzy68h3gag1sz8vbk875hy4j97hrki8pacz8vd5m")))) |
8514662b TF |
349 | (build-system cmake-build-system) |
350 | (native-inputs | |
351 | `(("doxygen" ,doxygen) | |
352 | ("googletest" ,googletest) | |
353 | ("graphviz" ,graphviz) | |
354 | ("pkg-config" ,pkg-config))) | |
355 | (inputs | |
356 | `(("bind" ,isc-bind) | |
357 | ("boost" ,boost) | |
358 | ("expat" ,expat) | |
359 | ("libunwind" ,libunwind) | |
360 | ("lmdb" ,lmdb) | |
361 | ("miniupnpc" ,miniupnpc) | |
362 | ("openssl" ,openssl) | |
363 | ("rapidjson" ,rapidjson) | |
364 | ("unbound" ,unbound))) | |
365 | (arguments | |
366 | `(#:out-of-source? #t | |
367 | #:configure-flags '("-DBUILD_TESTS=ON" | |
fa7647c6 EF |
368 | ,@(if (string=? "aarch64-linux" (%current-system)) |
369 | '("-DARCH=armv8-a") | |
370 | '()) | |
8514662b TF |
371 | "-DBUILD_GUI_DEPS=ON") |
372 | #:phases | |
373 | (modify-phases %standard-phases | |
374 | ;; tests/core_tests need a valid HOME | |
375 | (add-before 'configure 'set-home | |
376 | (lambda _ | |
377 | (setenv "HOME" (getcwd)) | |
378 | #t)) | |
379 | (add-after 'set-home 'fix-wallet-path-for-unit-tests | |
380 | (lambda _ | |
381 | (substitute* "tests/unit_tests/serialization.cpp" | |
382 | (("\\.\\./\\.\\./\\.\\./\\.\\./") "../../")) | |
383 | #t)) | |
384 | (add-after 'fix-wallet-path-for-unit-tests 'change-log-path | |
385 | (lambda _ | |
386 | (substitute* "contrib/epee/src/mlog.cpp" | |
387 | (("epee::string_tools::get_current_module_folder\\(\\)") | |
388 | "\".bitmonero\"")) | |
389 | (substitute* "contrib/epee/src/mlog.cpp" | |
390 | (("return \\(") "return ((std::string(getenv(\"HOME\"))) / ")) | |
391 | #t)) | |
392 | (replace 'check | |
393 | (lambda _ | |
394 | (zero? | |
395 | (system* "make" "ARGS=-E 'unit_tests|libwallet_api_tests'" | |
396 | "test")))) | |
397 | ;; The excluded unit tests need network access | |
398 | (add-after 'check 'unit-tests | |
399 | (lambda _ | |
400 | (let ((excluded-unit-tests | |
401 | (string-join | |
402 | '("AddressFromURL.Success" | |
403 | "AddressFromURL.Failure" | |
404 | "DNSResolver.IPv4Success" | |
405 | "DNSResolver.DNSSECSuccess" | |
406 | "DNSResolver.DNSSECFailure" | |
407 | "DNSResolver.GetTXTRecord") | |
408 | ":"))) | |
409 | (zero? | |
410 | (system* "tests/unit_tests/unit_tests" | |
411 | (string-append "--gtest_filter=-" | |
412 | excluded-unit-tests)))))) | |
413 | (add-after 'install 'install-blockchain-import-export | |
414 | (lambda* (#:key outputs #:allow-other-keys) | |
415 | (let* ((out (assoc-ref outputs "out")) | |
416 | (bin (string-append out "/bin"))) | |
417 | (install-file "bin/monero-blockchain-import" bin) | |
418 | (install-file "bin/monero-blockchain-export" bin))))))) | |
419 | (home-page "https://getmonero.org/") | |
420 | (synopsis "Command-line interface to the Monero currency") | |
421 | (description | |
422 | "Monero is a secure, private, untraceable currency. This package provides the | |
423 | Monero command line client and daemon.") | |
424 | (license license:bsd-3))) | |
79228a52 TF |
425 | |
426 | (define-public monero-core | |
427 | (package | |
428 | (name "monero-core") | |
12a130b0 | 429 | (version "0.11.1.0") |
79228a52 TF |
430 | (source |
431 | (origin | |
432 | (method url-fetch) | |
433 | (uri (string-append "https://github.com/monero-project/monero-core/archive/v" | |
434 | version ".tar.gz")) | |
435 | (file-name (string-append name "-" version ".tar.gz")) | |
436 | (sha256 | |
437 | (base32 | |
12a130b0 | 438 | "1q7a9kpcjgp74fbplzs2iszdld6gwbfrydyd9in9izhwp100p1rr")))) |
79228a52 TF |
439 | (build-system gnu-build-system) |
440 | (native-inputs | |
441 | `(("doxygen" ,doxygen) | |
442 | ("graphviz" ,graphviz) | |
443 | ("pkg-config" ,pkg-config))) | |
444 | (inputs | |
445 | `(("boost" ,boost) | |
446 | ("libunwind" ,libunwind) | |
447 | ("openssl" ,openssl) | |
448 | ("qt" ,qt) | |
1d0865c1 | 449 | ("readline" ,readline) |
79228a52 TF |
450 | ("unbound" ,unbound))) |
451 | (propagated-inputs | |
452 | `(("monero" ,monero))) | |
453 | (arguments | |
454 | `(#:phases | |
455 | (modify-phases %standard-phases | |
456 | (delete 'configure) | |
457 | (delete 'check) | |
458 | (add-before 'build 'fix-makefile-vars | |
459 | (lambda _ | |
460 | (substitute* "src/zxcvbn-c/makefile" | |
461 | (("\\?=") "=")) | |
462 | #t)) | |
463 | (add-after 'fix-makefile-vars 'fix-library-paths | |
464 | (lambda* (#:key inputs #:allow-other-keys) | |
465 | (substitute* "monero-wallet-gui.pro" | |
466 | (("-L/usr/local/lib") "") | |
467 | (("-L/usr/local/opt/openssl/lib") | |
468 | (string-append "-L" | |
469 | (assoc-ref inputs "openssl") | |
470 | "/lib")) | |
471 | (("-L/usr/local/opt/boost/lib") | |
472 | (string-append "-L" | |
473 | (assoc-ref inputs "boost") | |
474 | "/lib"))) | |
475 | #t)) | |
476 | (add-after 'fix-library-paths 'fix-monerod-path | |
477 | (lambda* (#:key inputs #:allow-other-keys) | |
478 | (substitute* "src/daemon/DaemonManager.cpp" | |
479 | (("QApplication::applicationDirPath\\(\\) \\+ \"/monerod") | |
480 | (string-append "\""(assoc-ref inputs "monero") | |
481 | "/bin/monerod"))) | |
482 | #t)) | |
483 | (replace 'build | |
484 | (lambda _ | |
485 | (zero? (system* "./build.sh")))) | |
486 | (add-after 'build 'fix-install-path | |
487 | (lambda* (#:key outputs #:allow-other-keys) | |
488 | (substitute* "build/Makefile" | |
489 | (("/opt/monero-wallet-gui") | |
490 | (assoc-ref outputs "out"))) | |
491 | #t)) | |
492 | (add-before 'install 'change-dir | |
493 | (lambda _ | |
494 | (chdir "build")))))) | |
495 | (home-page "https://getmonero.org/") | |
496 | (synopsis "Graphical user interface for the Monero currency") | |
497 | (description | |
498 | "Monero is a secure, private, untraceable currency. This package provides the | |
499 | Monero GUI client.") | |
500 | (license license:bsd-3))) | |
00d3f022 DM |
501 | |
502 | (define-public python-trezor-agent | |
503 | (package | |
504 | (name "python-trezor-agent") | |
505 | (version "0.9.4") | |
506 | (source | |
507 | (origin | |
508 | (method url-fetch) | |
509 | (uri (string-append "https://github.com/romanz/trezor-agent/archive/v" | |
510 | version ".tar.gz")) | |
511 | (file-name (string-append name "-" version ".tar.gz")) | |
512 | (sha256 | |
513 | (base32 | |
514 | "0h8jb147vpjk7mqbl4za0xdh7lblhx07n9dfk80kn2plwnvrry1x")))) | |
515 | (build-system python-build-system) | |
516 | (arguments | |
517 | `(#:phases | |
518 | (modify-phases %standard-phases | |
519 | (delete 'check) | |
520 | (add-after 'install 'check | |
521 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
522 | ;; Make installed package available for running the tests | |
523 | (add-installed-pythonpath inputs outputs) | |
524 | (invoke "py.test")))))) | |
525 | (propagated-inputs | |
526 | `(("python-ecdsa" ,python-ecdsa) | |
527 | ("python-ed25519" ,python-ed25519) | |
528 | ("python-semver" ,python-semver) | |
529 | ("python-unidecode" ,python-unidecode))) | |
530 | (native-inputs | |
531 | `(("python-mock" ,python-mock) | |
532 | ("python-pytest" ,python-pytest))) | |
533 | (home-page "https://github.com/romanz/trezor-agent") | |
534 | (synopsis "TREZOR SSH and GPG host support") | |
535 | (description | |
536 | "@code{libagent} is a library that allows using TREZOR, Keepkey and | |
537 | Ledger Nano as a hardware SSH/GPG agent.") | |
538 | (license license:lgpl3))) | |
539 | ||
540 | (define-public python2-trezor-agent | |
541 | (package-with-python2 python-trezor-agent)) | |
6e9749ef DM |
542 | |
543 | (define-public python-mnemonic | |
544 | (package | |
545 | (name "python-mnemonic") | |
546 | (version "0.18") | |
547 | (source | |
548 | (origin | |
549 | (method url-fetch) | |
550 | (uri (pypi-uri "mnemonic" version)) | |
551 | (sha256 | |
552 | (base32 | |
553 | "07bzfa5di6nv5xwwcwbypnflpj50wlfczhh6q6hg8w13g5m319q2")))) | |
554 | (build-system python-build-system) | |
555 | (propagated-inputs | |
556 | `(("python-pbkdf2" ,python-pbkdf2))) | |
557 | (home-page "https://github.com/trezor/python-mnemonic") | |
558 | (synopsis "Implementation of Bitcoin BIP-0039") | |
559 | (description "@code{mnemonic} is a library that provides an implementation | |
560 | of Bitcoin BIP-0039.") | |
561 | (license license:expat))) | |
562 | ||
563 | (define-public python2-mnemonic | |
564 | (package-with-python2 python-mnemonic)) | |
96f5e2e9 DM |
565 | |
566 | (define-public python-ledgerblue | |
567 | (package | |
568 | (name "python-ledgerblue") | |
569 | (version "0.1.16") | |
570 | (source | |
571 | (origin | |
572 | (method url-fetch) | |
573 | (uri (pypi-uri "ledgerblue" version)) | |
574 | (sha256 | |
575 | (base32 | |
576 | "010mghaqh1cmz3a0ifc3f40mmyplilwlw7kpha2mzyrrff46p9gb")))) | |
577 | (build-system python-build-system) | |
578 | (propagated-inputs | |
579 | `(("python-ecpy" ,python-ecpy) | |
580 | ("python-future" ,python-future) | |
581 | ("python-hidapi" ,python-hidapi) | |
582 | ("python-pillow" ,python-pillow) | |
583 | ("python-protobuf" ,python-protobuf) | |
584 | ("python-pycrypto" ,python-pycrypto))) | |
585 | (home-page "https://github.com/LedgerHQ/blue-loader-python") | |
586 | (synopsis "Python library to communicate with Ledger Blue/Nano S") | |
587 | (description "@code{ledgerblue} is a Python library to communicate with | |
588 | Ledger Blue/Nano S.") | |
589 | (license license:asl2.0))) | |
590 | ||
591 | (define-public python2-ledgerblue | |
592 | (package-with-python2 python-ledgerblue)) | |
593 | ||
1dca32e3 DM |
594 | (define-public python-trezor |
595 | (package | |
596 | (name "python-trezor") | |
597 | (version "0.7.16") | |
598 | (source | |
599 | (origin | |
600 | (method url-fetch) | |
601 | (uri (pypi-uri "trezor" version)) | |
602 | (sha256 | |
603 | (base32 | |
604 | "055kii56wgwadl5z911s59ya2fnsqzk3n5i19s2hb9sv2by6knvb")))) | |
605 | (build-system python-build-system) | |
606 | (propagated-inputs | |
607 | `(("python-ecdsa" ,python-ecdsa) | |
608 | ("python-hidapi" ,python-hidapi) | |
609 | ("python-mnemonic" ,python-mnemonic) | |
610 | ("python-protobuf" ,python-protobuf) | |
611 | ("python-requests" ,python-requests))) | |
612 | (native-inputs | |
613 | `(("python-pyqt" ,python-pyqt))) ; Tests | |
614 | (home-page "https://github.com/trezor/python-trezor") | |
615 | (synopsis "Python library for communicating with TREZOR Hardware Wallet") | |
616 | (description "@code{trezor} is a Python library for communicating with | |
617 | TREZOR Hardware Wallet.") | |
618 | (license license:lgpl3))) | |
619 | ||
620 | (define-public python2-trezor | |
621 | (package-with-python2 python-trezor)) | |
d596fea5 | 622 | |
d6ddeffc DM |
623 | (define-public python-keepkey |
624 | (package | |
625 | (name "python-keepkey") | |
626 | (version "4.0.2") | |
627 | (source | |
628 | (origin | |
629 | (method url-fetch) | |
630 | (uri (pypi-uri "keepkey" version)) | |
631 | (sha256 | |
632 | (base32 | |
633 | "0f4iqqjlqmamw4mhyhik4qlb5bnfd10wbjw9yzgir105wh5fdpnd")))) | |
634 | (build-system python-build-system) | |
635 | (arguments | |
636 | `(#:phases | |
637 | (modify-phases %standard-phases | |
638 | (delete 'check) | |
639 | (add-after 'install 'check | |
640 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
641 | (add-installed-pythonpath inputs outputs) | |
642 | (apply invoke "python" (find-files "tests/unit" "\\.py$"))))))) | |
643 | (propagated-inputs | |
644 | `(("python-ecdsa" ,python-ecdsa) | |
645 | ("python-hidapi" ,python-hidapi) | |
646 | ("python-mnemonic" ,python-mnemonic) | |
647 | ("python-protobuf" ,python-protobuf))) | |
648 | (home-page "https://github.com/keepkey/python-keepkey") | |
649 | (synopsis "Python library for communicating with KeepKey Hardware Wallet") | |
650 | (description "@code{keepkey} is a Python library for communicating with | |
651 | the KeepKey Hardware Wallet.") | |
652 | (license license:lgpl3))) | |
653 | ||
654 | (define-public python2-keepkey | |
655 | (package-with-python2 python-keepkey)) | |
656 | ||
d596fea5 DM |
657 | (define-public ledger-agent |
658 | (package | |
659 | (name "ledger-agent") | |
660 | (version "0.9.0") | |
661 | (source | |
662 | (origin | |
663 | (method url-fetch) | |
664 | (uri (pypi-uri "ledger_agent" version)) | |
665 | (sha256 | |
666 | (base32 | |
667 | "03zj602m2rln9yvr08dswy56vzkbldp8b074ixwzz525dafblr92")))) | |
668 | (build-system python-build-system) | |
669 | (inputs | |
670 | `(("python-ledgerblue" ,python-ledgerblue) | |
671 | ("python-trezor-agent" ,python-trezor-agent))) | |
672 | (home-page "http://github.com/romanz/trezor-agent") | |
673 | (synopsis "Ledger as hardware SSH/GPG agent") | |
674 | (description "This package allows using Ledger as hardware SSH/GPG agent. | |
675 | ||
5859fd6c MB |
676 | Usage for SSH: trezor-agent foo@@example.com --connect |
677 | Usage for GPG: Initialize using trezor-gpg init \"Foo <foo@@example.com>\" | |
d596fea5 DM |
678 | Then set the environment variable GNUPGHOME to |
679 | \"${HOME}/.gnupg/trezor\".") | |
680 | (license license:lgpl3))) | |
47c8ea99 DM |
681 | |
682 | (define-public trezor-agent | |
683 | (package | |
684 | (name "trezor-agent") | |
685 | (version "0.9.0") | |
686 | (source | |
687 | (origin | |
688 | (method url-fetch) | |
689 | (uri (pypi-uri "trezor_agent" version)) | |
690 | (sha256 | |
691 | (base32 | |
692 | "1i5cdamlf3c0ym600pjklij74p8ifj9cv7xrpnrfl1b8nkadswbz")))) | |
693 | (build-system python-build-system) | |
694 | (inputs | |
695 | `(("python-trezor" ,python-trezor) | |
696 | ("python-trezor-agent" ,python-trezor-agent))) | |
697 | (home-page "http://github.com/romanz/trezor-agent") | |
698 | (synopsis "Using Trezor as hardware SSH/GPG agent") | |
699 | (description "This package allows using Trezor as a hardware SSH/GPG | |
700 | agent.") | |
701 | (license license:lgpl3))) | |
50c4d676 DM |
702 | |
703 | (define-public keepkey-agent | |
704 | (package | |
705 | (name "keepkey-agent") | |
706 | (version "0.9.0") | |
707 | (source | |
708 | (origin | |
709 | (method url-fetch) | |
710 | (uri (pypi-uri "keepkey_agent" version)) | |
711 | (sha256 | |
712 | (base32 | |
713 | "03779gvlx70i0nnry98i4pl1d92604ix5x6jgdfkrdgzqbh5vj27")))) | |
714 | (build-system python-build-system) | |
715 | (inputs | |
716 | `(("python-keepkey" ,python-keepkey) | |
717 | ("python-trezor-agent" ,python-trezor-agent))) | |
718 | (home-page "http://github.com/romanz/trezor-agent") | |
719 | (synopsis "KeepKey as hardware SSH/GPG agent") | |
720 | (description "This package allows using KeepKey as a hardware SSH/GPG | |
721 | agent.") | |
722 | (license license:lgpl3))) |