aboutsummaryrefslogtreecommitdiff
path: root/src/nix-build
diff options
context:
space:
mode:
authorVladimír Čunát <vladimir.cunat@nic.cz>2016-08-11 17:09:04 +0200
committerVladimír Čunát <vladimir.cunat@nic.cz>2016-08-11 17:14:09 +0200
commit1bffd83e1a9cdf3271c2b178daa611c6b9c22f58 (patch)
treec02b75b3c234d5f8b19f0141ef4b6842a96f763d /src/nix-build
parent80ebc553eca19dafc64c47420cd49ddd506bc9b7 (diff)
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
Diffstat (limited to 'src/nix-build')
-rwxr-xr-xsrc/nix-build/nix-build.cc2
1 files changed, 1 insertions, 1 deletions
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.