summary refs log tree commit diff
path: root/lib/trivial.nix
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-08-11 16:35:06 +0200
committerVladimír Čunát <vcunat@gmail.com>2016-08-11 16:40:44 +0200
commitd4de02c46e04103ff51c42dcd0165aa5e548e5d1 (patch)
treeed6f3c507fdfb0f6c00020279733894452c28774 /lib/trivial.nix
parent18c0be1b3a30b18cc37fb4ffd835a0dd6ba9add4 (diff)
downloadnixpkgs-d4de02c46e04103ff51c42dcd0165aa5e548e5d1.tar
nixpkgs-d4de02c46e04103ff51c42dcd0165aa5e548e5d1.tar.gz
nixpkgs-d4de02c46e04103ff51c42dcd0165aa5e548e5d1.tar.bz2
nixpkgs-d4de02c46e04103ff51c42dcd0165aa5e548e5d1.tar.lz
nixpkgs-d4de02c46e04103ff51c42dcd0165aa5e548e5d1.tar.xz
nixpkgs-d4de02c46e04103ff51c42dcd0165aa5e548e5d1.tar.zst
nixpkgs-d4de02c46e04103ff51c42dcd0165aa5e548e5d1.zip
treewide: change $IN_NIX_SHELL handling
... to be compatible with https://github.com/NixOS/nix/pull/933
while not breaking compatibility with current nix.
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;