tests.testers.hasPkgConfigModules: test the versionCheck parameter

Shell script is currently buggy and effectively ignores the value, always enforcing version match:
  https://github.com/NixOS/nixpkgs/pull/307770#issuecomment-2102586718
This commit is contained in:
nicoo 2024-05-12 13:47:20 +00:00
parent db4171f3e2
commit 1d4d9facbc

View File

@ -11,10 +11,15 @@ lib.recurseIntoAttrs {
miniz-versions-mismatch = testers.testBuildFailure (testers.hasPkgConfigModules {
package = miniz;
version = "1.2.3";
version = "1.2.3"; # Deliberately-incorrect version number
versionCheck = true;
});
miniz-no-versionCheck = testers.hasPkgConfigModules {
package = miniz;
version = "1.2.3"; # Deliberately-incorrect version number
};
zlib-has-zlib = testers.hasPkgConfigModules {
package = zlib;
moduleNames = [ "zlib" ];