summary refs log tree commit diff
path: root/pkgs/stdenv
diff options
context:
space:
mode:
authorVladimír Čunát <v@cunat.cz>2019-05-09 09:49:42 +0200
committerVladimír Čunát <v@cunat.cz>2019-05-09 09:49:42 +0200
commitb27cc3767115bb8d93cc30b41be04621e4efb85f (patch)
tree40b67c7f03d94c54dcd6da9dbf48873a418f1d9c /pkgs/stdenv
parent79bd4ad5794163b8a65acc86809a6603ee7c7ce7 (diff)
downloadnixpkgs-b27cc3767115bb8d93cc30b41be04621e4efb85f.tar
nixpkgs-b27cc3767115bb8d93cc30b41be04621e4efb85f.tar.gz
nixpkgs-b27cc3767115bb8d93cc30b41be04621e4efb85f.tar.bz2
nixpkgs-b27cc3767115bb8d93cc30b41be04621e4efb85f.tar.lz
nixpkgs-b27cc3767115bb8d93cc30b41be04621e4efb85f.tar.xz
nixpkgs-b27cc3767115bb8d93cc30b41be04621e4efb85f.tar.zst
nixpkgs-b27cc3767115bb8d93cc30b41be04621e4efb85f.zip
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
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r--pkgs/stdenv/generic/setup.sh6
1 files 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