From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqjsQ-0006Iv-5q for guix-patches@gnu.org; Sat, 09 Sep 2017 13:49:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dqjsN-00073M-3P for guix-patches@gnu.org; Sat, 09 Sep 2017 13:49:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:49119) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dqjsM-00073G-Vc for guix-patches@gnu.org; Sat, 09 Sep 2017 13:49:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dqjsM-0003Bq-Oi for guix-patches@gnu.org; Sat, 09 Sep 2017 13:49:02 -0400 Subject: [bug#28401] [PATCH 1/2] gnu: Add monero. References: <87o9qjesvl.fsf@foradis.org> In-Reply-To: <87o9qjesvl.fsf@foradis.org> Resent-Message-ID: From: Theodoros Foradis Date: Sat, 9 Sep 2017 20:47:34 +0300 Message-Id: <20170909174735.7562-1-theodoros@foradis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 28401@debbugs.gnu.org * gnu/packages/finance.scm (monero): New variable. --- gnu/packages/finance.scm | 108 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index 6d6844fa7..6f589a76c 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2016 Alex Griffin ;;; Copyright © 2016 Hartmut Goebel ;;; Copyright © 2017 Carlo Zancanaro +;;; Copyright © 2017 Theodoros Foradis ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,11 +30,16 @@ #:use-module (guix build-system python) #:use-module (gnu packages base) #:use-module (gnu packages boost) + #:use-module (gnu packages check) #:use-module (gnu packages databases) + #:use-module (gnu packages documentation) + #:use-module (gnu packages dns) #:use-module (gnu packages emacs) + #:use-module (gnu packages graphviz) #:use-module (gnu packages groff) #:use-module (gnu packages libedit) #:use-module (gnu packages libevent) + #:use-module (gnu packages libunwind) #:use-module (gnu packages linux) #:use-module (gnu packages multiprecision) #:use-module (gnu packages pkg-config) @@ -44,6 +50,8 @@ #:use-module (gnu packages textutils) #:use-module (gnu packages tls) #:use-module (gnu packages upnp) + #:use-module (gnu packages web) + #:use-module (gnu packages xml) #:use-module (gnu packages gnuzilla)) (define-public bitcoin-core @@ -292,3 +300,103 @@ protocol. It supports Simple Payment Verification (SPV) and deterministic key generation from a seed. Your secret keys are encrypted and are never sent to other machines/servers. Electrum does not download the Bitcoin blockchain.") (license license:expat))) + +(define-public monero + ;; This package bundles easylogging++ and lmdb. + ;; 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.11.0.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/monero-project/monero/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Delete bundled dependencies. + (for-each + delete-file-recursively + '("external/miniupnpc" "external/rapidjson" + "external/unbound")) + #t)) + (sha256 + (base32 + "083w40a553c0r3i18020jcrv5s0b64vx3d8xrn9nwkb2237ighlk")))) + (build-system cmake-build-system) + (native-inputs + `(("doxygen" ,doxygen) + ("googletest" ,googletest) + ("graphviz" ,graphviz) + ("pkg-config" ,pkg-config))) + (inputs + `(("bind" ,isc-bind) + ("boost" ,boost) + ("expat" ,expat) + ("libunwind" ,libunwind) + ("lmdb" ,lmdb) + ("miniupnpc" ,miniupnpc) + ("openssl" ,openssl) + ("rapidjson" ,rapidjson) + ("unbound" ,unbound))) + (arguments + `(#:out-of-source? #t + #:configure-flags '("-DBUILD_TESTS=ON" + "-DBUILD_GUI_DEPS=ON") + #:phases + (modify-phases %standard-phases + ;; tests/core_tests need a valid HOME + (add-before 'configure 'set-home + (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 + (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\"))) / ")) + #t)) + (replace 'check + (lambda _ + (zero? + (system* "make" "ARGS=-E 'unit_tests|libwallet_api_tests'" + "test")))) + ;; The excluded unit tests need network access + (add-after 'check 'unit-tests + (lambda _ + (let ((excluded-unit-tests + (string-join + '("AddressFromURL.Success" + "AddressFromURL.Failure" + "DNSResolver.IPv4Success" + "DNSResolver.DNSSECSuccess" + "DNSResolver.DNSSECFailure" + "DNSResolver.GetTXTRecord") + ":"))) + (zero? + (system* "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))))))) + (home-page "https://getmonero.org/") + (synopsis "Monero command line client") + (description + "Monero is a secure, private, untraceable currency. This package provides the +Monero command line client and daemon.") + (license license:bsd-3))) -- 2.13.4