From 04b06e83dc3438512896abdb38b7d6a8dd8adb26 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Mon, 23 Jan 2023 19:11:20 +0100 Subject: [PATCH] tests.pkg-configPackages: Filter out broken packages Some packages are only marked broken on specific platforms, so we filter those out as well. Consequently, this might not raise an error if the attribute value needs to point to a different pkgs attribute, but this is not something we can detect. For now, we'll have to rely on users of such pkg-config packages to report that kind of error. There's really not much we can do about this here. --- pkgs/test/pkg-config-packages.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/test/pkg-config-packages.nix b/pkgs/test/pkg-config-packages.nix index 8e4e5253f9b1..2d14d9402f0e 100644 --- a/pkgs/test/pkg-config-packages.nix +++ b/pkgs/test/pkg-config-packages.nix @@ -30,6 +30,13 @@ let # single test, which we want to do in `passthru.tests`, or interactively. null + else if ! pkg?meta.broken + then + throw "pkg-config module `${escapeNixIdentifier moduleName}` does not have a `meta.broken` attribute. This can't be right. Please check the attribute value for `${escapeNixIdentifier moduleName}` in `pkgs/top-level/pkg-config.packages.nix` in Nixpkgs." + + else if pkg.meta.broken + then null + else makePkgConfigTest moduleName pkg; makePkgConfigTest = moduleName: pkg: runCommand "check-pkg-config-${moduleName}" {