2018-07-21 01:44:44 +01:00
|
|
|
{ stdenv, fetchurl
|
2018-08-20 20:11:29 +01:00
|
|
|
, linkStatic ? (stdenv.hostPlatform.system == "i686-cygwin")
|
2016-04-29 12:39:28 +01:00
|
|
|
}:
|
2011-12-12 17:06:31 +00:00
|
|
|
|
2016-04-29 12:39:28 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2011-12-12 17:06:31 +00:00
|
|
|
name = "bzip2-${version}";
|
2016-04-29 12:39:28 +01:00
|
|
|
version = "1.0.6.0.1";
|
2010-10-07 14:14:25 +01:00
|
|
|
|
2016-04-29 12:39:28 +01:00
|
|
|
/* We use versions patched to use autotools style properly,
|
|
|
|
saving lots of trouble. */
|
2003-11-04 08:36:32 +00:00
|
|
|
src = fetchurl {
|
2016-04-29 12:39:28 +01:00
|
|
|
urls = map
|
|
|
|
(prefix: prefix + "/people/sbrabec/bzip2/tarballs/${name}.tar.gz")
|
|
|
|
[
|
|
|
|
"http://ftp.uni-kl.de/pub/linux/suse"
|
|
|
|
"ftp://ftp.hs.uni-hamburg.de/pub/mirrors/suse"
|
|
|
|
"ftp://ftp.mplayerhq.hu/pub/linux/suse"
|
|
|
|
"http://ftp.suse.com/pub" # the original patched version but slow
|
|
|
|
];
|
|
|
|
sha256 = "0b5b5p8c7bslc6fslcr1nj9136412v3qcvbg6yxi9argq9g72v8c";
|
2003-11-04 08:36:32 +00:00
|
|
|
};
|
2006-10-24 23:40:33 +01:00
|
|
|
|
2016-12-01 00:30:52 +00:00
|
|
|
patches = [
|
|
|
|
./CVE-2016-3189.patch
|
|
|
|
];
|
|
|
|
|
2016-02-11 12:56:38 +00:00
|
|
|
postPatch = ''
|
2016-04-29 12:39:28 +01:00
|
|
|
sed -i -e '/<sys\\stat\.h>/s|\\|/|' bzip2.c
|
2015-11-17 15:16:14 +00:00
|
|
|
'';
|
2010-12-06 17:48:52 +00:00
|
|
|
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "bin" "dev" "out" "man" ];
|
2009-11-08 00:32:12 +00:00
|
|
|
|
2016-04-29 12:39:28 +01:00
|
|
|
configureFlags =
|
|
|
|
stdenv.lib.optionals linkStatic [ "--enable-static" "--disable-shared" ];
|
2010-10-07 14:14:25 +01:00
|
|
|
|
2019-05-12 16:26:58 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-08-09 10:14:50 +01:00
|
|
|
meta = with stdenv.lib; {
|
2016-06-20 11:53:46 +01:00
|
|
|
description = "High-quality data compression program";
|
2018-08-09 10:14:50 +01:00
|
|
|
license = licenses.bsdOriginal;
|
|
|
|
platforms = platforms.all;
|
2010-10-07 14:14:09 +01:00
|
|
|
maintainers = [];
|
2008-01-31 10:11:09 +00:00
|
|
|
};
|
2003-11-04 08:36:32 +00:00
|
|
|
}
|