diff --git a/lib/filesystem.nix b/lib/filesystem.nix index 54b2bea4184fa..753088f7542df 100644 --- a/lib/filesystem.nix +++ b/lib/filesystem.nix @@ -367,7 +367,7 @@ in inherit (lib.path) append; defaultPath = append directory "package.nix"; in - if pathIsRegularFile defaultPath then + if pathExists defaultPath then # if `${directory}/package.nix` exists, call it directly callPackage defaultPath {} else lib.concatMapAttrs (name: type: