From 07c9ae7a658766e5eea496d986cf1b43036d5caa Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Fri, 17 Mar 2023 20:42:55 -0700 Subject: [PATCH] test-defaultPkgConfigPackages.nix: filter out recurseForDerivations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The command at the top of this file fails to evaluate: ``` $ nix-build -A tests.pkg-config.defaultPkgConfigPackages in job ‘nixpkgs.tests.pkg-config.defaultPkgConfigPackages.tests-combined.x86_64-linux’: error: pkg-config module `recurseForDerivations` is not defined to be a derivation. Please check the attribute value for `recurseForDerivations` in `pkgs/top-level/pkg-config-packages.nix` in Nixpkgs. ``` This is also causing eval errors on Hydra: https://hydra.nixos.org/jobset/nixos/pr-209870-gcc-external-bootstrap#tabs-errors Let's filter out `recurseForDerivations=true` from the attrset, since it exists mainly as a flag to signal special handling when recursing. --- pkgs/top-level/pkg-config/test-defaultPkgConfigPackages.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/pkg-config/test-defaultPkgConfigPackages.nix b/pkgs/top-level/pkg-config/test-defaultPkgConfigPackages.nix index 37687117987d..108a2b67504f 100644 --- a/pkgs/top-level/pkg-config/test-defaultPkgConfigPackages.nix +++ b/pkgs/top-level/pkg-config/test-defaultPkgConfigPackages.nix @@ -4,7 +4,8 @@ let inherit (lib.strings) escapeNixIdentifier; - allTests = lib.mapAttrs (k: v: if v == null then null else makePkgConfigTestMaybe k v) defaultPkgConfigPackages; + allTests = lib.mapAttrs (k: v: if v == null then null else makePkgConfigTestMaybe k v) + (builtins.removeAttrs defaultPkgConfigPackages ["recurseForDerivations"]); # nix-build rejects attribute names with periods # This will build those regardless.