diff --git a/pkgs/development/python-modules/httpx/setup-hook.sh b/pkgs/development/python-modules/httpx/setup-hook.sh index 7e9ced07b69c..fe567877ef1a 100644 --- a/pkgs/development/python-modules/httpx/setup-hook.sh +++ b/pkgs/development/python-modules/httpx/setup-hook.sh @@ -1,5 +1,7 @@ httpxSslCertFileUnset() { + if [ ! -e "${SSL_CERT_FILE-}" ]; then unset SSL_CERT_FILE + fi } postHooks+=(httpxSslCertFileUnset) diff --git a/pkgs/development/python-modules/prowlpy/default.nix b/pkgs/development/python-modules/prowlpy/default.nix index f69da1bc04c0..a6368e345efe 100644 --- a/pkgs/development/python-modules/prowlpy/default.nix +++ b/pkgs/development/python-modules/prowlpy/default.nix @@ -43,6 +43,7 @@ buildPythonPackage (finalAttrs: { pythonImportsCheck = [ "prowlpy" ]; nativeCheckInputs = [ + cacert pytest-asyncio pytest-cov-stub pytestCheckHook @@ -50,12 +51,6 @@ buildPythonPackage (finalAttrs: { ] ++ lib.concatAttrValues finalAttrs.passthru.optional-dependencies; - preCheck = '' - # Without this pyreqwest fails with - # unexpected error: No CA certificates were loaded from the system - export SSL_CERT_FILE="${cacert}/etc/ssl/certs/ca-bundle.crt" - ''; - # tests fail without this pytestFlags = [ "-v" ]; diff --git a/pkgs/development/python-modules/pyreqwest/default.nix b/pkgs/development/python-modules/pyreqwest/default.nix index 10b189757108..3d6fe0e9c825 100644 --- a/pkgs/development/python-modules/pyreqwest/default.nix +++ b/pkgs/development/python-modules/pyreqwest/default.nix @@ -43,6 +43,7 @@ buildPythonPackage (finalAttrs: { pythonImportsCheck = [ "pyreqwest" ]; nativeCheckInputs = [ + cacert dirty-equals docker granian @@ -57,12 +58,6 @@ buildPythonPackage (finalAttrs: { yarl ]; - preCheck = '' - # Without this tests fails with - # unexpected error: No CA certificates were loaded from the system - export SSL_CERT_FILE="${cacert}/etc/ssl/certs/ca-bundle.crt" - ''; - disabledTestPaths = [ # requires a running Docker daemon "tests/test_examples.py"