diff --git a/pkgs/build-support/upstream-updater/attrset-to-dir.sh b/pkgs/build-support/upstream-updater/attrset-to-dir.sh index 0e0c50e12598..2d99ef110a1c 100755 --- a/pkgs/build-support/upstream-updater/attrset-to-dir.sh +++ b/pkgs/build-support/upstream-updater/attrset-to-dir.sh @@ -1,8 +1,8 @@ #! /bin/sh [ -n "$2" ] && NIXPKGS_ALL="$2"; -[ -z "$NIXPKGS_ALL" ] && [ -f "/etc/nixos/nixpkgs" ] && NIXPKGS_ALL="/etc/nixos/nixpkgs"; -[ -z "$NIXPKGS_ALL" ] && [ -f "$HOME/nixpkgs" ] && NIXPKGS_ALL="$HOME/nixpkgs"; +[ -z "$NIXPKGS_ALL" ] && [ -d "/etc/nixos/nixpkgs" ] && NIXPKGS_ALL="/etc/nixos/nixpkgs"; +[ -z "$NIXPKGS_ALL" ] && [ -d "$HOME/nixpkgs" ] && NIXPKGS_ALL="$HOME/nixpkgs"; [ -z "$NIXPKGS_ALL" ] && { echo "Cannot find Nixpkgs source. Please specify it via NIXPKGS_ALL or second command line argument" exit 1