summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorCayetano Santos <csantosb@inventati.org>2025-10-30 09:19:58 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-10-30 13:24:09 +0000
commit843af5ed32fad5ebf29ee26d2982b6c21843a668 (patch)
treebe2a8e9bfc9e2f7b1f9a1f538bfbc994ab52654d /gnu/packages
parentbe460d0ee3128d4020715bff67d08d650b8081e5 (diff)
gnu: Add python-oscrypto.
* gnu/packages/python-crypto.scm (python-oscrypto): New variable. Change-Id: I1395e3ef753291ad9fb0887b7e38460ab708d7fa Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/python-crypto.scm44
1 files changed, 44 insertions, 0 deletions
diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index 2f78c1faa56..88d9b89a19f 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