2012-02-01 22:32:16 +00:00
|
|
|
{ stdenv, fetchurl, bzip2
|
|
|
|
, enableNLS ? false, libnatspec }:
|
2009-10-07 12:18:54 +01:00
|
|
|
|
2014-06-30 12:57:20 +01:00
|
|
|
stdenv.mkDerivation {
|
2009-10-07 12:18:54 +01:00
|
|
|
name = "unzip-6.0";
|
2014-06-30 12:57:20 +01:00
|
|
|
|
2009-10-07 12:18:54 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = mirror://sourceforge/infozip/unzip60.tar.gz;
|
|
|
|
sha256 = "0dxx11knh3nk95p2gg2ak777dd11pr7jx5das2g49l262scrcv83";
|
|
|
|
};
|
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
2015-12-23 01:59:47 +00:00
|
|
|
|
2015-01-03 13:52:28 +00:00
|
|
|
patches = [
|
|
|
|
./CVE-2014-8139.diff
|
|
|
|
./CVE-2014-8140.diff
|
|
|
|
./CVE-2014-8141.diff
|
2015-02-04 10:17:09 +00:00
|
|
|
./CVE-2014-9636.diff
|
2015-11-01 08:39:10 +00:00
|
|
|
./CVE-2015-7696.diff
|
|
|
|
./CVE-2015-7697.diff
|
2016-12-14 22:52:09 +00:00
|
|
|
./CVE-2014-9913.patch
|
|
|
|
./CVE-2016-9844.patch
|
2015-01-03 13:52:28 +00:00
|
|
|
] ++ stdenv.lib.optional enableNLS
|
2014-06-30 12:57:20 +01:00
|
|
|
(fetchurl {
|
|
|
|
url = "http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-arch/unzip/files/unzip-6.0-natspec.patch?revision=1.1";
|
|
|
|
name = "unzip-6.0-natspec.patch";
|
|
|
|
sha256 = "67ab260ae6adf8e7c5eda2d1d7846929b43562943ec4aff629bd7018954058b1";
|
|
|
|
});
|
|
|
|
|
2013-05-26 12:22:55 +01:00
|
|
|
nativeBuildInputs = [ bzip2 ];
|
2012-02-01 22:32:16 +00:00
|
|
|
buildInputs = [ bzip2 ] ++ stdenv.lib.optional enableNLS libnatspec;
|
2009-10-07 12:18:54 +01:00
|
|
|
|
|
|
|
makefile = "unix/Makefile";
|
|
|
|
|
2012-02-01 22:32:16 +00:00
|
|
|
NIX_LDFLAGS = [ "-lbz2" ] ++ stdenv.lib.optional enableNLS "-lnatspec";
|
2009-10-07 12:18:54 +01:00
|
|
|
|
|
|
|
buildFlags = "generic D_USE_BZ2=-DUSE_BZIP2 L_BZ2=-lbz2";
|
|
|
|
|
2011-08-16 19:21:05 +01:00
|
|
|
preConfigure = ''
|
|
|
|
sed -i -e 's@CF="-O3 -Wall -I. -DASM_CRC $(LOC)"@CF="-O3 -Wall -I. -DASM_CRC -DLARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(LOC)"@' unix/Makefile
|
|
|
|
'';
|
|
|
|
|
2009-10-07 12:18:54 +01:00
|
|
|
installFlags = "prefix=$(out)";
|
|
|
|
|
2014-06-30 13:12:35 +01:00
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
|
2009-10-07 12:18:54 +01:00
|
|
|
meta = {
|
|
|
|
homepage = http://www.info-zip.org;
|
|
|
|
description = "An extraction utility for archives compressed in .zip format";
|
2014-11-06 00:44:33 +00:00
|
|
|
license = stdenv.lib.licenses.free; # http://www.info-zip.org/license.html
|
2012-02-14 14:33:10 +00:00
|
|
|
platforms = stdenv.lib.platforms.all;
|
2009-10-07 12:18:54 +01:00
|
|
|
};
|
2014-06-30 12:57:20 +01:00
|
|
|
}
|