summary refs log tree commit diff
path: root/pkgs/development/libraries/libunwind/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/libunwind/default.nix')
-rw-r--r--pkgs/development/libraries/libunwind/default.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/development/libraries/libunwind/default.nix b/pkgs/development/libraries/libunwind/default.nix
index 70e6b698ec5..d6367fbd198 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" ];
@@ -26,7 +30,7 @@ stdenv.mkDerivation rec {
   doCheck = false; # fails
 
   meta = with stdenv.lib; {
-    homepage = https://www.nongnu.org/libunwind;
+    homepage = "https://www.nongnu.org/libunwind";
     description = "A portable and efficient API to determine the call-chain of a program";
     maintainers = with maintainers; [ orivej ];
     platforms = platforms.linux;