diff options
Diffstat (limited to 'gnu/packages/python-crypto.scm')
-rw-r--r-- | gnu/packages/python-crypto.scm | 58 |
1 files changed, 44 insertions, 14 deletions
diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index ff6b3a3e1a..d25059c86b 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -11,7 +11,7 @@ ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is> ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> -;;; Copyright © 2015, 2016, 2017, 2019, 2022 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2015, 2016, 2017, 2019, 2022, 2024 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org> ;;; Copyright © 2016, 2017, 2020 Arun Isaac <arunisaac@systemreboot.net> ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au> @@ -469,6 +469,7 @@ for example, for recording or replaying web content.") (package (name "python-certifi") (version "2022.6.15") + (replacement python-certifi/fixed) (source (origin (method url-fetch) (uri (pypi-uri "certifi" version)) @@ -484,6 +485,41 @@ for example, for recording or replaying web content.") is used by the Requests library to verify HTTPS requests.") (license license:asl2.0))) +(define python-certifi/fixed + (package + (inherit python-certifi) + (source (origin + (inherit (package-source python-certifi)) + (snippet + #~(begin + (delete-file "certifi/cacert.pem") + (delete-file "certifi/core.py") + (with-output-to-file "certifi/core.py" + (lambda _ + (display "\"\"\" +certifi.py +~~~~~~~~~~ +This file is a Guix-specific version of core.py. + +This module returns the installation location of SSL_CERT_FILE or +/etc/ssl/certs/ca-certificates.crt, or its contents. +\"\"\" +import os + +_CA_CERTS = None + +try: + _CA_CERTS = os.environ [\"SSL_CERT_FILE\"] +except: + _CA_CERTS = os.path.join(\"/etc\", \"ssl\", \"certs\", \"ca-certificates.crt\") + +def where() -> str: + return _CA_CERTS + +def contents() -> str: + with open(where(), \"r\", encoding=\"ascii\") as data: + return data.read()"))))))))) + (define-public python-cryptography-vectors (package (name "python-cryptography-vectors") @@ -774,7 +810,7 @@ PKCS#12, PKCS#5, X.509 and TSP.") (define-public python-pynacl (package (name "python-pynacl") - (version "1.4.0") + (version "1.5.0") (source (origin (method url-fetch) @@ -782,25 +818,19 @@ PKCS#12, PKCS#5, X.509 and TSP.") (modules '((guix build utils))) (snippet '(begin - ;; Remove spurious dependency on python-wheel, can be removed - ;; for 1.5. - (substitute* "setup.py" - (("\"wheel\"") "")) ;; Remove bundled libsodium. (delete-file-recursively "src/libsodium"))) (sha256 (base32 - "01b56hxrbif3hx8l6rwz5kljrgvlbj7shmmd2rjh0hn7974a5sal")))) - (build-system python-build-system) + "1fi0jbxhh3svajzldlb6gj5sr5a48v11xlmx0wb831db167l9iwa")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases + (list + #:phases + '(modify-phases %standard-phases (add-before 'build 'use-system-sodium (lambda _ - (setenv "SODIUM_INSTALL" "system"))) - (replace 'check - (lambda _ - (invoke "pytest" "-vv")))))) + (setenv "SODIUM_INSTALL" "system")))))) (native-inputs (list python-hypothesis python-pytest)) (propagated-inputs |