zip, unzip: add NLS support
svn path=/nixpkgs/trunk/; revision=31961
This commit is contained in:
parent
89de1150d5
commit
75262bcbed
@ -1,6 +1,7 @@
|
||||
{ stdenv, fetchurl, bzip2 }:
|
||||
{ stdenv, fetchurl, bzip2
|
||||
, enableNLS ? false, libnatspec }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
stdenv.mkDerivation ({
|
||||
name = "unzip-6.0";
|
||||
|
||||
src = fetchurl {
|
||||
@ -8,11 +9,11 @@ stdenv.mkDerivation {
|
||||
sha256 = "0dxx11knh3nk95p2gg2ak777dd11pr7jx5das2g49l262scrcv83";
|
||||
};
|
||||
|
||||
buildInputs = [ bzip2 ];
|
||||
buildInputs = [ bzip2 ] ++ stdenv.lib.optional enableNLS libnatspec;
|
||||
|
||||
makefile = "unix/Makefile";
|
||||
|
||||
NIX_LDFLAGS = "-lbz2";
|
||||
NIX_LDFLAGS = [ "-lbz2" ] ++ stdenv.lib.optional enableNLS "-lnatspec";
|
||||
|
||||
buildFlags = "generic D_USE_BZ2=-DUSE_BZIP2 L_BZ2=-lbz2";
|
||||
|
||||
@ -24,4 +25,13 @@ stdenv.mkDerivation {
|
||||
license = "free"; # http://www.info-zip.org/license.html
|
||||
meta.platforms = stdenv.lib.platforms.all;
|
||||
};
|
||||
}
|
||||
} // (if enableNLS then {
|
||||
patches =
|
||||
[ ( 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";
|
||||
})
|
||||
];
|
||||
} else {}))
|
||||
|
@ -1,4 +1,4 @@
|
||||
{stdenv, fetchurl}:
|
||||
{ stdenv, fetchurl, libnatspec }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "zip-3.0";
|
||||
@ -12,8 +12,14 @@ stdenv.mkDerivation {
|
||||
|
||||
installFlags="-f unix/Makefile prefix=$(out) INSTALL=cp";
|
||||
|
||||
patches = [ ./natspec-gentoo.patch.bz2 ];
|
||||
|
||||
buildInputs = [ libnatspec ];
|
||||
|
||||
meta = {
|
||||
homepage = http://www.info-zip.org;
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
maintainer = [ stdenv.lib.maintainers.urkud ];
|
||||
};
|
||||
}
|
||||
|
||||
|
BIN
pkgs/tools/archivers/zip/natspec-gentoo.patch.bz2
Normal file
BIN
pkgs/tools/archivers/zip/natspec-gentoo.patch.bz2
Normal file
Binary file not shown.
@ -1535,6 +1535,8 @@ let
|
||||
|
||||
unzip = unzip60;
|
||||
|
||||
unzipNLS = unzip.override { enableNLS = true; };
|
||||
|
||||
unzip552 = callPackage ../tools/archivers/unzip/5.52.nix { };
|
||||
|
||||
unzip60 = callPackage ../tools/archivers/unzip/6.0.nix { };
|
||||
|
Loading…
Reference in New Issue
Block a user