1{ stdenv, fetchurl, autoreconfHook, xz }:
2
3stdenv.mkDerivation rec {
4 name = "libunwind-${version}";
5 version = "1.3.1";
6
7 src = fetchurl {
8 url = "mirror://savannah/libunwind/${name}.tar.gz";
9 sha256 = "1y0l08k6ak1mqbfj6accf9s5686kljwgsl4vcqpxzk5n74wpm6a3";
10 };
11
12 patches = [ ./backtrace-only-with-glibc.patch ];
13
14 nativeBuildInputs = [ autoreconfHook ];
15
16 outputs = [ "out" "dev" ];
17
18 propagatedBuildInputs = [ xz ];
19
20 postInstall = ''
21 find $out -name \*.la | while read file; do
22 sed -i 's,-llzma,${xz.out}/lib/liblzma.la,' $file
23 done
24 '';
25
26 doCheck = false; # fails
27
28 meta = with stdenv.lib; {
29 homepage = https://www.nongnu.org/libunwind;
30 description = "A portable and efficient API to determine the call-chain of a program";
31 maintainers = with maintainers; [ orivej ];
32 platforms = platforms.linux;
33 license = licenses.mit;
34 };
35
36 passthru.supportsHost = !stdenv.hostPlatform.isRiscV;
37}