aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/finance.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/finance.scm')
-rw-r--r--gnu/packages/finance.scm185
1 files changed, 103 insertions, 82 deletions
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 03a8285fc1..550354b650 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -11,6 +11,7 @@
;;; Copyright © 2018 Adriano Peluso <catonano@gmail.com>
;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -39,6 +40,7 @@
#:use-module (gnu packages base)
#:use-module (gnu packages boost)
#:use-module (gnu packages check)
+ #:use-module (gnu packages compression)
#:use-module (gnu packages crypto)
#:use-module (gnu packages databases)
#:use-module (gnu packages documentation)
@@ -68,6 +70,7 @@
#:use-module (gnu packages textutils)
#: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))
@@ -428,49 +431,59 @@ other machines/servers. Electroncash does not download the Bitcoin Cash blockch
(define-public monero
;; This package bundles easylogging++ and lmdb.
- ;; The bundled easylogging++ is modified, and the changes will not be upstreamed.
+ ;; The bundled easylogging++ is modified, and the changes will not be
+ ;; upstreamed.
;; The devs deem the lmdb driver too critical a consenus component, to use
;; the system's dynamically linked library.
(package
(name "monero")
- (version "0.12.3.0")
+ (version "0.14.1.0")
(source
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/monero-project/monero")
- (commit (string-append "v" version))))
+ (url "https://github.com/monero-project/monero.git")
+ (commit (string-append "v" version))
+ (recursive? #t)))
(file-name (git-file-name name version))
(patches (search-patches "monero-use-system-miniupnpc.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Delete bundled dependencies.
+ (for-each
+ delete-file-recursively
+ '("external/miniupnp" "external/rapidjson"
+ "external/unbound"))
+ #t))
(sha256
(base32
- "14db9kgjm2ha93c2x5fjdw01xaqshn756qr3x2cnzyyjh7caz5qd"))))
+ "1asa197fad81jfv12qgaa7y7pdr1r1pda96m9pvivkh4v30cx0nh"))))
(build-system cmake-build-system)
(native-inputs
`(("doxygen" ,doxygen)
- ("googletest" ,googletest)
+ ("git" ,git)
("graphviz" ,graphviz)
- ("pkg-config" ,pkg-config)))
+ ("pkg-config" ,pkg-config)
+ ("qttools" ,qttools)))
(inputs
- `(("bind" ,isc-bind)
- ("boost" ,boost)
- ("zeromq" ,zeromq)
+ `(("boost" ,boost)
("cppzmq" ,cppzmq)
("expat" ,expat)
- ("libsodium" ,libsodium)
+ ("hidapi" ,hidapi)
("libunwind" ,libunwind)
- ("lmdb" ,lmdb)
- ("miniupnpc" ,monero-miniupnpc)
+ ("libsodium" ,libsodium)
+ ("miniupnpc" ,miniupnpc)
("openssl" ,openssl)
("rapidjson" ,rapidjson)
- ("unbound" ,unbound)))
+ ("readline" ,readline)
+ ("unbound" ,unbound)
+ ("xz" ,xz)
+ ("zeromq" ,zeromq)))
(arguments
`(#:out-of-source? #t
- #:build-type "release"
- #:configure-flags '("-DBUILD_TESTS=ON"
- ,@(if (string=? "aarch64-linux" (%current-system))
- '("-DARCH=armv8-a")
- '())
+ #:configure-flags '("-DARCH=default"
+ "-DBUILD_TESTS=ON"
"-DBUILD_GUI_DEPS=ON")
#:phases
(modify-phases %standard-phases
@@ -479,24 +492,18 @@ other machines/servers. Electroncash does not download the Bitcoin Cash blockch
(lambda _
(setenv "HOME" (getcwd))
#t))
- (add-after 'set-home 'fix-wallet-path-for-unit-tests
- (lambda _
- (substitute* "tests/unit_tests/serialization.cpp"
- (("\\.\\./\\.\\./\\.\\./\\.\\./") "../../"))
- #t))
- (add-after 'fix-wallet-path-for-unit-tests 'change-log-path
+ (add-after 'set-home 'change-log-path
(lambda _
(substitute* "contrib/epee/src/mlog.cpp"
(("epee::string_tools::get_current_module_folder\\(\\)")
- "\".bitmonero\""))
- (substitute* "contrib/epee/src/mlog.cpp"
- (("return \\(") "return ((std::string(getenv(\"HOME\"))) / "))
+ "\".bitmonero\"")
+ (("return \\(")
+ "return ((std::string(getenv(\"HOME\"))) / "))
#t))
+ ;; Only try tests that don't need access to network or system
(replace 'check
(lambda _
- (invoke "make" "ARGS=-E 'unit_tests|libwallet_api_tests'"
- "test")))
- ;; The excluded unit tests need network access
+ (invoke "make" "ARGS=-R 'hash|core_tests'" "test")))
(add-after 'check 'unit-tests
(lambda _
(let ((excluded-unit-tests
@@ -506,58 +513,69 @@ other machines/servers. Electroncash does not download the Bitcoin Cash blockch
"DNSResolver.IPv4Success"
"DNSResolver.DNSSECSuccess"
"DNSResolver.DNSSECFailure"
- "DNSResolver.GetTXTRecord")
+ "DNSResolver.GetTXTRecord"
+ ;; TODO: Find why portability_wallet test fails
+ ;; Maybe the Boost version used to create the test
+ ;; wallet and the current Boost version are not
+ ;; completely compatible?
+ "Serialization.portability_wallet"
+ "is_hdd.linux_os_root")
":")))
(invoke "tests/unit_tests/unit_tests"
(string-append "--gtest_filter=-"
- excluded-unit-tests)))))
- (add-after 'install 'install-blockchain-import-export
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bin (string-append out "/bin")))
- (install-file "bin/monero-blockchain-import" bin)
- (install-file "bin/monero-blockchain-export" bin)))))))
+ excluded-unit-tests))))))))
(home-page "https://getmonero.org/")
(synopsis "Command-line interface to the Monero currency")
(description
- "Monero is a secure, private, untraceable currency. This package provides the
-Monero command line client and daemon.")
+ "Monero is a secure, private, untraceable currency. This package provides
+the Monero command line client and daemon.")
(license license:bsd-3)))
(define-public monero-gui
(package
(name "monero-gui")
- (version "0.12.2.0")
+ (version "0.14.1.0")
(source
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/monero-project/monero-gui")
+ (url "https://github.com/monero-project/monero-gui.git")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
- "1cnrkwh7kp64lnzz1xfmkf1mhsgm5gls292gpqai3jr8jydpkahl"))))
+ "0ilx47771faygf97wilm64xnqxgxa3b43q0g9v014npk0qj8pc31"))))
(build-system gnu-build-system)
(native-inputs
- `(("doxygen" ,doxygen)
- ("graphviz" ,graphviz)
- ("pkg-config" ,pkg-config)
+ `(("pkg-config" ,pkg-config)
("qttools" ,qttools)))
(inputs
`(("boost" ,boost)
+ ("hidapi" ,hidapi)
("libunwind" ,libunwind)
+ ("libsodium" ,libsodium)
("openssl" ,openssl)
("qtbase" ,qtbase)
("qtdeclarative" ,qtdeclarative)
("qtgraphicaleffects" ,qtgraphicaleffects)
+ ("qtlocation" ,qtlocation)
+ ("qtmultimedia" ,qtmultimedia)
("qtquickcontrols" ,qtquickcontrols)
- ("readline" ,readline)
+ ("qtquickcontrols2",qtquickcontrols2)
+ ("qtsvg" ,qtsvg)
+ ("qtwebchannel" ,qtwebchannel)
+ ("qtx11extras" ,qtx11extras)
+ ("qtxmlpatterns" ,qtxmlpatterns)
("unbound" ,unbound)))
(propagated-inputs
`(("monero" ,monero)))
(arguments
- `(#:phases
+ `(#:modules ((guix build gnu-build-system)
+ (guix build qt-utils)
+ (guix build utils))
+ #:imported-modules (,@%gnu-build-system-modules
+ (guix build qt-utils))
+ #:phases
(modify-phases %standard-phases
(delete 'configure)
(delete 'check)
@@ -569,32 +587,45 @@ Monero command line client and daemon.")
(add-after 'fix-makefile-vars 'fix-library-paths
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "monero-wallet-gui.pro"
- (("-L/usr/local/lib") "")
+ (("-L/usr/local/lib")
+ "")
(("-L/usr/local/opt/openssl/lib")
- (string-append "-L"
- (assoc-ref inputs "openssl")
- "/lib"))
+ (string-append "-L" (assoc-ref inputs "openssl") "/lib"))
(("-L/usr/local/opt/boost/lib")
- (string-append "-L"
- (assoc-ref inputs "boost")
- "/lib")))
+ (string-append "-L" (assoc-ref inputs "boost") "/lib")))
#t))
(add-after 'fix-library-paths 'fix-monerod-path
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "src/daemon/DaemonManager.cpp"
(("QApplication::applicationDirPath\\(\\) \\+ \"/monerod")
- (string-append "\""(assoc-ref inputs "monero")
+ (string-append "\"" (assoc-ref inputs "monero")
"/bin/monerod")))
#t))
(add-after 'fix-monerod-path 'fix-qt-paths
(lambda* (#:key inputs #:allow-other-keys)
- (let* ((qttools (assoc-ref inputs "qttools"))
- (lrelease (string-append qttools "/bin/lrelease"))
- (lupdate (string-append qttools "/bin/lupdate")))
- (substitute* "monero-wallet-gui.pro"
- (("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease") lrelease)
- (("\\$\\$\\[QT_INSTALL_BINS\\]/lupdate") lupdate))
- #t)))
+ (substitute* "monero-wallet-gui.pro"
+ (("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease")
+ (string-append (assoc-ref inputs "qttools") "/bin/lrelease"))
+ (("\\$\\$\\[QT_INSTALL_BINS\\]/lupdate")
+ (string-append (assoc-ref inputs "qttools") "/bin/lupdate")))
+ #t))
+ (add-after 'fix-qt-paths 'make-qt-deterministic
+ (lambda _
+ (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")
+ #t))
+ (add-after 'make-qt-deterministic 'fix-version
+ (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))))
+ #t))
(replace 'build
(lambda _
(invoke "./build.sh")))
@@ -606,28 +637,18 @@ Monero command line client and daemon.")
#t))
(add-before 'install 'change-dir
(lambda _
- (chdir "build")))
- (add-after 'install 'wrap-executable
- (lambda* (#:key inputs outputs #:allow-other-keys)
+ (chdir "build")
+ #t))
+ (add-after 'install 'wrap-program
+ (lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
- (wrap-program (string-append out "/bin/monero-wallet-gui")
- `("QT_PLUGIN_PATH" ":" prefix
- ,(map (lambda (label)
- (string-append (assoc-ref inputs label)
- "/lib/qt5/plugins"))
- '("qtbase" "qtdeclarative")))
- `("QML2_IMPORT_PATH" ":" prefix
- ,(map (lambda (label)
- (string-append (assoc-ref inputs label)
- "/lib/qt5/qml"))
- '("qtdeclarative" "qtgraphicaleffects"
- "qtquickcontrols"))))
- #t))))))
+ (wrap-qt-program out "monero-wallet-gui"))
+ #t)))))
(home-page "https://getmonero.org/")
(synopsis "Graphical user interface for the Monero currency")
(description
- "Monero is a secure, private, untraceable currency. This package provides the
-Monero GUI client.")
+ "Monero is a secure, private, untraceable currency. This package provides
+the Monero GUI client.")
(license license:bsd-3)))
(define-public monero-core