diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 9cc5cd89f3b7..dcccdaa50ae5 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -647,12 +647,12 @@ export NIX_BUILD_CORES # Prevent SSL libraries from using certificates in /etc/ssl, unless set explicitly. -# Leave it in shells for convenience. -if [ -z "${NIX_SSL_CERT_FILE:-}" ] && [ -z "${IN_NIX_SHELL:-}" ]; then +# Leave it in impure shells for convenience. +if [ -z "${NIX_SSL_CERT_FILE:-}" ] && [ "${IN_NIX_SHELL:-}" != "impure" ]; then export NIX_SSL_CERT_FILE=/no-cert-file.crt fi # Another variant left for compatibility. -if [ -z "${SSL_CERT_FILE:-}" ] && [ -z "${IN_NIX_SHELL:-}" ]; then +if [ -z "${SSL_CERT_FILE:-}" ] && [ "${IN_NIX_SHELL:-}" != "impure" ]; then export SSL_CERT_FILE=/no-cert-file.crt fi