GNU bug report logs - #49123
[PATCH 0/24] Add mirage

Previous Next

Package: guix-patches;

Reported by: slg <0x2d <at> disroot.org>

Date: Sun, 20 Jun 2021 00:25:02 UTC

Severity: normal

Tags: patch

Full log


Message #11 received at 49123 <at> debbugs.gnu.org (full text, mbox):

From: slg <0x2d <at> disroot.org>
To: 49123 <at> debbugs.gnu.org
Cc: slg <0x2d <at> disroot.org>
Subject: [PATCH 02/24] gnu: libolm: Add python bindings output.
Date: Sat, 19 Jun 2021 22:07:20 -0300
* gnu/packages/crypto.scm (libolm): Add python bindings
---
 gnu/packages/crypto.scm | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index 99455dc632..b1cfd46adc 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -1310,13 +1310,30 @@ Trusted comments are signed, thus verified, before being displayed.")
                 "0bixly6jqpwfx3p37c1qp1j685yg6m429r1nazwh43w4n527bs3y"))
               (file-name (git-file-name name version))))
     (build-system cmake-build-system)
+    (outputs '("out" "python"))
+    (propagated-inputs
+     `(("python-cffi" ,python-cffi)))
+    (native-inputs
+     `(("python" ,python-wrapper)))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
          (replace 'check
            (lambda _
              (with-directory-excursion "tests"
-               (invoke "ctest" ".")))))))
+               (invoke "ctest" "."))))
+         (add-after 'install 'install-python-binding
+           (lambda* (#:key outputs #:allow-other-keys)
+             (with-directory-excursion "../source/python"
+               (invoke "make" "headers" "CPP=cpp") ;; Somehow default $(CPP) is cc?
+               (invoke "python" "setup.py" "build_ext"
+                       (string-append "--library-dirs="
+                                      (assoc-ref outputs "out")
+                                      "/lib"))
+               (invoke "python" "setup.py" "install"
+                       (string-append "--prefix="
+                                      (assoc-ref outputs "python"))
+                       "--root=/")))))))
     (synopsis "Implementation of the olm and megolm cryptographic ratchets")
     (description "The libolm library implements the Double Ratchet
 cryptographic ratchet.  It is written in C and C++11, and exposed as a C
-- 
2.32.0





This bug report was last modified 3 years and 324 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.