treewide: change $IN_NIX_SHELL handling

... to be compatible with https://github.com/NixOS/nix/pull/933
while not breaking compatibility with current nix.
This commit is contained in:
Vladimír Čunát 2016-08-11 16:35:06 +02:00
parent 18c0be1b3a
commit d4de02c46e
2 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ rec {
+ (if pathExists suffixFile then fileContents suffixFile else "pre-git"); + (if pathExists suffixFile then fileContents suffixFile else "pre-git");
# Whether we're being called by nix-shell. # 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. # Return minimum/maximum of two numbers.
min = x: y: if x < y then x else y; min = x: y: if x < y then x else y;

View File

@ -36,7 +36,7 @@ in stdenv.mkDerivation rec {
# mv effect-*/effect $out/pkgs/effect # mv effect-*/effect $out/pkgs/effect
mv requests-*/requests $out/pkgs/ mv requests-*/requests $out/pkgs/
if [ "$IN_NIX_SHELL" != "1" ]; then if [ -z "$IN_NIX_SHELL" ]; then
if [ -e git-export ]; then if [ -e git-export ]; then
mv git-export/src/pypi2nix $out/pkgs/pypi2nix mv git-export/src/pypi2nix $out/pkgs/pypi2nix
else else