diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2023-02-02 23:49:15 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2023-02-03 09:37:31 -0500 |
commit | 6e4a1b18d995605b95365387d3752e279a2c2ccc (patch) | |
tree | 49fac99aa3c12be04043cb933548a1d177a0c4a2 /pkgs/build-support/testers | |
parent | 3dcde1c342e613853087bc35d66fd4a769cc3f06 (diff) | |
download | nixpkgs-6e4a1b18d995605b95365387d3752e279a2c2ccc.tar nixpkgs-6e4a1b18d995605b95365387d3752e279a2c2ccc.tar.gz nixpkgs-6e4a1b18d995605b95365387d3752e279a2c2ccc.tar.bz2 nixpkgs-6e4a1b18d995605b95365387d3752e279a2c2ccc.tar.lz nixpkgs-6e4a1b18d995605b95365387d3752e279a2c2ccc.tar.xz nixpkgs-6e4a1b18d995605b95365387d3752e279a2c2ccc.tar.zst nixpkgs-6e4a1b18d995605b95365387d3752e279a2c2ccc.zip |
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>
Diffstat (limited to 'pkgs/build-support/testers')
-rw-r--r-- | pkgs/build-support/testers/default.nix | 1 | ||||
-rw-r--r-- | pkgs/build-support/testers/testMetaPkgConfig/tester.nix | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/build-support/testers/default.nix b/pkgs/build-support/testers/default.nix index 15694162edd..542133dd959 100644 --- a/pkgs/build-support/testers/default.nix +++ b/pkgs/build-support/testers/default.nix @@ -123,4 +123,5 @@ hasPkgConfigModule = callPackage ./hasPkgConfigModule/tester.nix { }; + testMetaPkgConfig = callPackage ./testMetaPkgConfig/tester.nix { }; } diff --git a/pkgs/build-support/testers/testMetaPkgConfig/tester.nix b/pkgs/build-support/testers/testMetaPkgConfig/tester.nix new file mode 100644 index 00000000000..bee97ace140 --- /dev/null +++ b/pkgs/build-support/testers/testMetaPkgConfig/tester.nix @@ -0,0 +1,14 @@ +{ 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" +'' |