lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 24.11-pre 65 lines 1.7 kB view raw
1# cd nixpkgs 2# nix-build -A tests.testers.hasPkgConfigModules 3{ lib, testers, miniz, zlib, openssl, runCommand }: 4 5lib.recurseIntoAttrs { 6 7 miniz-versions-match = testers.hasPkgConfigModules { 8 package = miniz; 9 versionCheck = true; 10 }; 11 12 miniz-versions-mismatch = testers.testBuildFailure (testers.hasPkgConfigModules { 13 package = miniz; 14 version = "1.2.3"; # Deliberately-incorrect version number 15 versionCheck = true; 16 }); 17 18 miniz-no-versionCheck = testers.hasPkgConfigModules { 19 package = miniz; 20 version = "1.2.3"; # Deliberately-incorrect version number 21 }; 22 23 zlib-has-zlib = testers.hasPkgConfigModules { 24 package = zlib; 25 moduleNames = [ "zlib" ]; 26 }; 27 28 zlib-has-meta-pkgConfigModules = testers.hasPkgConfigModules { 29 package = zlib; 30 }; 31 32 openssl-has-openssl = testers.hasPkgConfigModules { 33 package = openssl; 34 moduleNames = [ "openssl" ]; 35 }; 36 37 openssl-has-all-meta-pkgConfigModules = testers.hasPkgConfigModules { 38 package = openssl; 39 }; 40 41 zlib-does-not-have-ylib = runCommand "zlib-does-not-have-ylib" { 42 failed = testers.testBuildFailure ( 43 testers.hasPkgConfigModules { 44 package = zlib; 45 moduleNames = [ "ylib" ]; 46 } 47 ); 48 } '' 49 echo 'it logs a relevant error message' 50 { 51 grep -F "pkg-config module ylib was not found" $failed/testBuildFailure.log 52 } 53 54 echo 'it logs which pkg-config modules are available, to be helpful' 55 { 56 # grep -v: the string zlib does also occur in a store path in an earlier message, which isn't particularly helpful 57 grep -v "checking pkg-config module" < $failed/testBuildFailure.log \ 58 | grep -F "zlib" 59 } 60 61 # done 62 touch $out 63 ''; 64 65}