diff options
Diffstat (limited to 'nixpkgs/pkgs/test/nixpkgs-check-by-name/tests/mock-nixpkgs.nix')
-rw-r--r-- | nixpkgs/pkgs/test/nixpkgs-check-by-name/tests/mock-nixpkgs.nix | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/test/nixpkgs-check-by-name/tests/mock-nixpkgs.nix b/nixpkgs/pkgs/test/nixpkgs-check-by-name/tests/mock-nixpkgs.nix index 50ad67617542..01bb27a48038 100644 --- a/nixpkgs/pkgs/test/nixpkgs-check-by-name/tests/mock-nixpkgs.nix +++ b/nixpkgs/pkgs/test/nixpkgs-check-by-name/tests/mock-nixpkgs.nix @@ -75,9 +75,14 @@ let # Turns autoCalledPackageFiles into an overlay that `callPackage`'s all of them autoCalledPackages = self: super: - builtins.mapAttrs (name: file: - self.callPackage file { } - ) autoCalledPackageFiles; + { + # Needed to be able to detect empty arguments in all-packages.nix + # See a more detailed description in pkgs/top-level/by-name-overlay.nix + _internalCallByNamePackageFile = file: self.callPackage file { }; + } + // builtins.mapAttrs + (name: self._internalCallByNamePackageFile) + autoCalledPackageFiles; # A list optionally containing the `all-packages.nix` file from the test case as an overlay optionalAllPackagesOverlay = |