aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2022-10-25 13:13:23 +0100
committerChristopher Baines <mail@cbaines.net>2022-10-25 13:13:23 +0100
commitc7d25c7c8e45eef00b56659a94b4521984d5cbbc (patch)
tree5e035182952735be7a8bd5e9907647403add9f2e
parenta2f6900761d81ca572a9de92868ed225c2893111 (diff)
downloadguix-latest-python-gpg.tar
guix-latest-python-gpg.tar.gz
WIP build python-gpg from gpgmelatest-python-gpg
The python-gpg package using PyPI source code seems out of date, and doesn't build on 32bit systems like i686-linux and armhf-linux. Maybe we should use the source from gpgme?
-rw-r--r--gnu/packages/gnupg.scm48
1 files changed, 48 insertions, 0 deletions
diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index ce9ef48796..3a8be9a544 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -431,6 +431,54 @@ and every application benefits from this.")
(properties '((ftp-server . "ftp.gnupg.org")
(ftp-directory . "/gcrypt/gpgme")))))
+(define-public python-gpg-latest
+ (package
+ (inherit gpgme)
+ (name "python-gpg")
+ (arguments
+ (list
+ #:modules
+ '((guix build gnu-build-system)
+ (guix build utils)
+ (ice-9 ftw)
+ (ice-9 match)) #:configure-flags #~(list "--enable-languages=python")
+ #:make-flags #~(list (string-append "LDFLAGS=-Wl,-rpath=" #$gpgme "/lib"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'remove-all-but-python
+ (lambda _
+ (for-each
+ (lambda (name)
+ (delete-file-recursively
+ (string-append #$output "/" name)))
+ (scandir #$output
+ (match-lambda
+ ("." #f)
+ (".." #f)
+ ("lib" #f)
+ (_ #t))))
+ (for-each
+ (lambda (name)
+ (delete-file-recursively
+ (string-append #$output "/lib/" name)))
+ (scandir (string-append #$output "/lib")
+ (match-lambda
+ ("." #f)
+ (".." #f)
+ (name (not (string-prefix? "python" name)))))))))))
+ (inputs
+ (modify-inputs (package-inputs gpgme)
+ (append gpgme)))
+ (native-inputs
+ (modify-inputs (package-native-inputs gpgme)
+ (append swig)
+ (append python)))
+ (home-page (package-home-page gpgme))
+ (synopsis "Python bindings for GPGME GnuPG cryptography library")
+ (description "This package provides Python bindings to the GPGME GnuPG
+cryptographic library.")
+ (license license:lgpl2.1+)))
+
(define-public qgpgme
(package
(inherit gpgme)