X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/74b992fb439ce99bd69c0e6773c486c63c828510..e6bfb02eb79777b760031384d4a3c14239f7fb55:/gnu/packages/finance.scm diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index 344042ea87..c0b6400cc7 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -6,17 +6,21 @@ ;;; Copyright © 2017 Carlo Zancanaro ;;; Copyright © 2017 Theodoros Foradis ;;; Copyright © 2017 Vasile Dumitrascu -;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice +;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2018 Eric Bavier ;;; Copyright © 2018 Adriano Peluso ;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou ;;; Copyright © 2018 Arun Isaac ;;; Copyright © 2019, 2020 Guillaume Le Vaillant ;;; Copyright © 2019 Tanguy Le Carrour -;;; Copyright © 2019 Martin Becze +;;; Copyright © 2019, 2020 Martin Becze ;;; Copyright © 2019 Sebastian Schott ;;; Copyright © 2020 Kei Kebreau ;;; Copyright © 2020 Christopher Lemmer Webber +;;; Copyright © 2020 Tom Zander +;;; Copyright © 2020 Marius Bakke +;;; Copyright © 2020 Vinicius Monego +;;; Copyright © 2020 Carlo Holl ;;; ;;; This file is part of GNU Guix. ;;; @@ -40,7 +44,9 @@ #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system cmake) + #:use-module (guix build-system copy) #:use-module (guix build-system emacs) + #:use-module (guix build-system haskell) #:use-module (guix build-system python) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system go) @@ -68,6 +74,10 @@ #:use-module (gnu packages graphviz) #:use-module (gnu packages groff) #:use-module (gnu packages gtk) + #:use-module (gnu packages haskell-check) + #:use-module (gnu packages haskell-web) + #:use-module (gnu packages haskell-xyz) + #:use-module (gnu packages jemalloc) #:use-module (gnu packages libedit) #:use-module (gnu packages libevent) #:use-module (gnu packages libunwind) @@ -91,7 +101,6 @@ #:use-module (gnu packages time) #:use-module (gnu packages tls) #:use-module (gnu packages upnp) - #:use-module (gnu packages version-control) #:use-module (gnu packages web) #:use-module (gnu packages xml) #:use-module (gnu packages gnuzilla)) @@ -101,13 +110,14 @@ (name "bitcoin-core") (version "0.19.1") (source (origin - (method url-fetch) - (uri - (string-append "https://bitcoincore.org/bin/bitcoin-core-" - version "/bitcoin-" version ".tar.gz")) - (sha256 - (base32 - "1h3w7brc18145np920vy7j5ms5hym59hvr40swdjx34fbdaisngj")))) + (method url-fetch) + (uri + (string-append "https://bitcoincore.org/bin/bitcoin-core-" + version "/bitcoin-" version ".tar.gz")) + (sha256 + (base32 + "1h3w7brc18145np920vy7j5ms5hym59hvr40swdjx34fbdaisngj")) + (patches (search-patches "bitcoin-core-python-compat.patch")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) @@ -124,35 +134,36 @@ ("qtbase" ,qtbase))) (arguments `(#:configure-flags - (list - ;; Boost is not found unless specified manually. - (string-append "--with-boost=" - (assoc-ref %build-inputs "boost")) - ;; XXX: The configure script looks up Qt paths by - ;; `pkg-config --variable=host_bins Qt5Core`, which fails to pick - ;; up executables residing in 'qttools', so we specify them here. - (string-append "ac_cv_path_LRELEASE=" - (assoc-ref %build-inputs "qttools") - "/bin/lrelease") - (string-append "ac_cv_path_LUPDATE=" - (assoc-ref %build-inputs "qttools") - "/bin/lupdate")) + (list + ;; Boost is not found unless specified manually. + (string-append "--with-boost=" + (assoc-ref %build-inputs "boost")) + ;; XXX: The configure script looks up Qt paths by + ;; `pkg-config --variable=host_bins Qt5Core`, which fails to pick + ;; up executables residing in 'qttools', so we specify them here. + (string-append "ac_cv_path_LRELEASE=" + (assoc-ref %build-inputs "qttools") + "/bin/lrelease") + (string-append "ac_cv_path_LUPDATE=" + (assoc-ref %build-inputs "qttools") + "/bin/lupdate")) #:phases - (modify-phases %standard-phases - (add-before 'configure 'make-qt-deterministic + (modify-phases %standard-phases + (add-before 'configure 'make-qt-deterministic (lambda _ - ;; Make Qt deterministic. - (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1") - #t)) - (add-before 'check 'set-home + ;; Make Qt deterministic. + (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1") + #t)) + (add-before 'check 'set-home (lambda _ - (setenv "HOME" (getenv "TMPDIR")) ; tests write to $HOME - #t)) - (add-after 'check 'check-functional + (setenv "HOME" (getenv "TMPDIR")) ; tests write to $HOME + #t)) + (add-after 'check 'check-functional (lambda _ - (invoke "python3" "./test/functional/test_runner.py" - (string-append "--jobs=" (number->string (parallel-job-count)))) - #t))))) + (invoke + "python3" "./test/functional/test_runner.py" + (string-append "--jobs=" (number->string (parallel-job-count)))) + #t))))) (home-page "https://bitcoin.org/en/") (synopsis "Bitcoin peer-to-peer client") (description @@ -164,26 +175,82 @@ of the bitcoin protocol. This package provides the Bitcoin Core command line client and a client based on Qt.") (license license:expat))) +(define-public hledger + (package + (name "hledger") + (version "1.19.1") + (source + (origin + (method url-fetch) + (uri (string-append + "https://hackage.haskell.org/package/hledger/hledger-" + version + ".tar.gz")) + (sha256 + (base32 + "0wfsyf2q1kf90mj3lxs0m5ghj153axmpkc8xfy12vkz5imnyphfm")))) + (build-system haskell-build-system) + (inputs + `(("ghc-decimal" ,ghc-decimal) + ("ghc-diff" ,ghc-diff) + ("ghc-aeson" ,ghc-aeson) + ("ghc-ansi-terminal" ,ghc-ansi-terminal) + ("ghc-base-compat-batteries" ,ghc-base-compat-batteries) + ("ghc-cmdargs" ,ghc-cmdargs) + ("ghc-data-default" ,ghc-data-default) + ("ghc-extra" ,ghc-extra) + ("ghc-hashable" ,ghc-hashable) + ("ghc-hledger-lib" ,ghc-hledger-lib) + ("ghc-lucid" ,ghc-lucid) + ("ghc-math-functions" ,ghc-math-functions) + ("ghc-megaparsec" ,ghc-megaparsec) + ("ghc-old-time" ,ghc-old-time) + ("ghc-pretty-show" ,ghc-pretty-show) + ("ghc-regex-tdfa" ,ghc-regex-tdfa) + ("ghc-safe" ,ghc-safe) + ("ghc-shakespeare" ,ghc-shakespeare) + ("ghc-split" ,ghc-split) + ("ghc-tabular" ,ghc-tabular) + ("ghc-tasty" ,ghc-tasty) + ("ghc-temporary" ,ghc-temporary) + ("ghc-timeit" ,ghc-timeit) + ("ghc-unordered-containers" ,ghc-unordered-containers) + ("ghc-utf8-string" ,ghc-utf8-string) + ("ghc-utility-ht" ,ghc-utility-ht) + ("ghc-wizards" ,ghc-wizards))) + (home-page "https://hledger.org") + (synopsis "Command-line interface for the hledger accounting system") + (description + "The command-line interface for the hledger accounting system. Its basic +function is to read a plain text file describing financial transactions and +produce useful reports. + +hledger is a robust, cross-platform set of tools for tracking money, time, or +any other commodity, using double-entry accounting and a simple, editable file +format, with command-line, terminal and web interfaces. It is a Haskell +rewrite of Ledger, and one of the leading implementations of Plain Text +Accounting.") + (license license:gpl3))) + (define-public homebank (package (name "homebank") - (version "5.2.8") + (version "5.4.3") (source (origin (method url-fetch) (uri (string-append "http://homebank.free.fr/public/homebank-" version ".tar.gz")) (sha256 (base32 - "13ampiv68y30kc0p2560g3yz8whqpwnidfcnb9lndv93b9ca767y")))) + "02wd569viwy6ncy0144z9nxr3zmpl4shkqhz7zzwyky4gknxf8lj")))) (build-system glib-or-gtk-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("intltool" ,intltool))) (inputs `(("gtk+" ,gtk+) + ("libofx" ,libofx) ("libsoup" ,libsoup))) - (arguments - `(#:configure-flags (list "-without-ofx"))) ; libofx is not available yet (home-page "http://homebank.free.fr/") (synopsis "Graphical personal accounting application") (description "HomeBank allows you to manage your personal accounts at @@ -195,25 +262,41 @@ and dynamically with report tools based on filtering and graphical charts.") (define-public ledger (package (name "ledger") - (version "3.1.3") + (version "3.2.1") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/ledger/ledger.git") + (url "https://github.com/ledger/ledger") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0bfnrqrd6wqgsngfpqi30xh6yy86pwl25iwzrqy44q31r0zl4mm3")))) + (base32 "0x6jxwss3wwzbzlwmnwb8yzjk8f9wfawif4f1b74z2qg6hc4r7f6")))) (build-system cmake-build-system) (arguments - `(#:configure-flags + `(#:modules (,@%cmake-build-system-modules + ((guix build python-build-system) #:select (python-version))) + #:imported-modules (,@%cmake-build-system-modules + (guix build python-build-system)) + #:configure-flags `("-DBUILD_DOCS:BOOL=ON" "-DBUILD_WEB_DOCS:BOOL=ON" "-DUSE_PYTHON:BOOL=ON" "-DCMAKE_INSTALL_LIBDIR:PATH=lib") #:phases - (modify-phases %standard-phases + (modify-phases (@ (guix build cmake-build-system) %standard-phases) + (add-after 'unpack 'fix-python-installation-directory + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; By default the package attempts to install its Python bindings + ;; to the Python store directory, which obviously does not work. + ;; Passing -DPython_SITEARCH in #:configure-flags has no effect. + (let ((python-version (python-version (assoc-ref inputs "python"))) + (out (assoc-ref outputs "out"))) + (substitute* "src/CMakeLists.txt" + (("DESTINATION \\$\\{Python_SITEARCH\\}") + (string-append "DESTINATION " out "/lib/python" + python-version "/site-packages"))) + #t))) (add-before 'configure 'install-examples (lambda* (#:key outputs #:allow-other-keys) (let ((examples (string-append (assoc-ref outputs "out") @@ -239,12 +322,12 @@ and dynamically with report tools based on filtering and graphical charts.") ("gmp" ,gmp) ("libedit" ,libedit) ("mpfr" ,mpfr) - ("python" ,python-2) - ("tzdata" ,tzdata) + ("python" ,python) ("utfcpp" ,utfcpp))) (native-inputs `(("groff" ,groff) - ("texinfo" ,texinfo))) + ("texinfo" ,texinfo) + ("tzdata" ,tzdata-for-tests))) (home-page "https://ledger-cli.org/") (synopsis "Command-line double-entry accounting program") (description @@ -282,7 +365,7 @@ in ability, and easy to use.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/ledger/ledger-mode.git") + (url "https://github.com/ledger/ledger-mode") (commit commit))) (file-name (git-file-name name version)) (sha256 @@ -356,7 +439,7 @@ This package provides the Emacs mode.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/stesie/geierlein.git") + (url "https://github.com/stesie/geierlein") (commit (string-append "V" version)))) (file-name (git-file-name name version)) (sha256 @@ -389,11 +472,11 @@ This package provides the Emacs mode.") (synopsis "Free Elster client, for sending Germany VAT declarations") (description "Geierlein is a free Elster client, i.e. an application that -allows to send VAT declarations to Germany's fiscal authorities. +sends VAT declarations to Germany's fiscal authorities. Currently it is *not* possible to send returns that are due annually (especially the income tax return) since the fiscal authority doesn't -allow to do that off the ERiC library (which is proprietary however). +allow doing that off the ERiC library (which is proprietary however). It's not clear at the moment whether one day it will be possible to do so.") (license license:agpl3+))) @@ -434,14 +517,19 @@ do so.") ("python-dnspython" ,python-dnspython) ("python-jsonrpclib-pelix" ,python-jsonrpclib-pelix))) (arguments - `(#:tests? #f ;; package doesn't have any tests + `(#:tests? #f ; no tests #:phases (modify-phases %standard-phases - (add-before 'build 'patch-home + (add-after 'unpack 'fix-prefix (lambda* (#:key outputs #:allow-other-keys) - (substitute* "setup.py" - (("~/.local/share") - (string-append (assoc-ref outputs "out") "/local/share")))))))) + (let ((out (assoc-ref outputs "out"))) + ;; setup.py installs to ~/.local/share if sys.prefix/share isn't + ;; writable. sys.prefix points to Python's, not our, --prefix. + (mkdir-p (string-append out "/share")) + (substitute* "setup.py" + (("sys\\.prefix") + (format #f "\"~a\"" out))) + #t)))))) (home-page "https://electrum.org/") (synopsis "Bitcoin wallet") (description @@ -454,23 +542,23 @@ other machines/servers. Electrum does not download the Bitcoin blockchain.") (define-public electron-cash (package (name "electron-cash") - (version "4.0.14") + (version "4.1.1") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/Electron-Cash/Electron-Cash.git") + (url "https://github.com/Electron-Cash/Electron-Cash") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "1dp7cj1185h6xfz6jzh0iq58zvg3wq9hl96bkgxkf5h4ygni2vm6")))) + (base32 "1fllz2s20lg4hrppzmnlgjy9mrq7gaq66l2apb3vz1avzvsjw3gm")))) (build-system python-build-system) (inputs `(("libevent" ,libevent) - ("libsecp256k1", libsecp256k1) + ("libsecp256k1" ,libsecp256k1-bitcoin-cash) ("openssl" ,openssl) ("python-cython" ,python-cython) - ("python-dateutil", python-dateutil) + ("python-dateutil" ,python-dateutil) ("python-dnspython" ,python-dnspython) ("python-ecdsa" ,python-ecdsa) ("python-hidapi" ,python-hidapi) @@ -487,7 +575,7 @@ other machines/servers. Electrum does not download the Bitcoin blockchain.") ("qtsvg" ,qtsvg) ("zlib" ,zlib))) (arguments - `(#:tests? #f ; No tests + `(#:tests? #f ; no tests #:modules ((guix build python-build-system) (guix build qt-utils) (guix build utils)) @@ -495,16 +583,19 @@ other machines/servers. Electrum does not download the Bitcoin blockchain.") (guix build qt-utils)) #:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-home + (add-after 'unpack 'create-output-directories (lambda* (#:key outputs #:allow-other-keys) - (substitute* "setup.py" - (("~/.local/share") - (string-append (assoc-ref outputs "out") "/local/share"))))) + ;; setup.py installs to ~/.local/share if this doesn't exist. + (mkdir-p (string-append (assoc-ref outputs "out") "/share")) + #t)) (add-after 'unpack 'use-libsecp256k1-input (lambda* (#:key inputs #:allow-other-keys) (substitute* "lib/secp256k1.py" (("library_paths = .* 'libsecp256k1.so.0'.") - (string-append "library_paths = ('" (assoc-ref inputs "libsecp256k1") "/lib/libsecp256k1.so.0'"))))) + (string-append "library_paths = ('" + (assoc-ref inputs "libsecp256k1") + "/lib/libsecp256k1.so.0'"))) + #t)) (add-after 'install 'wrap-qt (lambda* (#:key outputs #:allow-other-keys) (wrap-qt-program (assoc-ref outputs "out") "electron-cash") @@ -526,12 +617,12 @@ other machines/servers. Electroncash does not download the Bitcoin Cash blockch ;; the system's dynamically linked library. (package (name "monero") - (version "0.15.0.5") + (version "0.17.1.1") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/monero-project/monero.git") + (url "https://github.com/monero-project/monero") (commit (string-append "v" version)) (recursive? #t))) (file-name (git-file-name name version)) @@ -546,12 +637,10 @@ other machines/servers. Electroncash does not download the Bitcoin Cash blockch "external/unbound")) #t)) (sha256 - (base32 - "06zzwa0y8ic6x3y2fy501788r51p4klanyvmm76ywrwf087njlkv")))) + (base32 "18x27dm24k04vx0yz57zi02rk0wrmbn4wr8alqf48dq6z9wr0fhp")))) (build-system cmake-build-system) (native-inputs `(("doxygen" ,doxygen) - ("git" ,git) ("graphviz" ,graphviz) ("pkg-config" ,pkg-config) ("protobuf" ,protobuf) @@ -578,7 +667,6 @@ other machines/servers. Electroncash does not download the Bitcoin Cash blockch #:configure-flags (list "-DARCH=default" "-DBUILD_TESTS=ON" - "-DBUILD_GUI_DEPS=ON" (string-append "-DReadline_ROOT_DIR=" (assoc-ref %build-inputs "readline"))) #:phases @@ -624,17 +712,11 @@ other machines/servers. Electroncash does not download the Bitcoin Cash blockch (invoke "tests/unit_tests/unit_tests" (string-append "--gtest_filter=-" excluded-unit-tests))))) - (add-after 'install 'install-librandomx - (lambda* (#:key outputs #:allow-other-keys) - (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) - (install-file "external/randomx/librandomx.a" lib) - #t))) - (add-after 'install 'delete-dead-links + (add-after 'install 'delete-unused-files (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) - (delete-file (string-append out "/lib/libprotobuf.so")) - (delete-file (string-append out "/lib/libusb-1.0.so")) - #t)))))) + (delete-file-recursively (string-append out "/include"))) + #t))))) (home-page "https://web.getmonero.org/") (synopsis "Command-line interface to the Monero currency") (description @@ -645,29 +727,24 @@ the Monero command line client and daemon.") (define-public monero-gui (package (name "monero-gui") - (version "0.15.0.4") + (version "0.17.1.1") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/monero-project/monero-gui.git") + (url "https://github.com/monero-project/monero-gui") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 - "12m5fgnxkr11q2arx1m5ccpxqm5ljcvm6l547dwqn297zs5jim4z")))) + (base32 "0aqhp4rmqsgwjb875kgh6qwz0wyyiag1fksyic9cnhgg5j5y95nx")))) (build-system qt-build-system) (native-inputs - `(("pkg-config" ,pkg-config) - ("qttools" ,qttools))) + `(,@(package-native-inputs monero) + ("monero-source" ,(package-source monero)))) (inputs - `(("boost" ,boost) - ("hidapi" ,hidapi) - ("libsodium" ,libsodium) - ("libunwind" ,libunwind) - ("libusb" ,libusb) - ("openssl" ,openssl) - ("protobuf" ,protobuf) + `(,@(package-inputs monero) + ("libgcrypt" ,libgcrypt) + ("monero" ,monero) ("qtbase" ,qtbase) ("qtdeclarative" ,qtdeclarative) ("qtgraphicaleffects" ,qtgraphicaleffects) @@ -676,69 +753,54 @@ the Monero command line client and daemon.") ("qtquickcontrols" ,qtquickcontrols) ("qtquickcontrols2",qtquickcontrols2) ("qtsvg" ,qtsvg) - ("qtxmlpatterns" ,qtxmlpatterns) - ("unbound" ,unbound))) - (propagated-inputs - `(("monero" ,monero))) + ("qtxmlpatterns" ,qtxmlpatterns))) (arguments `(#:tests? #f ; No tests + #:configure-flags + (list "-DARCH=default" + "-DENABLE_PASS_STRENGTH_METER=ON" + (string-append "-DReadline_ROOT_DIR=" + (assoc-ref %build-inputs "readline")) + "-DCMAKE_BUILD_TYPE=Release") #:phases (modify-phases %standard-phases - (add-after 'unpack 'fix-makefile-vars + (add-after 'unpack 'extract-monero-sources + ;; Some of the monero package source code is required + ;; to build the GUI. + (lambda* (#:key inputs #:allow-other-keys) + (invoke "tar" "-xv" "--strip-components=1" + "-C" "monero" + "-f" (assoc-ref inputs "monero-source")) + #t)) + (add-after 'extract-monero-sources 'fix-build (lambda _ + (substitute* "monero/src/version.cpp.in" + (("@VERSION_IS_RELEASE@") + "false")) + (substitute* "src/version.js.in" + (("@VERSION_TAG_GUI@") + ,version)) (substitute* "src/zxcvbn-c/makefile" (("\\?=") "=")) #t)) - (add-after 'fix-makefile-vars 'fix-paths - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((boost (assoc-ref inputs "boost")) - (monero (assoc-ref inputs "monero")) - (openssl (assoc-ref inputs "openssl")) - (qttools (assoc-ref inputs "qttools")) - (out (assoc-ref outputs "out"))) - (substitute* "monero-wallet-gui.pro" - (("-L/usr/local/lib") - "") - (("-L/usr/local/opt/openssl/lib") - (string-append "-L" openssl "/lib")) - (("-L/usr/local/opt/boost/lib") - (string-append "-L" boost "/lib")) - (("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease") - (string-append qttools "/bin/lrelease")) - (("\\$\\$\\[QT_INSTALL_BINS\\]/lupdate") - (string-append qttools "/bin/lupdate"))) - (substitute* "deployment.pri" - (("/opt/\\$\\$\\{TARGET\\}/bin") - (string-append out "/bin"))) - (substitute* "src/daemon/DaemonManager.cpp" - (("QApplication::applicationDirPath\\(\\) \\+ \"/monerod") - (string-append "\"" monero "/bin/monerod"))) - #t))) - (add-after 'fix-paths 'make-qt-deterministic - (lambda _ - (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1") - #t)) - (add-after 'make-qt-deterministic 'fix-version + (add-before 'configure 'generate-zxcvbn-c-header (lambda _ - (substitute* "build.sh" - (("echo .*> version.js") - "")) - (with-output-to-file "version.js" - (lambda _ - (format #t - "var GUI_VERSION = \"~a\"~@ - var GUI_MONERO_VERSION = \"~a\"~%" - ,version - ,(package-version monero)))) + (invoke "make" "-C" "src/zxcvbn-c" "dict-src.h"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) + (mkdir-p bin) + (install-file "../build/bin/monero-wallet-gui" bin)) #t)) - (replace 'configure - (lambda _ - (mkdir-p "build") - (chdir "build") - (invoke "qmake" "../monero-wallet-gui.pro" "CONFIG+=release"))) - (add-before 'build 'build-zxcvbn-c - (lambda _ - (invoke "make" "-C" "../src/zxcvbn-c")))))) + (add-after 'qt-wrap 'install-monerod-link + ;; The monerod program must be available so that monero-wallet-gui + ;; can start a Monero daemon if necessary. + (lambda* (#:key inputs outputs #:allow-other-keys) + (symlink (string-append (assoc-ref inputs "monero") + "/bin/monerod") + (string-append (assoc-ref outputs "out") + "/bin/monerod")) + #t))))) (home-page "https://web.getmonero.org/") (synopsis "Graphical user interface for the Monero currency") (description @@ -754,7 +816,7 @@ the Monero GUI client.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/romanz/trezor-agent.git") + (url "https://github.com/romanz/trezor-agent") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 @@ -851,31 +913,20 @@ Ledger Blue/Nano S.") (define-public python-trezor (package (name "python-trezor") - (version "0.11.3") + (version "0.12.1") (source (origin (method url-fetch) (uri (pypi-uri "trezor" version)) (sha256 - (base32 - "0211m027vlvyqy83kwbjjjxalb04xgf1klv0h0y0f0yhj07516n7")))) + (base32 "1w19m9lws55k9sjhras47hpfpqwq1jm5vy135nj65yhkblygqg19")))) (build-system python-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - ;; Default tests run device-specific tests which fail, only run specific tests. - (replace 'check - (lambda* (#:key inputs outputs #:allow-other-keys) - ;; Delete tests that require network access. - (delete-file "trezorlib/tests/unit_tests/test_tx_api.py") - (invoke "python" "-m" "pytest" "--pyarg" "trezorlib.tests.unit_tests")))))) (propagated-inputs `(("python-click" ,python-click) ("python-construct" ,python-construct) ("python-ecdsa" ,python-ecdsa) ("python-libusb1" ,python-libusb1) ("python-mnemonic" ,python-mnemonic) - ("python-pyblake2" ,python-pyblake2) ("python-requests" ,python-requests) ("python-typing-extensions" ,python-typing-extensions))) (native-inputs @@ -942,7 +993,7 @@ the KeepKey Hardware Wallet.") (inputs `(("python-ledgerblue" ,python-ledgerblue) ("python-trezor-agent" ,python-trezor-agent))) - (home-page "http://github.com/romanz/trezor-agent") + (home-page "https://github.com/romanz/trezor-agent") (synopsis "Ledger as hardware SSH/GPG agent") (description "This package allows using Ledger as hardware SSH/GPG agent. @@ -1001,7 +1052,7 @@ agent.") (inputs `(("python-keepkey" ,python-keepkey) ("python-trezor-agent" ,python-trezor-agent))) - (home-page "http://github.com/romanz/trezor-agent") + (home-page "https://github.com/romanz/trezor-agent") (synopsis "KeepKey as hardware SSH/GPG agent") (description "This package allows using KeepKey as a hardware SSH/GPG agent.") @@ -1010,14 +1061,13 @@ agent.") (define-public python-stdnum (package (name "python-stdnum") - (version "1.13") + (version "1.14") (source (origin (method url-fetch) (uri (pypi-uri "python-stdnum" version)) (sha256 - (base32 - "0q4128rjdgavywhzlm2gz2n5ybc9b9sxs81g50dvxf5q7z9q63qj")))) + (base32 "070vd9zgvq0jchs4xc4j1h4r1l1lg4wwb8xs3p25k8c2xjw94fpx")))) (build-system python-build-system) (arguments '(#:phases (modify-phases %standard-phases @@ -1026,10 +1076,8 @@ agent.") (invoke "nosetests")))))) (native-inputs `(("python-nose" ,python-nose))) - (home-page - "https://arthurdejong.org/python-stdnum/") - (synopsis - "Python module to handle standardized number and code formats") + (home-page "https://arthurdejong.org/python-stdnum/") + (synopsis "Python module to handle standardized number and code formats") (description "This is a Python library that aims to provide functions to handle, parse and validate standard numbers. @@ -1038,7 +1086,7 @@ amongst which a great number of VAT and other tax numbers, personal identity and company identification codes, international standard numbers (ISBN, IBAN, EAN, etc.) and various other formats. -The module also inclused implementations of the Verhoeff, +The module also includes implementations of the Verhoeff, Luhn and family of ISO/IEC 7064 check digit algorithms. ") (license license:lgpl2.1+))) @@ -1048,26 +1096,18 @@ Luhn and family of ISO/IEC 7064 check digit algorithms. ") (define-public python-duniterpy (package (name "python-duniterpy") - (version "0.56.0") + (version "0.60.0") (source (origin (method url-fetch) (uri (pypi-uri "duniterpy" version)) (sha256 - (base32 "1h8d8cnr6k5sw4cqy8r82zy4ldzpvn4nlk2221lz2haqq7xm4s5z")))) + (base32 "0djn6ykmqbp8l2xbg6z8r7rkz9ijgygp2pr0gc6i7dsrlsqmjh32")))) (build-system python-build-system) (arguments - ;; FIXME: Tests fail with: "ModuleNotFoundError: No module named - ;; 'tests'". Not sure how to handle this. - `(#:tests? #f - #:phases - (modify-phases %standard-phases - ;; "setup.py" tries to open missing "requirements.txt". - (add-after 'unpack 'ignore-missing-file - (lambda _ - (substitute* "setup.py" - (("open\\('requirements\\.txt'\\)") "[]")) - #t))))) + ;; FIXME: Tests fail with: "TypeError: block_uid() missing 1 required + ;; positional argument: 'value'". + `(#:tests? #f)) (propagated-inputs `(("aiohttp" ,python-aiohttp) ("attrs" ,python-attrs) @@ -1108,7 +1148,6 @@ main features are: (inputs `(("click" ,python-click) ("duniterpy" ,python-duniterpy) - ("ipaddress" ,python-ipaddress) ("pynacl" ,python-pynacl) ("tabulate" ,python-tabulate) ("texttable" ,python-texttable))) @@ -1164,19 +1203,46 @@ information.") (home-page "https://grisbi.org") (license license:gpl2+))) +(define-public trezord-udev-rules + (let ((commit "bff7fdfe436c727982cc553bdfb29a9021b423b0") + (revision "0")) + (package + (name "trezord-udev-rules") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/trezor/trezor-common") + (commit commit))) + (sha256 + (base32 + "14mrirrn68if7ja6qdk9qlxs1hv0f21vrxy5ncnms0gx9iwakp2l")) + (file-name (git-file-name name version)))) + (build-system copy-build-system) + (arguments + '(#:install-plan + '(("./udev/51-trezor.rules" "lib/udev/rules.d/")))) + (home-page "https://github.com/trezor/trezor-common") + (synopsis "Udev rules for trezord") + (description + "This contains the udev rules for trezord. This will let a user run +trezord as a regular user instead of needing to it run as root.") + (license license:lgpl3+)))) + (define-public trezord (package (name "trezord") - (version "2.0.17") + (version "2.0.29") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/trezor/trezord-go.git") + (url "https://github.com/trezor/trezord-go") (commit (string-append "v" version)))) (sha256 (base32 - "0nqzpq0i3crh0i4r1cppja5sn3rwi1fv9afxzwzv63096x5l30a7")) + "1ks1fa0027s3xp0z6qp0dxmayvrb4dwwscfhbx7da0khp153f2cp")) (file-name (git-file-name name version)))) (build-system go-build-system) (arguments @@ -1189,9 +1255,8 @@ Trezor wallet.") (define-public bitcoin-abc (package - (inherit bitcoin-core) (name "bitcoin-abc") - (version "0.20.7") + (version "0.21.12") (source (origin (method url-fetch) (uri (string-append "https://download.bitcoinabc.org/" @@ -1199,25 +1264,45 @@ Trezor wallet.") version ".tar.gz")) (sha256 (base32 - "0py5ilfi4r8qh5r9637vwch27sqrrn0dg9rz8bccnj3lp2xpzw27")))) + "1amzwy3gpl8ai90dsy7g0z51qq8vxfzbf642wn4bfynb8jmw3kx5")))) + (build-system cmake-build-system) (native-inputs - `(("autoconf" ,autoconf) - ("automake" ,automake) - ("libtool" ,libtool) - ("pkg-config" ,pkg-config) + `(("pkg-config" ,pkg-config) ("python" ,python) ; for the tests ("util-linux" ,util-linux) ; provides the hexdump command for tests ("qttools" ,qttools))) (inputs `(("bdb" ,bdb-5.3) ("boost" ,boost) + ("jemalloc" ,jemalloc) ("libevent" ,libevent) ("miniupnpc" ,miniupnpc) ("openssl" ,openssl) ("protobuf" ,protobuf) ("qrencode" ,qrencode) ("qtbase" ,qtbase) + ("zeromq" ,zeromq) ("zlib" ,zlib))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'configure 'make-qt-deterministic + (lambda _ + ;; Make Qt deterministic. + (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1") + #t)) + (add-before 'check 'set-home + (lambda _ + (setenv "HOME" (getenv "TMPDIR")) ; tests write to $HOME + #t)) + (add-after 'check 'check-functional + (lambda _ + (invoke + "python3" "./test/functional/test_runner.py" + (string-append "--jobs=" (number->string (parallel-job-count))) + ;; TODO: find why the abc-miner-fund test fails. + "--exclude=abc-miner-fund") + #t))))) (home-page "https://www.bitcoinabc.org/") (synopsis "Bitcoin ABC peer-to-peer full node for the Bitcoin Cash protocol") (description @@ -1231,7 +1316,8 @@ As a fork it implemented changes lowering the time between blocks and now offers confimations after less than 5 seconds and have significantly lower fees that BTC. Bitcoin ABC is the reference implementation of the Bitcoin Cash protocol. This package provides the Bitcoin Cash command line client and -a client based on Qt. This is a fork of Bitcoin Core."))) +a client based on Qt. This is a fork of Bitcoin Core.") + (license license:expat))) (define-public libofx (package @@ -1330,16 +1416,16 @@ entity management.") (define-public bitcoin-unlimited (package (name "bitcoin-unlimited") - (version "1.7.0.0") + (version "1.9.0.1") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/BitcoinUnlimited/BitcoinUnlimited.git") - (commit (string-append "bucash" version)))) + (url "https://github.com/BitcoinUnlimited/BitcoinUnlimited") + (commit (string-append "BCHunlimited" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "05rcd73mg2fb2zb6b1imzspck6jhcy3xymrr7n24kwjrzmvihdpx")))) + (base32 "1pan24g3d5csa004d7zvlizj4mv58ly5i579341isp944phl3g5v")))) (build-system gnu-build-system) (native-inputs `(("autoconf" ,autoconf) @@ -1374,20 +1460,19 @@ entity management.") "/bin/lrelease") (string-append "ac_cv_path_LUPDATE=" (assoc-ref %build-inputs "qttools") - "/bin/lupdate")) + "/bin/lupdate") + "--disable-static") #:phases (modify-phases %standard-phases (add-after 'unpack 'fix-tests (lambda _ - ;; TODO: Find why utilprocess_tests never ends. Disable for now. - (substitute* "src/test/utilprocess_tests.cpp" - (("#if \\(BOOST_OS_LINUX && \\(BOOST_VERSION >= 106500\\)\\)") - "#if 0")) - #t)) - (add-before 'configure 'make-qt-deterministic - (lambda _ - ;; Make Qt deterministic. - (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1") + ;; Disable utilprocess_tests because it never ends. + ;; It looks like it tries to start /bin/sleep and waits until it + ;; is in the list of running processes, but /bin/sleep doesn't + ;; exist. + (substitute* "src/Makefile.test.include" + (("test/utilprocess_tests.cpp") + "")) #t)) (add-before 'check 'set-home (lambda _ @@ -1401,6 +1486,111 @@ electronic cash system. This package provides a command line client and a Qt GUI.") (license license:expat))) +(define-public fulcrum + (package + (name "fulcrum") + (version "1.1.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://gitlab.com/FloweeTheHub/fulcrum/-/archive/v" + version "/fulcrum-v" version ".tar.gz")) + (sha256 + (base32 "04w5gw02d39caa8a0l6wkn87kc43zzad2prqsyrcq97vlbkdx6x6")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; Call qmake instead of configure to create a Makefile. + (replace 'configure + (lambda _ + (invoke + "qmake" + (string-append "PREFIX=" %output) + "features=")))))) + (native-inputs + `(("qttools" ,qttools))) + (inputs + `(("python" ,python) + ("qtbase" ,qtbase) + ("rocksdb" ,rocksdb) + ("zlib" ,zlib))) + (home-page "https://gitlab.com/FloweeTheHub/fulcrum/") + (synopsis "Fast and nimble SPV server for Bitcoin Cash") + (description + "Flowee Fulcrum is a server that is the back-end for @acronym{SPV, +Simplified Payment Verification} wallets, it provides the full API for those +walets in a fast and small server. The full data is stored in a full node, +like Flowee the Hub, which Fulcrum connects to over RPC.") + (license license:gpl3+))) + +(define-public flowee + (package + (name "flowee") + (version "2020.04.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://gitlab.com/FloweeTheHub/thehub/-/archive/" + version "/thehub-" version ".tar.gz")) + (sha256 + (base32 "1vwvaxm3b71pfx8l4rrv06wqks6xdf2333w856b36s1bzvj53rhc")))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags '("-Dbuild_tests=ON" "-Denable_gui=OFF") + #:phases + (modify-phases %standard-phases + (add-before 'configure 'make-qt-deterministic + (lambda _ + ;; Make Qt deterministic. + (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1") + #t)) + (add-before 'configure 'disable-black-box + ;; the black-box testing runs full hubs and lets them interact. + ;; this is more fragile and a slow machine, or low memory machine, may + ;; make the tests timeout and fail. We just disable them here. + (lambda _ + (substitute* "testing/CMakeLists.txt" + (("test_api") "")) + (substitute* "testing/CMakeLists.txt" + (("add_subdirectory\\(api\\)") "")) + #t)) + (add-after 'configure 'set-build-info + ;; Their genbuild.sh to generate a build.h fails in guix (no .git dir) . + ;; Its purpose is to write the tag name in the build.h file. We do that + ;; here instead. + (lambda _ + (with-output-to-file "include/build.h" + (lambda _ + (display + (string-append "#define BUILD_DESC " "\"", version "\"")))))) + (add-before 'check 'set-home + (lambda _ + (setenv "HOME" (getenv "TMPDIR")) ; tests write to $HOME + #t)) + (replace 'check + (lambda _ + (invoke "make" "check" "-C" "testing")))))) + (inputs + `(("boost" ,boost) + ("gmp" ,gmp) + ("libevent" ,libevent) + ("miniupnpc" ,miniupnpc) + ("openssl" ,openssl) + ("qtbase" ,qtbase))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("qttools" ,qttools) + ("util-linux" ,util-linux))) ; provides the hexdump command for tests + (home-page "https://flowee.org") + (synopsis "Flowee infrastructure tools and services") + (description + "Flowee packages all tier-1 applications and services from the Flowee group. +This includes components like The Hub and Indexer which and various others +that allows you to run services and through them access the Bitcoin Cash networks.") + (license license:gpl3+))) + + (define-public beancount (package (name "beancount") @@ -1457,6 +1647,8 @@ generate a variety of reports from them, and provides a web interface.") (lambda _ (chdir "editors/emacs") #t))))) + (inputs '()) + (native-inputs '()) (synopsis "Emacs mode for beancount") (description "Emacs-beancount is an Emacs mode for the Beancount accounting tool.")))