From 525f8d9433a7916ba83843b70b33053a66ce912d Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 28 Mar 2024 09:49:11 +0100 Subject: [PATCH] pkgsStatic.gnutls: fix build We can't apply the upstream patch, because we'd have to redo the bootstrap that's already done in the release tarball, and that's very complicated. Fixes: b6d2a4294e4b ("gnutls: 3.8.3 -> 3.8.4 (medium security)") --- pkgs/development/libraries/gnutls/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/libraries/gnutls/default.nix b/pkgs/development/libraries/gnutls/default.nix index 681a810f8898..1c30c76ca7ab 100644 --- a/pkgs/development/libraries/gnutls/default.nix +++ b/pkgs/development/libraries/gnutls/default.nix @@ -96,6 +96,12 @@ stdenv.mkDerivation rec { 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.sh + '' + lib.optionalString stdenv.hostPlatform.isStatic '' + # Adapted from https://gitlab.com/gnutls/gnutls/-/commit/d214cd4570fb1559a20e941bb7ceac7df52e96d3 + # Can be removed with 3.8.5+. + sed -i lib/nettle/backport/rsa-sign-tr.c -e \ + '/^#include /i\ + #define nettle_rsa_compute_root_tr _gnutls_nettle_backport_rsa_compute_root_tr' ''; preConfigure = "patchShebangs .";