gnu: Add hledger.
[jackhill/guix/guix.git] / gnu / packages / finance.scm
index 201ff3d..c0b6400 100644 (file)
@@ -6,7 +6,7 @@
 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
 ;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
 ;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com>
-;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2018 Adriano Peluso <catonano@gmail.com>
 ;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
@@ -19,6 +19,8 @@
 ;;; Copyright © 2020 Christopher Lemmer Webber <cwebber@dustycloud.org>
 ;;; Copyright © 2020 Tom Zander <tomz@freedommail.ch>
 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2020 Carlo Holl <carloholl@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -44,6 +46,7 @@
   #: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)
   #: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)
   #: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))
     (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)
        ("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
@@ -167,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
@@ -198,16 +262,16 @@ and dynamically with report tools based on filtering and graphical charts.")
 (define-public ledger
   (package
     (name "ledger")
-    (version "3.2.0")
+    (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 "1l5c9jf2wnly6ncm9civ8i7v47xld15g1y7wpl0hqwgbfyffwjci"))))
+        (base32 "0x6jxwss3wwzbzlwmnwb8yzjk8f9wfawif4f1b74z2qg6hc4r7f6"))))
     (build-system cmake-build-system)
     (arguments
      `(#:modules (,@%cmake-build-system-modules
@@ -301,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
@@ -375,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
@@ -453,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
@@ -473,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)
@@ -506,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))
@@ -514,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")
@@ -545,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))
@@ -565,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)
@@ -597,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
@@ -643,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
@@ -664,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)
@@ -695,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
@@ -773,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
@@ -870,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
@@ -961,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.
 
@@ -1020,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.")
@@ -1029,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
@@ -1045,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.
@@ -1057,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+)))
 
@@ -1067,26 +1096,18 @@ Luhn and family of ISO/IEC 7064 check digit algorithms. ")
 (define-public python-duniterpy
   (package
     (name "python-duniterpy")
-    (version "0.57.0")
+    (version "0.60.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "duniterpy" version))
        (sha256
-        (base32 "0rw2c7r9gcqhymp82gbk1ky45zqbypsi2q5x4vdwjc6g00kh7h6l"))))
+        (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)
@@ -1127,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)))
@@ -1193,7 +1213,7 @@ information.")
          (origin
            (method git-fetch)
            (uri (git-reference
-                 (url "https://github.com/trezor/trezor-common.git")
+                 (url "https://github.com/trezor/trezor-common")
                  (commit commit)))
            (sha256
             (base32
@@ -1218,7 +1238,7 @@ trezord as a regular user instead of needing to it run as root.")
      (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
@@ -1235,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/"
@@ -1245,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
@@ -1277,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
@@ -1376,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)
@@ -1420,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 _
@@ -1450,14 +1489,14 @@ a Qt GUI.")
 (define-public fulcrum
   (package
     (name "fulcrum")
-    (version "1.1.0")
+    (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 "1xywwgsdhkiblv6la0pfhvn2s9q8vnz6pjg35647rlwzi6ybf0ak"))))
+        (base32 "04w5gw02d39caa8a0l6wkn87kc43zzad2prqsyrcq97vlbkdx6x6"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
@@ -1488,14 +1527,14 @@ like Flowee the Hub, which Fulcrum connects to over RPC.")
 (define-public flowee
   (package
     (name "flowee")
-    (version "2020.03.2")
+    (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 "1m8wfwxljvd2gqpfj1w37xky4isa3h9a7g57cnf3l4r90r4bxj47"))))
+         (base32 "1vwvaxm3b71pfx8l4rrv06wqks6xdf2333w856b36s1bzvj53rhc"))))
     (build-system cmake-build-system)
     (arguments
      `(#:configure-flags '("-Dbuild_tests=ON" "-Denable_gui=OFF")
@@ -1513,6 +1552,8 @@ like Flowee the Hub, which Fulcrum connects to over RPC.")
             (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) .