lol

iconv: remove usage on Linux in several packages

This fixes builds after #4419. Thanks to @vbgl for the original commit;
I changed that as I'm not sure whether passing null values to buildInputs is clean.

CC maintainers: @coroa, @peti, @phreedom, @robberer, @jcumming.

+30 -22
+3 -3
pkgs/applications/misc/gammu/default.nix
··· 1 1 { stdenv, fetchurl, python, pkgconfig, cmake, bluez, libusb1, curl 2 - , libiconv, gettext, sqlite }: 2 + , libiconvOrEmpty, gettext, sqlite }: 3 3 4 4 with stdenv.lib; 5 5 ··· 14 14 15 15 patches = [ ./bashcomp-dir.patch ]; 16 16 17 - buildInputs = [ python pkgconfig cmake bluez libusb1 curl libiconv 18 - gettext sqlite ]; 17 + buildInputs = [ python pkgconfig cmake bluez libusb1 curl gettext sqlite ] 18 + ++ libiconvOrEmpty; 19 19 20 20 enableParallelBuilding = true; 21 21
+3 -3
pkgs/applications/networking/p2p/twister/default.nix
··· 1 1 { stdenv, fetchurl, autoconf, automake, libtool, pkgconfig, python 2 - , boost, db, openssl, geoip, libiconv, miniupnpc 2 + , boost, db, openssl, geoip, libiconvOrEmpty, miniupnpc 3 3 , srcOnly, fetchgit 4 4 }: 5 5 ··· 34 34 35 35 buildInputs = [ 36 36 autoconf automake libtool pkgconfig python 37 - boost db openssl geoip libiconv miniupnpc 38 - ]; 37 + boost db openssl geoip miniupnpc 38 + ] ++ libiconvOrEmpty; 39 39 40 40 postPatch = '' 41 41 sed -i -e '/-htmldir/s|(default: [^)]*)|(default: ${twisterHTML})|' \
+4 -2
pkgs/applications/science/astronomy/stellarium/default.nix
··· 1 - { stdenv, fetchurl, cmake, freetype, libpng, mesa, gettext, openssl, qt4, perl, libiconv }: 1 + { stdenv, fetchurl, cmake, freetype, libpng, mesa, gettext, openssl, qt4, perl 2 + , libiconvOrEmpty }: 2 3 3 4 stdenv.mkDerivation rec { 4 5 name = "stellarium-0.12.4"; ··· 8 9 sha256 = "11367hv9niyz9v47lf31vjsqkgc8da0vy2nhiyxgmk1i49p1pbhg"; 9 10 }; 10 11 11 - buildInputs = [ cmake freetype libpng mesa gettext openssl qt4 perl libiconv ]; 12 + buildInputs = [ cmake freetype libpng mesa gettext openssl qt4 perl ] 13 + ++ libiconvOrEmpty; 12 14 13 15 enableParallelBuilding = true; 14 16
+7 -6
pkgs/development/ocaml-modules/ocaml-text/default.nix
··· 1 - {stdenv, fetchurl, libiconv, ocaml, findlib, ncurses}: 1 + {stdenv, fetchurl, libiconvOrNull, ocaml, findlib, ncurses}: 2 2 3 3 stdenv.mkDerivation { 4 4 name = "ocaml-text-0.6"; ··· 8 8 sha256 = "0j8gaak0ajnlmn8knvfygqwwzs7awjv5rfn5cbj6qxqbxhjd5m6g"; 9 9 }; 10 10 11 - buildInputs = [ocaml findlib libiconv ncurses]; 11 + buildInputs = [ocaml findlib ncurses] 12 + ++ stdenv.lib.optional (libiconvOrNull != null) libiconvOrNull; 12 13 13 - configurePhase = "iconv_prefix=${libiconv} ocaml setup.ml -configure"; 14 + configurePhase = 15 + (stdenv.lib.optionalString (libiconvOrNull != null) "iconv_prefix=${libiconvOrNull} ") 16 + + "ocaml setup.ml -configure"; 14 17 15 18 createFindlibDestdir = true; 16 19 ··· 18 21 meta = { 19 22 homepage = "http://ocaml-text.forge.ocamlcore.org/"; 20 23 description = "OCaml-Text is a library for dealing with ``text'', i.e. sequence of unicode characters, in a convenient way. "; 21 - license = "BSD"; 24 + license = stdenv.lib.licenses.bsd3; 22 25 platforms = ocaml.meta.platforms; 23 - maintainers = [ 24 - ]; 25 26 }; 26 27 }
+2 -2
pkgs/tools/filesystems/netatalk/default.nix
··· 1 - { fetchurl, stdenv, pkgconfig, db, libgcrypt, avahi, libiconv, pam, openssl }: 1 + { fetchurl, stdenv, pkgconfig, db, libgcrypt, avahi, libiconvOrEmpty, pam, openssl }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "netatalk-3.1.0"; ··· 8 8 sha256 = "1d8dc8ysslkis4yl1xab1w9p0pz7a1kg0i6fds4wxsp4fhb6wqhq"; 9 9 }; 10 10 11 - buildInputs = [ pkgconfig db libgcrypt avahi libiconv pam openssl ]; 11 + buildInputs = [ pkgconfig db libgcrypt avahi pam openssl ] ++ libiconvOrEmpty; 12 12 13 13 configureFlags = [ 14 14 "--with-bdb=${db}"
+5 -3
pkgs/tools/misc/mdbtools/git.nix
··· 1 1 { stdenv, fetchurl, fetchgit, glib, readline, bison, flex, pkgconfig, 2 - libiconv, autoconf, automake, libtool, which, txt2man, gnome_doc_utils, 2 + libiconvOrEmpty, autoconf, automake, libtool, which, txt2man, gnome_doc_utils, 3 3 scrollkeeper}: 4 4 5 5 stdenv.mkDerivation { ··· 12 12 name = "mdbtools-git-export"; 13 13 }; 14 14 15 - buildInputs = [glib readline bison flex pkgconfig libiconv autoconf automake 16 - libtool which txt2man gnome_doc_utils scrollkeeper ]; 15 + buildInputs = [ 16 + glib readline bison flex pkgconfig autoconf automake 17 + libtool which txt2man gnome_doc_utils scrollkeeper 18 + ] ++ libiconvOrEmpty; 17 19 18 20 preConfigure = '' 19 21 sed -e 's@static \(GHashTable [*]mdb_backends;\)@\1@' -i src/libmdb/backend.c
+6 -3
pkgs/tools/security/clamav/default.nix
··· 1 - { stdenv, fetchurl, zlib, bzip2, libiconv, libxml2, openssl, ncurses, curl }: 1 + { stdenv, fetchurl, zlib, bzip2, libiconvOrNull, libxml2, openssl, ncurses, curl }: 2 2 stdenv.mkDerivation rec { 3 3 name = "clamav-${version}"; 4 4 version = "0.98.4"; ··· 8 8 sha256 = "071yzamalj3rf7kl2jvc35ipnk1imdkq5ylbb8whyxfgmd3nf06k"; 9 9 }; 10 10 11 - buildInputs = [ zlib bzip2 libiconv libxml2 openssl ncurses curl ]; 11 + buildInputs = [ zlib bzip2 libxml2 openssl ncurses curl ] 12 + ++ stdenv.lib.optional (libiconvOrNull != null) libiconvOrNull; 12 13 13 14 configureFlags = [ 14 15 "--with-zlib=${zlib}" 15 16 "--with-libbz2-prefix=${bzip2}" 16 - "--with-iconv-dir=${libiconv}" 17 + ] ++ (stdenv.lib.optional (libiconvOrNull != null) 18 + "--with-iconv-dir=${libiconvOrNull}") 19 + ++ [ 17 20 "--with-xml=${libxml2}" 18 21 "--with-openssl=${openssl}" 19 22 "--with-libncurses-prefix=${ncurses}"