From 8b9cf3b0ab48c5944567fc5124f00347434a8425 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 9 Dec 2022 13:12:28 +0100 Subject: [PATCH 1/2] Revert "python3Packages.sphinx: Fix tests after certifi patch" This reverts commit 5313e0bdffbc1553f3f66cc719e47844d19373f1. --- pkgs/development/python-modules/sphinx/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/development/python-modules/sphinx/default.nix b/pkgs/development/python-modules/sphinx/default.nix index 5edfaa251515..5a27f04bd0ee 100644 --- a/pkgs/development/python-modules/sphinx/default.nix +++ b/pkgs/development/python-modules/sphinx/default.nix @@ -95,9 +95,6 @@ buildPythonPackage rec { preCheck = '' export HOME=$(mktemp -d) - - # Unset dummy cert file path set in stdenv, that confuses certifi - unset NIX_SSL_CERT_FILE ''; disabledTests = [ From 35750bad505058f11cffbbba28c6e12491e5da81 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 9 Dec 2022 13:30:00 +0100 Subject: [PATCH 2/2] 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" ];