tests.testers.hasPkgConfigModules: add testcases for versionCheck

This commit is contained in:
nicoo 2024-04-30 20:09:27 +00:00
parent 9245f1b706
commit 039bd24f54

View file

@ -1,9 +1,20 @@
# cd nixpkgs
# nix-build -A tests.testers.hasPkgConfigModule
{ lib, testers, zlib, openssl, runCommand }:
{ lib, testers, miniz, zlib, openssl, runCommand }:
lib.recurseIntoAttrs {
miniz-versions-match = testers.hasPkgConfigModules {
package = miniz;
versionCheck = true;
};
miniz-versions-mismatch = testers.testBuildFailure (testers.hasPkgConfigModules {
package = miniz;
version = "1.2.3";
versionCheck = true;
});
zlib-has-zlib = testers.hasPkgConfigModules {
package = zlib;
moduleNames = [ "zlib" ];