summary refs log tree commit diff
path: root/pkgs/development/libraries/gnutls
diff options
context:
space:
mode:
authorFabian Möller <fabianm88@gmail.com>2020-05-06 16:58:58 +0200
committerFabian Möller <fabianm88@gmail.com>2020-05-06 17:37:55 +0200
commit0665c8776a5328f6cfe67ee554452dde5f4f9385 (patch)
tree9f5d0af35e5593095e502976c1af614e1dc1daa1 /pkgs/development/libraries/gnutls
parentd49615dc55df73053e1d7664de612be82093a101 (diff)
downloadnixpkgs-0665c8776a5328f6cfe67ee554452dde5f4f9385.tar
nixpkgs-0665c8776a5328f6cfe67ee554452dde5f4f9385.tar.gz
nixpkgs-0665c8776a5328f6cfe67ee554452dde5f4f9385.tar.bz2
nixpkgs-0665c8776a5328f6cfe67ee554452dde5f4f9385.tar.lz
nixpkgs-0665c8776a5328f6cfe67ee554452dde5f4f9385.tar.xz
nixpkgs-0665c8776a5328f6cfe67ee554452dde5f4f9385.tar.zst
nixpkgs-0665c8776a5328f6cfe67ee554452dde5f4f9385.zip
gnutls: fix musl build
`musl` produces a different output than `glibc` during some tests, which
let's them fail.

Using `getpass(3)` under `musl` when `stdin` is not a tty omits the
prompt, which the `certtool` test expects to find.

See https://gitlab.com/gnutls/gnutls/-/issues/945
Diffstat (limited to 'pkgs/development/libraries/gnutls')
-rw-r--r--pkgs/development/libraries/gnutls/default.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkgs/development/libraries/gnutls/default.nix b/pkgs/development/libraries/gnutls/default.nix
index cffd5459b3a..257e56cc18f 100644
--- a/pkgs/development/libraries/gnutls/default.nix
+++ b/pkgs/development/libraries/gnutls/default.nix
@@ -48,6 +48,8 @@ stdenv.mkDerivation {
     sed '2iexit 77' -i tests/{pkgconfig,fastopen}.sh
     sed '/^void doit(void)/,/^{/ s/{/{ exit(77);/' -i tests/{trust-store,psk-file}.c
     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
+  '' + lib.optionalString stdenv.hostPlatform.isMusl '' # See https://gitlab.com/gnutls/gnutls/-/issues/945
+    sed '2iecho "certtool tests skipped in musl build"\nexit 0' -i tests/cert-tests/certtool
   '';
 
   preConfigure = "patchShebangs .";