summary refs log tree commit diff
path: root/pkgs/tools/archivers/unzip
diff options
context:
space:
mode:
authorYury G. Kudryashov <urkud.urkud@gmail.com>2012-02-01 22:32:16 +0000
committerYury G. Kudryashov <urkud.urkud@gmail.com>2012-02-01 22:32:16 +0000
commit75262bcbed4fb93daeaefc2610e0ab3493b587fc (patch)
treef2dc6dc9d2f465498a91c59a85235b97f4db92bf /pkgs/tools/archivers/unzip
parent89de1150d55a69093d71b717b73422b3d3e36bd7 (diff)
downloadnixpkgs-75262bcbed4fb93daeaefc2610e0ab3493b587fc.tar
nixpkgs-75262bcbed4fb93daeaefc2610e0ab3493b587fc.tar.gz
nixpkgs-75262bcbed4fb93daeaefc2610e0ab3493b587fc.tar.bz2
nixpkgs-75262bcbed4fb93daeaefc2610e0ab3493b587fc.tar.lz
nixpkgs-75262bcbed4fb93daeaefc2610e0ab3493b587fc.tar.xz
nixpkgs-75262bcbed4fb93daeaefc2610e0ab3493b587fc.tar.zst
nixpkgs-75262bcbed4fb93daeaefc2610e0ab3493b587fc.zip
zip, unzip: add NLS support
svn path=/nixpkgs/trunk/; revision=31961
Diffstat (limited to 'pkgs/tools/archivers/unzip')
-rw-r--r--pkgs/tools/archivers/unzip/6.0.nix20
1 files changed, 15 insertions, 5 deletions
diff --git a/pkgs/tools/archivers/unzip/6.0.nix b/pkgs/tools/archivers/unzip/6.0.nix
index 803832f52d8..8abd813fb8f 100644
--- a/pkgs/tools/archivers/unzip/6.0.nix
+++ b/pkgs/tools/archivers/unzip/6.0.nix
@@ -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 {}))