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 }: 1 + { stdenv, fetchurl, bzip2 2 + , enableNLS ? false, libnatspec }: 2 3 3 - stdenv.mkDerivation { 4 + stdenv.mkDerivation ({ 4 5 name = "unzip-6.0"; 5 6 6 7 src = fetchurl { ··· 8 9 sha256 = "0dxx11knh3nk95p2gg2ak777dd11pr7jx5das2g49l262scrcv83"; 9 10 }; 10 11 11 - buildInputs = [ bzip2 ]; 12 + buildInputs = [ bzip2 ] ++ stdenv.lib.optional enableNLS libnatspec; 12 13 13 14 makefile = "unix/Makefile"; 14 15 15 - NIX_LDFLAGS = "-lbz2"; 16 + NIX_LDFLAGS = [ "-lbz2" ] ++ stdenv.lib.optional enableNLS "-lnatspec"; 16 17 17 18 buildFlags = "generic D_USE_BZ2=-DUSE_BZIP2 L_BZ2=-lbz2"; 18 19 ··· 24 25 license = "free"; # http://www.info-zip.org/license.html 25 26 meta.platforms = stdenv.lib.platforms.all; 26 27 }; 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}: 1 + { stdenv, fetchurl, libnatspec }: 2 2 3 3 stdenv.mkDerivation { 4 4 name = "zip-3.0"; ··· 12 12 13 13 installFlags="-f unix/Makefile prefix=$(out) INSTALL=cp"; 14 14 15 + patches = [ ./natspec-gentoo.patch.bz2 ]; 16 + 17 + buildInputs = [ libnatspec ]; 18 + 15 19 meta = { 16 20 homepage = http://www.info-zip.org; 21 + platforms = stdenv.lib.platforms.all; 22 + maintainer = [ stdenv.lib.maintainers.urkud ]; 17 23 }; 18 24 } 19 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 1535 1536 1536 unzip = unzip60; 1537 1537 1538 + unzipNLS = unzip.override { enableNLS = true; }; 1539 + 1538 1540 unzip552 = callPackage ../tools/archivers/unzip/5.52.nix { }; 1539 1541 1540 1542 unzip60 = callPackage ../tools/archivers/unzip/6.0.nix { };