From 35750bad505058f11cffbbba28c6e12491e5da81 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 9 Dec 2022 13:30:00 +0100 Subject: [PATCH] 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. --- pkgs/development/python-modules/certifi/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/certifi/default.nix b/pkgs/development/python-modules/certifi/default.nix index 0aa2a321b832..c80ba08503d4 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" ];