about summary refs log tree commit diff
path: root/pkgs/development/python-modules/certifi
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2022-12-09 13:30:00 +0100
committerMartin Weinelt <hexa@darmstadt.ccc.de>2022-12-09 13:58:27 +0100
commit35750bad505058f11cffbbba28c6e12491e5da81 (patch)
tree61b288ff6e13c947b89d64ae675c7c87f9795fd8 /pkgs/development/python-modules/certifi
parent8b9cf3b0ab48c5944567fc5124f00347434a8425 (diff)
python3Packages.certifi: propgate cacert for its setup-hook
For tests that require a working ca-bundle via certifi we need to setup
`NIX_SSL_CERT_FILE`, which is kindly provided by cacerts setup-hook.
Diffstat (limited to 'pkgs/development/python-modules/certifi')
-rw-r--r--pkgs/development/python-modules/certifi/default.nix11
1 files changed, 5 insertions, 6 deletions
diff --git a/pkgs/development/python-modules/certifi/default.nix b/pkgs/development/python-modules/certifi/default.nix
index 0aa2a321b8320..c80ba08503d41 100644
--- a/pkgs/development/python-modules/certifi/default.nix
+++ b/pkgs/development/python-modules/certifi/default.nix
@@ -30,16 +30,15 @@ buildPythonPackage rec {
     ln -snvf "${cacert}/etc/ssl/certs/ca-bundle.crt" "certifi/cacert.pem"
   '';
 
+  propagatedNativeBuildInputs = [
+    # propagate cacerts setup-hook to set up `NIX_SSL_CERT_FILE`
+    cacert
+  ];
+
   checkInputs = [
     pytestCheckHook
   ];
 
-  preCheck = ''
-    # NIX_SSL_CERT_FILE is set to /no-cert-file.crt during build, which
-    # breaks the tests
-    unset NIX_SSL_CERT_FILE
-  '';
-
   pythonImportsCheck = [
     "certifi"
   ];