summary refs log tree commit diff
path: root/pkgs/development/libraries/libzip
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas@tuxera.com>2016-04-27 03:46:36 +0300
committerTuomas Tynkkynen <tuomas@tuxera.com>2016-04-27 03:54:31 +0300
commit2c32607650ddb6e6adbc2b22d785139f065eb18c (patch)
tree794964ecc9b5e55400a964e033d58ab889436123 /pkgs/development/libraries/libzip
parent387915e99c5c90d8200ef3e86e9f42d8568dbf31 (diff)
libzip: 0.11.2 -> 1.1.2
Diffstat (limited to 'pkgs/development/libraries/libzip')
-rw-r--r--pkgs/development/libraries/libzip/default.nix21
1 files changed, 9 insertions, 12 deletions
diff --git a/pkgs/development/libraries/libzip/default.nix b/pkgs/development/libraries/libzip/default.nix
index fff155ca81e77..2afc0e47ca321 100644
--- a/pkgs/development/libraries/libzip/default.nix
+++ b/pkgs/development/libraries/libzip/default.nix
@@ -1,26 +1,23 @@
-{ stdenv, fetchurl, zlib }:
+{ stdenv, fetchurl, perl, zlib }:
 
 stdenv.mkDerivation rec {
-  name = "libzip-0.11.2";
+  name = "libzip-${version}";
+  version = "1.1.2";
 
   src = fetchurl {
     url = "http://www.nih.at/libzip/${name}.tar.gz";
-    sha256 = "1mcqrz37vjrfr4gnss37z1m7xih9x9miq3mms78zf7wn7as1znw3";
+    sha256 = "08b26qbfxq6z5xf36y1d8insm5valv83dhj933iag6man04prb2r";
   };
 
   outputs = [ "dev" "out" ];
 
-  # fix CVE-2015-2331 taken from Debian patch:
-  # https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=12;filename=libzip-0.11.2-1.2-nmu.diff;att=1;bug=780756
-  postPatch = ''
-    substituteInPlace lib/zip_dirent.c --replace \
-      'else if ((cd->entry=(struct zip_entry *)' \
-      'else if (nentry > ((size_t)-1)/sizeof(*(cd->entry)) || (cd->entry=(struct zip_entry *)'
-    cat lib/zip_dirent.c
-  '';
-
+  nativeBuildInputs = [ perl ];
   propagatedBuildInputs = [ zlib ];
 
+  preInstall = ''
+    patchShebangs man/handle_links
+  '';
+
   # At least mysqlWorkbench cannot find zipconf.h; I think also openoffice
   # had this same problem.  This links it somewhere that mysqlworkbench looks.
   postInstall = ''