diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index c478c3753233..feb82fd92266 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -376,7 +376,8 @@ export NIX_BUILD_CORES # Prevent OpenSSL-based applications from using certificates in # /etc/ssl. -if [ -z "$SSL_CERT_FILE" ]; then +# Leave it in shells for convenience. +if [ -z "$SSL_CERT_FILE" ] && [ -z "$IN_NIX_SHELL" ]; then export SSL_CERT_FILE=/no-cert-file.crt fi