summary refs log tree commit diff
path: root/pkgs/development/libraries/libunwind/default.nix
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2015-10-03 13:33:13 +0200
committerVladimír Čunát <vcunat@gmail.com>2015-10-03 13:33:37 +0200
commit5227fb1dd53fcb5918b9342dff4868f4ad68427e (patch)
treed6cd521e3f67944031216a27f740f28f22b73b41 /pkgs/development/libraries/libunwind/default.nix
parentd6dd3b8bd1eaeeb21dfdb5051cd4732c748ce5d7 (diff)
parent33373d939a19f465228ddede6d38ce9032b5916b (diff)
downloadnixpkgs-5227fb1dd53fcb5918b9342dff4868f4ad68427e.tar
nixpkgs-5227fb1dd53fcb5918b9342dff4868f4ad68427e.tar.gz
nixpkgs-5227fb1dd53fcb5918b9342dff4868f4ad68427e.tar.bz2
nixpkgs-5227fb1dd53fcb5918b9342dff4868f4ad68427e.tar.lz
nixpkgs-5227fb1dd53fcb5918b9342dff4868f4ad68427e.tar.xz
nixpkgs-5227fb1dd53fcb5918b9342dff4868f4ad68427e.tar.zst
nixpkgs-5227fb1dd53fcb5918b9342dff4868f4ad68427e.zip
Merge commit staging+systemd into closure-size
Many non-conflict problems weren't (fully) resolved in this commit yet.
Diffstat (limited to 'pkgs/development/libraries/libunwind/default.nix')
-rw-r--r--pkgs/development/libraries/libunwind/default.nix20
1 files changed, 16 insertions, 4 deletions
diff --git a/pkgs/development/libraries/libunwind/default.nix b/pkgs/development/libraries/libunwind/default.nix
index b08c169993e..3fc8b508559 100644
--- a/pkgs/development/libraries/libunwind/default.nix
+++ b/pkgs/development/libraries/libunwind/default.nix
@@ -1,14 +1,20 @@
-{ stdenv, fetchurl, xz }:
+{ stdenv, fetchurl, fetchpatch, xz }:
 
 stdenv.mkDerivation rec {
   name = "libunwind-1.1";
-  
+
   src = fetchurl {
     url = "mirror://savannah/libunwind/${name}.tar.gz";
     sha256 = "16nhx2pahh9d62mvszc88q226q5lwjankij276fxwrm8wb50zzlx";
   };
 
-  patches = [ ./libunwind-1.1-lzma.patch ];
+  patches = [ ./libunwind-1.1-lzma.patch ./cve-2015-3239.patch
+              # https://lists.nongnu.org/archive/html/libunwind-devel/2014-04/msg00000.html
+              (fetchpatch {
+                url = "https://raw.githubusercontent.com/dropbox/pyston/1b2e676417b0f5f17526ece0ed840aa88c744145/libunwind_patches/0001-Change-the-RBP-validation-heuristic-to-allow-size-0-.patch";
+                sha256 = "1a0fsgfxmgd218nscswx7pgyb7rcn2gh6566252xhfvzhgn5i4ha";
+              })
+            ];
 
   postPatch = ''
     sed -i -e '/LIBLZMA/s:-lzma:-llzma:' configure
@@ -21,7 +27,13 @@ stdenv.mkDerivation rec {
     mkdir -p "$out/lib"
     touch "$out/lib/libunwind-generic.so"
   '';
-  
+
+  postInstall = ''
+    find $out -name \*.la | while read file; do
+      sed -i 's,-llzma,${xz}/lib/liblzma.la,' $file
+    done
+  '';
+
   meta = with stdenv.lib; {
     homepage = http://www.nongnu.org/libunwind;
     description = "A portable and efficient API to determine the call-chain of a program";