3
0
Fork 0
forked from mirrors/nixpkgs

gnutls: fix (failing) p11-kit test

The p11-kit-trust test looks in /usr/lib for pkcs11 modules.  As a
result it is unnecessarily skipped on sandboxed builds, and fails on
unsandboxed builds with a system p11-kit.  Replace hard-coded /usr/lib
paths with pkg-config.
This commit is contained in:
Dylan Simon 2018-01-27 12:39:02 -05:00
parent e39f211575
commit 85f81f5ef5

View file

@ -11,9 +11,10 @@ callPackage ./generic.nix (args // rec {
# Skip two tests introduced in 3.5.11. Probable reasons of failure:
# - pkgconfig: building against the result won't work before installing
# - trust-store: default trust store path (/etc/ssl/...) is missing in sandbox
# Change p11-kit test to use pkg-config to find p11-kit
postPatch = ''
sed '2iexit 77' -i tests/pkgconfig.sh
sed '/^void doit(void)/,$s/{/{ exit(77);/; t' -i tests/trust-store.c
# TODO: remove just this line on some rebuild
sed 's:/usr/lib64/pkcs11/ /usr/lib/pkcs11/ /usr/lib/x86_64-linux-gnu/pkcs11/:`pkg-config --variable=p11_module_path p11-kit-1`:' -i tests/p11-kit-trust.sh
'';
})