nixpkgs-suyu/pkgs/build-support/testers/testMetaPkgConfig/tester.nix
John Ericson 6e4a1b18d9 meta.pkgConfigModules: Init convention
See docs.

Follow-up work:

- Existing packages should be converted

- `defaultPkgConfigPackages` should assert on `meta.pkgConfigModules`
  and let `tests.pkg-config` alone test the build results.

CC @sternenseemann

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-02-03 09:37:31 -05:00

14 lines
456 B
Nix

{ lib, runCommand, testers }:
package:
runCommand "check-meta-pkg-config-modules-for-${package.name}" {
meta = {
description = "Test whether ${package.name} exposes all pkg-config modules ${toString package.meta.pkgConfigModules}";
};
dependsOn = map
(moduleName: testers.hasPkgConfigModule { inherit package moduleName; })
package.meta.pkgConfigModules;
} ''
echo "found all of ${toString package.meta.pkgConfigModules}" > "$out"
''