2015-11-04 09:26:11 +01:00
|
|
|
{ stdenv, fetchurl, libtool, autoconf, automake, pkgconfig, gnum4 }:
|
2011-12-12 18:06:31 +01:00
|
|
|
|
2015-11-17 16:16:14 +01:00
|
|
|
let
|
|
|
|
version = "1.0.6";
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
name = "bzip2-${version}";
|
2010-10-07 15:14:25 +02:00
|
|
|
|
2003-11-04 09:36:32 +01:00
|
|
|
src = fetchurl {
|
2011-12-12 18:06:31 +01:00
|
|
|
url = "http://www.bzip.org/${version}/bzip2-${version}.tar.gz";
|
|
|
|
sha256 = "1kfrc7f0ja9fdn6j1y6yir6li818npy6217hvr3wzmnmzhs8z152";
|
2003-11-04 09:36:32 +01:00
|
|
|
};
|
2006-10-25 00:40:33 +02:00
|
|
|
|
2015-11-04 09:26:11 +01:00
|
|
|
patches = [
|
|
|
|
# original upstream for the autoconf patch is here:
|
|
|
|
# http://ftp.suse.com/pub/people/sbrabec/bzip2/for_downstream/bzip2-1.0.6-autoconfiscated.patch
|
|
|
|
# but we get the mingw-builds version of the patch, which fixes
|
|
|
|
# a few more issues
|
|
|
|
(fetchurl {
|
|
|
|
url = "https://raw.githubusercontent.com/niXman/mingw-builds/17ae841dcf6e72badad7941a06d631edaf687436/patches/bzip2/bzip2-1.0.6-autoconfiscated.patch";
|
|
|
|
sha256 = "1flbd3i8vg9kzq0a712qcg9j2c4ymnqvgd0ldyafpzvbqj1iicnp";
|
|
|
|
})
|
|
|
|
];
|
2015-11-17 16:16:14 +01:00
|
|
|
|
2015-11-04 09:26:11 +01:00
|
|
|
patchFlags = "-p0";
|
2015-11-17 16:16:14 +01:00
|
|
|
|
2015-11-04 09:26:11 +01:00
|
|
|
nativeBuildInputs = [ libtool autoconf automake gnum4 pkgconfig ];
|
2015-11-17 16:16:14 +01:00
|
|
|
|
2015-11-04 09:26:11 +01:00
|
|
|
preConfigure = "sh ./autogen.sh";
|
2009-11-08 01:32:12 +01:00
|
|
|
|
2015-11-04 09:26:11 +01:00
|
|
|
crossAttrs = {
|
|
|
|
# https://github.com/niXman/mingw-builds/blob/master/patches/bzip2/bzip2-1.0.5-slash.patch
|
|
|
|
postPatch = ''
|
|
|
|
sed -i -e '/<sys\\stat\.h>/s|\\|/|' bzip2.c
|
|
|
|
'';
|
|
|
|
};
|
2010-10-07 15:14:25 +02:00
|
|
|
|
2008-01-31 11:11:09 +01:00
|
|
|
meta = {
|
2010-10-07 15:14:09 +02:00
|
|
|
homepage = "http://www.bzip.org";
|
|
|
|
description = "high-quality data compression program";
|
|
|
|
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
maintainers = [];
|
2008-01-31 11:11:09 +01:00
|
|
|
};
|
2003-11-04 09:36:32 +01:00
|
|
|
}
|