stdenv: also override cert files in pure nix-shell

That's very much consistent with the spirit of nix-shell --pure

BTW, nix 1.x shells will be always treated as pure;
in that version detection isn't possible.
https://github.com/NixOS/nix/commit/1bffd83e1a9c
This commit is contained in:
Vladimír Čunát 2019-05-09 09:49:42 +02:00
parent 79bd4ad579
commit b27cc37671
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA

View File

@ -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