From 1bffd83e1a9cdf3271c2b178daa611c6b9c22f58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Thu, 11 Aug 2016 17:09:04 +0200 Subject: [PATCH] nix-build: extend the meaning of $IN_NIX_SHELL An equivalent was originally filed against the perl version: https://github.com/NixOS/nix/pull/933 --- src/nix-build/nix-build.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc index 4d80a0c53..ee6d2699a 100755 --- a/src/nix-build/nix-build.cc +++ b/src/nix-build/nix-build.cc @@ -332,7 +332,7 @@ int main(int argc, char ** argv) } if (runEnv) - setenv("IN_NIX_SHELL", "1", 1); + setenv("IN_NIX_SHELL", pure ? "pure" : "impure", 1); for (auto & expr : exprs) { // Instantiate.