diff --git a/pkgs/development/libraries/libunwind/default.nix b/pkgs/development/libraries/libunwind/default.nix index 70e6b698ec5..f49bebe9b1a 100644 --- a/pkgs/development/libraries/libunwind/default.nix +++ b/pkgs/development/libraries/libunwind/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, autoreconfHook, xz }: +{ stdenv, lib, fetchurl, autoreconfHook, xz }: stdenv.mkDerivation rec { pname = "libunwind"; @@ -11,6 +11,10 @@ stdenv.mkDerivation rec { patches = [ ./backtrace-only-with-glibc.patch ]; + postPatch = lib.optionalString stdenv.hostPlatform.isMusl '' + substituteInPlace configure.ac --replace "-lgcc_s" "-lgcc_eh" + ''; + nativeBuildInputs = [ autoreconfHook ]; outputs = [ "out" "dev" ];