guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 843af5ed32fad5ebf29ee26d2982b6c21843a668
Author: Cayetano Santos <[email protected]>
AuthorDate: Thu Oct 30 09:19:58 2025 +0100

    gnu: Add python-oscrypto.
    
    * gnu/packages/python-crypto.scm (python-oscrypto): New variable.
    
    Change-Id: I1395e3ef753291ad9fb0887b7e38460ab708d7fa
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/python-crypto.scm | 44 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index 2f78c1faa5..88d9b89a19 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -770,6 +770,50 @@ environments.")
     (description "OMEMO cryptography library that was forked from 
python-axolotl.")
     (license license:gpl3)))
 
+(define-public python-oscrypto
+  (package
+    (name "python-oscrypto")
+    (version "1.3.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+              (url "https://github.com/wbond/oscrypto/";)
+              (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1v5wkmzcyiqy39db8j2dvkdrv2nlsc48556h73x4dzjwd6kg4q0a"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:test-backend #~'custom
+      #:test-flags
+      #~(list "run.py"
+              (format #f "use_openssl=~a,~a"
+                      (search-input-file %build-inputs "/lib/libcrypto.so")
+                      (search-input-file %build-inputs "/lib/libssl.so"))
+              "skip_internet=true"
+              "tests")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'check 'set-envs
+            (lambda* (#:key inputs #:allow-other-keys)
+              (setenv
+               "SSL_CERT_FILE"
+               (search-input-file
+                inputs "/etc/ssl/certs/ca-certificates.crt")))))))
+    (propagated-inputs (list python-asn1crypto))
+    (native-inputs (list nss-certs-for-test openssl python-setuptools))
+    (home-page "https://github.com/wbond/oscrypto/";)
+    (synopsis "Compiler-free Python encryption library")
+    (description
+     "@code{Python-oscrypto} is a compilation-free encryption library which
+integrates with the encryption library that is part of the operating system.
+It supports TLS (SSL) sockets, key generation, encryption, decryption,
+signing, verification and KDFs using the OS crypto libraries.")
+    (license license:expat)))
+
 (define-public python-pyaes
   ;; XXX: Last updated in 2017.
   (package

Reply via email to