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