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
This commit is contained in:
Vladimír Čunát 2016-08-11 17:09:04 +02:00
parent 80ebc553ec
commit 1bffd83e1a

View file

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