>From 916d75f2a1f2ec292131dc316e11238b58b7e624 Mon Sep 17 00:00:00 2001 From: ng0 Date: Thu, 2 Mar 2017 11:19:40 +0000 Subject: [PATCH] gnu: pybitmessage: Update to 0.6.2. * gnu/packages/messaging.scm (pybitmessage): Update to 0.6.2. --- gnu/packages/messaging.scm | 90 +++++++++++----------------------------------- 1 file changed, 21 insertions(+), 69 deletions(-) diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index 0ffc031c8..e1a1547b2 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2015 Andreas Enge ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus ;;; Copyright © 2015 Efraim Flashner -;;; Copyright © 2016, 2017 +;;; Copyright © 2016, 2017 ng0 ;;; Copyright © 2016 Andy Patterson ;;; Copyright © 2016, 2017 Clément Lassieur ;;; @@ -770,7 +770,7 @@ connect with friends and family without anyone else listening in.") (define-public pybitmessage (package (name "pybitmessage") - (version "0.6.1") + (version "0.6.2") (source (origin (method url-fetch) @@ -779,9 +779,9 @@ connect with friends and family without anyone else listening in.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1ffj7raxpp277kphj98190fxrwfx16vmbspk7k3azg3bh5f5idnf")))) + "1in2mhaxkp2sx8pgvifq9dk1z8b2x3imf1anr0z926vwxwjrf85w")))) (inputs - `(("python" ,python-2) + `(("python-2" ,python-2) ("python:tk" ,python-2 "tk") ("openssl" ,openssl) ("sqlite" ,sqlite) @@ -789,74 +789,26 @@ connect with friends and family without anyone else listening in.") ("python2-pyqt-4" ,python2-pyqt-4) ("python2-sip" ,python2-sip) ("python2-pysqlite" ,python2-pysqlite) - ("python2-pyopenssl" ,python2-pyopenssl))) - (native-inputs - `(("pkg-config" ,pkg-config))) - (build-system gnu-build-system) + ("python2-pyopenssl" ,python2-pyopenssl) + ("python2-msgpack" ,python2-msgpack))) + (build-system python-build-system) (arguments - `(#:imported-modules ((guix build python-build-system) - ,@%gnu-build-system-modules) - #:make-flags (list (string-append "PREFIX=" - (assoc-ref %outputs "out"))) - #:tests? #f ; no test target + `(#:tests? #f ; no test target + #:python ,python-2 #:phases (modify-phases %standard-phases - (add-before 'build 'fix-makefile - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "Makefile" - (("mkdir -p \\$\\{DESTDIR\\}/usr") "") - (("/usr/local") "") - (("/usr") "") - (("#!/bin/sh") (string-append "#!" (which "sh"))) - (("python2") (which "python")) - (("/opt/openssl-compat-bitcoin/lib/") - (string-append (assoc-ref inputs "openssl") "/lib/"))) - #t)) - (add-after 'unpack 'fix-unmatched-python-shebangs - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "src/bitmessagemain.py" - (("#!/usr/bin/env python2.7") - (string-append "#!" (which "python")))) - (substitute* "src/bitmessagecli.py" - (("#!/usr/bin/env python2.7.x") - (string-append "#!" (which "python")))) - #t)) - (add-after 'unpack 'fix-depends - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "src/depends.py" - (("libcrypto.so") - (string-append (assoc-ref inputs "openssl") - "/lib/libcrypto.so"))) - #t)) - (add-after 'unpack 'fix-local-files-in-paths - (lambda* (#:key outputs #:allow-other-keys) - (substitute* "src/proofofwork.py" - (("bitmsghash.so") - (string-append (assoc-ref outputs "out") - "/lib/bitmsghash.so"))) - #t)) - (add-after 'unpack 'fix-pyelliptic - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "src/pyelliptic/openssl.py" - (("libcrypto.so") - (string-append (assoc-ref inputs "openssl") - "/lib/libcrypto.so")) - (("libssl.so") - (string-append (assoc-ref inputs "openssl") - "/lib/libssl.so"))) - #t)) - ;; XXX: Make does not build and install bitmsghash, do it - ;; and place it in /lib. - (add-before 'build 'build-and-install-bitmsghash - (lambda* (#:key outputs #:allow-other-keys) - (chdir "src/bitmsghash") - (system* "make") - (chdir "../..") - (install-file "src/bitmsghash/bitmsghash.so" - (string-append (assoc-ref outputs "out") "/lib")) - #t)) - (add-after 'install 'wrap - (@@ (guix build python-build-system) wrap))))) + (add-after 'unpack 'fix-setup.py + (lambda _ + ;; Guix can not press the Anykey. + (substitute* "setup.py" + ((" if detectPrereqs\\(True\\) != \\[\\]: + print \"Press Return to continue\" + try: + nothing = raw_input\\(\\) + except NameError: + pass") + "")) + #t))))) (license license:expat) (description "Distributed and trustless peer-to-peer communications protocol -- 2.12.0