summary refs log tree commit diff
path: root/lib/trivial.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lib/trivial.nix')
-rw-r--r--lib/trivial.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/trivial.nix b/lib/trivial.nix
index f85c74ab88e..21642ca0bdc 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;