nixpkgs/pkgs/tools/compression/bzip2/default.nix

56 lines
1.6 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl
, linkStatic ? with stdenv.hostPlatform; isStatic || isCygwin
2020-01-02 22:57:56 +00:00
, autoreconfHook
}:
# 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.
stdenv.mkDerivation rec {
pname = "bzip2";
2021-02-20 19:06:26 +00:00
version = "1.0.6.0.2";
/* We use versions patched to use autotools style properly,
saving lots of trouble. */
src = fetchurl {
urls = map
(prefix: prefix + "/people/sbrabec/bzip2/tarballs/${pname}-${version}.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
];
2021-02-20 19:06:26 +00:00
sha256 = "sha256-FnhwNy4OHe8d5M6iYCClkxzcB/EHXg0veXwv43ZlxbA=";
};
2020-01-02 22:57:56 +00:00
nativeBuildInputs = [ autoreconfHook ];
patches = [
./CVE-2016-3189.patch
./cve-2019-12900.patch
];
postPatch = ''
sed -i -e '/<sys\\stat\.h>/s|\\|/|' bzip2.c
'';
outputs = [ "bin" "dev" "out" "man" ];
configureFlags =
2021-01-15 09:19:50 +00:00
lib.optionals linkStatic [ "--enable-static" "--disable-shared" ];
2019-05-12 16:26:58 +01:00
enableParallelBuilding = true;
meta = with lib; {
description = "High-quality data compression program";
2021-02-21 19:22:12 +00:00
homepage = "https://www.sourceware.org/bzip2";
changelog = "https://sourceware.org/git/?p=bzip2.git;a=blob;f=CHANGES;hb=HEAD";
2018-08-09 10:14:50 +01:00
license = licenses.bsdOriginal;
platforms = platforms.all;
2021-01-31 19:16:52 +00:00
maintainers = with maintainers; [ mic92 ];
};
}