From b27cc3767115bb8d93cc30b41be04621e4efb85f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Thu, 9 May 2019 09:49:42 +0200 Subject: [PATCH] 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 --- pkgs/stdenv/generic/setup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 9cc5cd89f3b..dcccdaa50ae 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