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.
This commit is contained in:
Martin Weinelt 2022-12-09 13:30:00 +01:00
parent 8b9cf3b0ab
commit 35750bad50
No known key found for this signature in database
GPG key ID: 87C1E9888F856759

View file

@ -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"
];