zip, unzip: add NLS support

svn path=/nixpkgs/trunk/; revision=31961

+24 -6
+15 -5
pkgs/tools/archivers/unzip/6.0.nix
··· 1 - { stdenv, fetchurl, bzip2 }: 2 3 - stdenv.mkDerivation { 4 name = "unzip-6.0"; 5 6 src = fetchurl { ··· 8 sha256 = "0dxx11knh3nk95p2gg2ak777dd11pr7jx5das2g49l262scrcv83"; 9 }; 10 11 - buildInputs = [ bzip2 ]; 12 13 makefile = "unix/Makefile"; 14 15 - NIX_LDFLAGS = "-lbz2"; 16 17 buildFlags = "generic D_USE_BZ2=-DUSE_BZIP2 L_BZ2=-lbz2"; 18 ··· 24 license = "free"; # http://www.info-zip.org/license.html 25 meta.platforms = stdenv.lib.platforms.all; 26 }; 27 - }
··· 1 + { stdenv, fetchurl, bzip2 2 + , enableNLS ? false, libnatspec }: 3 4 + stdenv.mkDerivation ({ 5 name = "unzip-6.0"; 6 7 src = fetchurl { ··· 9 sha256 = "0dxx11knh3nk95p2gg2ak777dd11pr7jx5das2g49l262scrcv83"; 10 }; 11 12 + buildInputs = [ bzip2 ] ++ stdenv.lib.optional enableNLS libnatspec; 13 14 makefile = "unix/Makefile"; 15 16 + NIX_LDFLAGS = [ "-lbz2" ] ++ stdenv.lib.optional enableNLS "-lnatspec"; 17 18 buildFlags = "generic D_USE_BZ2=-DUSE_BZIP2 L_BZ2=-lbz2"; 19 ··· 25 license = "free"; # http://www.info-zip.org/license.html 26 meta.platforms = stdenv.lib.platforms.all; 27 }; 28 + } // (if enableNLS then { 29 + patches = 30 + [ ( fetchurl { 31 + url = 32 + "http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-arch/unzip/files/unzip-6.0-natspec.patch?revision=1.1"; 33 + name = "unzip-6.0-natspec.patch"; 34 + sha256 = "67ab260ae6adf8e7c5eda2d1d7846929b43562943ec4aff629bd7018954058b1"; 35 + }) 36 + ]; 37 + } else {}))
+7 -1
pkgs/tools/archivers/zip/default.nix
··· 1 - {stdenv, fetchurl}: 2 3 stdenv.mkDerivation { 4 name = "zip-3.0"; ··· 12 13 installFlags="-f unix/Makefile prefix=$(out) INSTALL=cp"; 14 15 meta = { 16 homepage = http://www.info-zip.org; 17 }; 18 } 19
··· 1 + { stdenv, fetchurl, libnatspec }: 2 3 stdenv.mkDerivation { 4 name = "zip-3.0"; ··· 12 13 installFlags="-f unix/Makefile prefix=$(out) INSTALL=cp"; 14 15 + patches = [ ./natspec-gentoo.patch.bz2 ]; 16 + 17 + buildInputs = [ libnatspec ]; 18 + 19 meta = { 20 homepage = http://www.info-zip.org; 21 + platforms = stdenv.lib.platforms.all; 22 + maintainer = [ stdenv.lib.maintainers.urkud ]; 23 }; 24 } 25
pkgs/tools/archivers/zip/natspec-gentoo.patch.bz2

This is a binary file and will not be displayed.

+2
pkgs/top-level/all-packages.nix
··· 1535 1536 unzip = unzip60; 1537 1538 unzip552 = callPackage ../tools/archivers/unzip/5.52.nix { }; 1539 1540 unzip60 = callPackage ../tools/archivers/unzip/6.0.nix { };
··· 1535 1536 unzip = unzip60; 1537 1538 + unzipNLS = unzip.override { enableNLS = true; }; 1539 + 1540 unzip552 = callPackage ../tools/archivers/unzip/5.52.nix { }; 1541 1542 unzip60 = callPackage ../tools/archivers/unzip/6.0.nix { };