From d4de02c46e04103ff51c42dcd0165aa5e548e5d1 Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Thu, 11 Aug 2016 16:35:06 +0200 Subject: treewide: change $IN_NIX_SHELL handling ... to be compatible with https://github.com/NixOS/nix/pull/933 while not breaking compatibility with current nix. --- lib/trivial.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/trivial.nix') diff --git a/lib/trivial.nix b/lib/trivial.nix index f85c74ab88e3..21642ca0bdc1 100644 --- a/lib/trivial.nix +++ b/lib/trivial.nix @@ -71,7 +71,7 @@ rec { + (if pathExists suffixFile then fileContents suffixFile else "pre-git"); # Whether we're being called by nix-shell. - inNixShell = builtins.getEnv "IN_NIX_SHELL" == "1"; + inNixShell = builtins.getEnv "IN_NIX_SHELL" != ""; # Return minimum/maximum of two numbers. min = x: y: if x < y then x else y; -- cgit 1.4.1