2018-07-21 00:44:44 +00:00
|
|
|
{ stdenv, fetchurl
|
2020-12-20 06:11:26 +00:00
|
|
|
, linkStatic ? with stdenv.hostPlatform; isStatic || isCygwin
|
2020-01-02 22:57:56 +00:00
|
|
|
, autoreconfHook
|
2016-04-29 11:39:28 +00:00
|
|
|
}:
|
2011-12-12 17:06:31 +00:00
|
|
|
|
2020-06-26 20:44:45 +00:00
|
|
|
# Note: this package is used for bootstrapping fetchurl, and thus
|
|
|
|
# cannot use fetchpatch! All mutable patches (generated by GitHub or
|
|
|
|
# cgit) that are needed here should be included directly in Nixpkgs as
|
|
|
|
# files.
|
|
|
|
|
2016-04-29 11:39:28 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "bzip2";
|
2016-04-29 11:39:28 +00:00
|
|
|
version = "1.0.6.0.1";
|
2010-10-07 13:14:25 +00:00
|
|
|
|
2016-04-29 11:39:28 +00: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 11:39:28 +00:00
|
|
|
urls = map
|
2019-08-15 12:41:18 +00:00
|
|
|
(prefix: prefix + "/people/sbrabec/bzip2/tarballs/${pname}-${version}.tar.gz")
|
2016-04-29 11:39:28 +00:00
|
|
|
[
|
|
|
|
"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 22:40:33 +00:00
|
|
|
|
2020-01-02 22:57:56 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
|
2016-12-01 00:30:52 +00:00
|
|
|
patches = [
|
|
|
|
./CVE-2016-3189.patch
|
2019-06-22 09:53:12 +00:00
|
|
|
./cve-2019-12900.patch
|
2016-12-01 00:30:52 +00:00
|
|
|
];
|
|
|
|
|
2016-02-11 12:56:38 +00:00
|
|
|
postPatch = ''
|
2016-04-29 11:39:28 +00: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 00:30:01 +00:00
|
|
|
outputs = [ "bin" "dev" "out" "man" ];
|
2009-11-08 00:32:12 +00:00
|
|
|
|
2016-04-29 11:39:28 +00:00
|
|
|
configureFlags =
|
|
|
|
stdenv.lib.optionals linkStatic [ "--enable-static" "--disable-shared" ];
|
2010-10-07 13:14:25 +00:00
|
|
|
|
2019-05-12 15:26:58 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-08-09 09:14:50 +00:00
|
|
|
meta = with stdenv.lib; {
|
2016-06-20 10:53:46 +00:00
|
|
|
description = "High-quality data compression program";
|
2018-08-09 09:14:50 +00:00
|
|
|
license = licenses.bsdOriginal;
|
|
|
|
platforms = platforms.all;
|
2010-10-07 13:14:09 +00:00
|
|
|
maintainers = [];
|
2008-01-31 10:11:09 +00:00
|
|
|
};
|
2003-11-04 08:36:32 +00:00
|
|
|
}
|