aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/python-crypto.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2024-04-09 16:44:22 +0100
committerChristopher Baines <mail@cbaines.net>2024-04-09 16:46:34 +0100
commit6cae1db889f62051580d5a365f62585412a53a8c (patch)
tree4d3db074d50ca3e2109cced17bec77f207a0c1fd /gnu/packages/python-crypto.scm
parent410e699e0933653e69d03a4cdadf11854c6723f4 (diff)
parent35e1d9247e39f3c91512cf3d9ef1467962389e35 (diff)
downloadguix-6cae1db889f62051580d5a365f62585412a53a8c.tar.gz
guix-6cae1db889f62051580d5a365f62585412a53a8c.zip
Merge remote-tracking branch 'savannah/master' into mesa-updates
Change-Id: Iad185e2ced97067b3dff8fd722435a6c5e2c00e5
Diffstat (limited to 'gnu/packages/python-crypto.scm')
-rw-r--r--gnu/packages/python-crypto.scm36
1 files changed, 36 insertions, 0 deletions
diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index 3e1472a6c9..d25059c86b 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -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")