gnu: pybitmessage: Update to 0.6.2.

* gnu/packages/messaging.scm (pybitmessage): Update to 0.6.2.
[build-system]: Change to python-build-system.
[arguments]: Remove "fix-makefile" and "wrap" phases.
[inputs]: Rename to...
[propagated-inputs]: ...this. Add "python2-msgpack" and "python2-pythondialog".
[inputs]: Remove "sqlite" and "qt-4". Move "openssl" ...
[native-inputs]: ...here. Remove "pkg-config".

Signed-off-by: Christopher Baines <mail@cbaines.net>
This commit is contained in:
ng0 2017-08-29 13:05:40 +00:00 committed by Christopher Baines
parent 0083a39f17
commit 58b2835d03
No known key found for this signature in database
GPG Key ID: 5E28A33B0B84F577
1 changed files with 33 additions and 38 deletions

View File

@ -5,7 +5,7 @@
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016, 2017 <contact.ng0@cryptolab.net> ;;; Copyright © 2016, 2017 <ng0@infotropique.org>
;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca> ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
;;; Copyright © 2016, 2017 Clément Lassieur <clement@lassieur.org> ;;; Copyright © 2016, 2017 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2017 Mekeor Melire <mekeor.melire@gmail.com> ;;; Copyright © 2017 Mekeor Melire <mekeor.melire@gmail.com>
@ -848,7 +848,7 @@ connect with friends and family without anyone else listening in.")
(define-public pybitmessage (define-public pybitmessage
(package (package
(name "pybitmessage") (name "pybitmessage")
(version "0.6.1") (version "0.6.2")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
@ -857,39 +857,28 @@ connect with friends and family without anyone else listening in.")
(file-name (string-append name "-" version ".tar.gz")) (file-name (string-append name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1ffj7raxpp277kphj98190fxrwfx16vmbspk7k3azg3bh5f5idnf")))) "1in2mhaxkp2sx8pgvifq9dk1z8b2x3imf1anr0z926vwxwjrf85w"))))
(inputs (propagated-inputs
`(("python" ,python-2) ;; TODO:
("python:tk" ,python-2 "tk") ;; Package "pyopencl", required in addition to numpy for OpenCL support.
("openssl" ,openssl) ;; Package "gst123", required in addition to alsa-utils and
("sqlite" ,sqlite) ;; mpg123 for sound support.
("qt" ,qt-4) `(("python2-msgpack" ,python2-msgpack)
("python2-pythondialog" ,python2-pythondialog)
("python2-pyqt-4" ,python2-pyqt-4) ("python2-pyqt-4" ,python2-pyqt-4)
("python2-sip" ,python2-sip) ("python2-sip" ,python2-sip)
("python2-pysqlite" ,python2-pysqlite) ("python2-pysqlite" ,python2-pysqlite)
("python2-pyopenssl" ,python2-pyopenssl))) ("python2-pyopenssl" ,python2-pyopenssl)))
(native-inputs (native-inputs
`(("pkg-config" ,pkg-config))) `(("openssl" ,openssl)))
(build-system gnu-build-system) (build-system python-build-system)
(arguments (arguments
`(#:imported-modules ((guix build python-build-system) `(#:modules ((guix build python-build-system)
,@%gnu-build-system-modules) (guix build utils))
#:make-flags (list (string-append "PREFIX="
(assoc-ref %outputs "out")))
#:tests? #f ;no test target #:tests? #f ;no test target
#:python ,python-2
#:phases #:phases
(modify-phases %standard-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 (add-after 'unpack 'fix-unmatched-python-shebangs
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(substitute* "src/bitmessagemain.py" (substitute* "src/bitmessagemain.py"
@ -923,18 +912,24 @@ connect with friends and family without anyone else listening in.")
(string-append (assoc-ref inputs "openssl") (string-append (assoc-ref inputs "openssl")
"/lib/libssl.so"))) "/lib/libssl.so")))
#t)) #t))
;; XXX: Make does not build and install bitmsghash, do it (add-after 'unpack 'noninteractive-build
;; and place it in /lib. ;; This applies upstream commit 4c597d3f7cf9f83a763472aa165a1a4292019f20
(add-before 'build 'build-and-install-bitmsghash (lambda _
(lambda* (#:key outputs #:allow-other-keys) (substitute* "setup.py"
(chdir "src/bitmsghash") (("except NameError")
(system* "make") "except EOFError, NameError"))
(chdir "../..")
(install-file "src/bitmsghash/bitmsghash.so"
(string-append (assoc-ref outputs "out") "/lib"))
#t)) #t))
(add-after 'install 'wrap ;; XXX: python setup.py does not build and install bitmsghash,
(@@ (guix build python-build-system) wrap))))) ;; without it PyBitmessage tries to compile it at first run
;; in the store, which due to obvious reasons fails. Do it
;; and place it in /lib.
(add-after 'unpack 'build-and-install-bitmsghash
(lambda* (#:key outputs #:allow-other-keys)
(with-directory-excursion "src/bitmsghash"
(system* "make")
(install-file "bitmsghash.so"
(string-append (assoc-ref outputs "out") "/lib")))
#t)))))
(license license:expat) (license license:expat)
(description (description
"Distributed and trustless peer-to-peer communications protocol "Distributed and trustless peer-to-peer communications protocol