1{ stdenv, fetchurl, enableNLS ? true, libnatspec ? null, libiconv }:
2
3assert enableNLS -> libnatspec != null;
4
5stdenv.mkDerivation {
6 name = "zip-3.0";
7
8 src = fetchurl {
9 urls = [
10 ftp://ftp.info-zip.org/pub/infozip/src/zip30.tgz
11 http://pkgs.fedoraproject.org/repo/pkgs/zip/zip30.tar.gz/7b74551e63f8ee6aab6fbc86676c0d37/zip30.tar.gz
12 ];
13 sha256 = "0sb3h3067pzf3a7mlxn1hikpcjrsvycjcnj9hl9b1c3ykcgvps7h";
14 };
15
16 # should be makeFlags on all archs, not changed yet to prevent rebuild
17 buildFlags="-f unix/Makefile generic";
18 makeFlags = if stdenv.isCygwin then "-f unix/Makefile ${if stdenv.isCygwin then "cygwin" else "generic"}" else null;
19
20 installFlags="-f unix/Makefile prefix=$(out) INSTALL=cp";
21
22 patches = if (enableNLS && !stdenv.isCygwin) then [ ./natspec-gentoo.patch.bz2 ] else [];
23
24 buildInputs = stdenv.lib.optional enableNLS libnatspec
25 ++ stdenv.lib.optional stdenv.isCygwin libiconv;
26
27 meta = {
28 description = "Compressor/archiver for creating and modifying zipfiles";
29 homepage = http://www.info-zip.org;
30 platforms = stdenv.lib.platforms.all;
31 maintainers = [ stdenv.lib.maintainers.urkud ];
32 };
33}