Skip to content

Commit

Permalink
treewide: change $IN_NIX_SHELL handling
Browse files Browse the repository at this point in the history
... to be compatible with NixOS/nix#933
while not breaking compatibility with current nix.
  • Loading branch information
vcunat committed Aug 11, 2016
1 parent 18c0be1 commit d4de02c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/trivial.nix
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/tools/pypi2nix/default.nix
Expand Up @@ -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
Expand Down

0 comments on commit d4de02c

Please sign in to comment.