Skip to content

Commit d4de02c

Browse files
committed
treewide: change $IN_NIX_SHELL handling
... to be compatible with NixOS/nix#933 while not breaking compatibility with current nix.
1 parent 18c0be1 commit d4de02c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/trivial.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ rec {
7171
+ (if pathExists suffixFile then fileContents suffixFile else "pre-git");
7272

7373
# Whether we're being called by nix-shell.
74-
inNixShell = builtins.getEnv "IN_NIX_SHELL" == "1";
74+
inNixShell = builtins.getEnv "IN_NIX_SHELL" != "";
7575

7676
# Return minimum/maximum of two numbers.
7777
min = x: y: if x < y then x else y;

pkgs/development/tools/pypi2nix/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ in stdenv.mkDerivation rec {
3636
# mv effect-*/effect $out/pkgs/effect
3737
mv requests-*/requests $out/pkgs/
3838
39-
if [ "$IN_NIX_SHELL" != "1" ]; then
39+
if [ -z "$IN_NIX_SHELL" ]; then
4040
if [ -e git-export ]; then
4141
mv git-export/src/pypi2nix $out/pkgs/pypi2nix
4242
else

0 commit comments

Comments
 (0)