2 # nix-build -A tests.testers.hasPkgConfigModules
3 { lib, testers, miniz, zlib, openssl, runCommand }:
7 miniz-versions-match = testers.hasPkgConfigModules {
12 miniz-versions-mismatch = testers.testBuildFailure (testers.hasPkgConfigModules {
18 zlib-has-zlib = testers.hasPkgConfigModules {
20 moduleNames = [ "zlib" ];
23 zlib-has-meta-pkgConfigModules = testers.hasPkgConfigModules {
27 openssl-has-openssl = testers.hasPkgConfigModules {
29 moduleNames = [ "openssl" ];
32 openssl-has-all-meta-pkgConfigModules = testers.hasPkgConfigModules {
36 zlib-does-not-have-ylib = runCommand "zlib-does-not-have-ylib" {
37 failed = testers.testBuildFailure (
38 testers.hasPkgConfigModules {
40 moduleNames = [ "ylib" ];
44 echo 'it logs a relevant error message'
46 grep -F "pkg-config module ylib was not found" $failed/testBuildFailure.log
49 echo 'it logs which pkg-config modules are available, to be helpful'
51 # grep -v: the string zlib does also occur in a store path in an earlier message, which isn't particularly helpful
52 grep -v "checking pkg-config module" < $failed/testBuildFailure.log \