diff --git a/pkgs/by-name/gn/gnutls/package.nix b/pkgs/by-name/gn/gnutls/package.nix index f47370729a2e..3a7326cc212c 100644 --- a/pkgs/by-name/gn/gnutls/package.nix +++ b/pkgs/by-name/gn/gnutls/package.nix @@ -117,6 +117,13 @@ stdenv.mkDerivation rec { # https://gitlab.com/gnutls/gnutls/-/issues/1721 + '' sed '2iexit 77' -i tests/system-override-compress-cert.sh + '' + # Upstream packaging bug: stamp_error_codes is missing from EXTRA_DIST in + # the release tarball, causing the build to try regenerating it by compiling + # and running `errcodes` — which fails when cross-compiling since the binary + # is for the target architecture. https://gitlab.com/gnutls/gnutls/-/issues/1797 + + lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' + touch doc/stamp_error_codes ''; preConfigure = "patchShebangs .";