From d4de02c46e04103ff51c42dcd0165aa5e548e5d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Thu, 11 Aug 2016 16:35:06 +0200 Subject: [PATCH] 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 +- pkgs/development/tools/pypi2nix/default.nix | 2 +- 2 files changed, 2 insertions(+), 2 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; diff --git a/pkgs/development/tools/pypi2nix/default.nix b/pkgs/development/tools/pypi2nix/default.nix index 02ab4c06a50..2884b23049a 100644 --- a/pkgs/development/tools/pypi2nix/default.nix +++ b/pkgs/development/tools/pypi2nix/default.nix @@ -36,7 +36,7 @@ in stdenv.mkDerivation rec { # mv effect-*/effect $out/pkgs/effect mv requests-*/requests $out/pkgs/ - if [ "$IN_NIX_SHELL" != "1" ]; then + if [ -z "$IN_NIX_SHELL" ]; then if [ -e git-export ]; then mv git-export/src/pypi2nix $out/pkgs/pypi2nix else