From e0db156cfb4811f2d718ec62816b20a474e9a4ff Mon Sep 17 00:00:00 2001 From: Yuka Date: Wed, 14 Sep 2022 09:50:49 +0200 Subject: [PATCH] pkgsMusl.libtasn1: fix build (#191043) Patch borrowed from alpine to work around a specific test failure with musl libc Upstream is patching this test in their own CI because that CI is using alpine and thus musl https://github.com/gnutls/libtasn1/commit/06e7433c4e587e2ba6df521264138585a63d07c7#diff-037ea159eb0a7cb0ac23b851e66bee30fb838ee8d0d99fa331a1ba65283d37f7R293 (cherry picked from commit 8614d1dd20e05abbc7fc7284bb7431c9e5ff2f37) --- pkgs/development/libraries/libtasn1/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libtasn1/default.nix b/pkgs/development/libraries/libtasn1/default.nix index 2f0b1cdaad4a..2c66c2b56ed1 100644 --- a/pkgs/development/libraries/libtasn1/default.nix +++ b/pkgs/development/libraries/libtasn1/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, perl, texinfo }: +{ lib, stdenv, fetchurl, fetchpatch, perl, texinfo }: stdenv.mkDerivation rec { pname = "libtasn1"; @@ -9,6 +9,14 @@ stdenv.mkDerivation rec { sha256 = "sha256-FhPwrBz0hNbsDOO4wG1WJjzHJC8cI7MNgtI940WmP3o="; }; + # Patch borrowed from alpine to work around a specific test failure with musl libc + # Upstream is patching this test in their own CI because that CI is using alpine and thus musl + # https://github.com/gnutls/libtasn1/commit/06e7433c4e587e2ba6df521264138585a63d07c7#diff-037ea159eb0a7cb0ac23b851e66bee30fb838ee8d0d99fa331a1ba65283d37f7R293 + patches = lib.optional stdenv.hostPlatform.isMusl (fetchpatch { + url = "https://git.alpinelinux.org/aports/plain/main/libtasn1/failed-test.patch?id=aaed9995acc1511d54d5d93e1ea3776caf4aa488"; + sha256 = "sha256-GTfwqEelEsGtLEcBwGRfBZZz1vKXRfWXtMx/409YqX8="; + }); + outputs = [ "out" "dev" "devdoc" ]; outputBin = "dev";