From ed867a50eb89a90db3b1741bf4c0bf0cd4557dba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Mon, 3 Nov 2014 12:55:12 +0100 Subject: [PATCH] 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. --- pkgs/applications/misc/gammu/default.nix | 6 +++--- .../applications/networking/p2p/twister/default.nix | 6 +++--- .../science/astronomy/stellarium/default.nix | 6 ++++-- .../ocaml-modules/ocaml-text/default.nix | 13 +++++++------ pkgs/tools/filesystems/netatalk/default.nix | 4 ++-- pkgs/tools/misc/mdbtools/git.nix | 8 +++++--- pkgs/tools/security/clamav/default.nix | 9 ++++++--- 7 files changed, 30 insertions(+), 22 deletions(-) diff --git a/pkgs/applications/misc/gammu/default.nix b/pkgs/applications/misc/gammu/default.nix index 56e45b11c706..b90a243aec4b 100644 --- a/pkgs/applications/misc/gammu/default.nix +++ b/pkgs/applications/misc/gammu/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, python, pkgconfig, cmake, bluez, libusb1, curl -, libiconv, gettext, sqlite }: +, libiconvOrEmpty, gettext, sqlite }: with stdenv.lib; @@ -14,8 +14,8 @@ stdenv.mkDerivation rec { patches = [ ./bashcomp-dir.patch ]; - buildInputs = [ python pkgconfig cmake bluez libusb1 curl libiconv - gettext sqlite ]; + buildInputs = [ python pkgconfig cmake bluez libusb1 curl gettext sqlite ] + ++ libiconvOrEmpty; enableParallelBuilding = true; diff --git a/pkgs/applications/networking/p2p/twister/default.nix b/pkgs/applications/networking/p2p/twister/default.nix index 36f83a0611bf..13f6b2bcce4a 100644 --- a/pkgs/applications/networking/p2p/twister/default.nix +++ b/pkgs/applications/networking/p2p/twister/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, autoconf, automake, libtool, pkgconfig, python -, boost, db, openssl, geoip, libiconv, miniupnpc +, boost, db, openssl, geoip, libiconvOrEmpty, miniupnpc , srcOnly, fetchgit }: @@ -34,8 +34,8 @@ in stdenv.mkDerivation rec { buildInputs = [ autoconf automake libtool pkgconfig python - boost db openssl geoip libiconv miniupnpc - ]; + boost db openssl geoip miniupnpc + ] ++ libiconvOrEmpty; postPatch = '' sed -i -e '/-htmldir/s|(default: [^)]*)|(default: ${twisterHTML})|' \ diff --git a/pkgs/applications/science/astronomy/stellarium/default.nix b/pkgs/applications/science/astronomy/stellarium/default.nix index 6b84143d0138..d7ae496f5aa6 100644 --- a/pkgs/applications/science/astronomy/stellarium/default.nix +++ b/pkgs/applications/science/astronomy/stellarium/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, cmake, freetype, libpng, mesa, gettext, openssl, qt4, perl, libiconv }: +{ stdenv, fetchurl, cmake, freetype, libpng, mesa, gettext, openssl, qt4, perl +, libiconvOrEmpty }: stdenv.mkDerivation rec { name = "stellarium-0.12.4"; @@ -8,7 +9,8 @@ stdenv.mkDerivation rec { sha256 = "11367hv9niyz9v47lf31vjsqkgc8da0vy2nhiyxgmk1i49p1pbhg"; }; - buildInputs = [ cmake freetype libpng mesa gettext openssl qt4 perl libiconv ]; + buildInputs = [ cmake freetype libpng mesa gettext openssl qt4 perl ] + ++ libiconvOrEmpty; enableParallelBuilding = true; diff --git a/pkgs/development/ocaml-modules/ocaml-text/default.nix b/pkgs/development/ocaml-modules/ocaml-text/default.nix index 08136dd2b100..387c5cef19ad 100644 --- a/pkgs/development/ocaml-modules/ocaml-text/default.nix +++ b/pkgs/development/ocaml-modules/ocaml-text/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, libiconv, ocaml, findlib, ncurses}: +{stdenv, fetchurl, libiconvOrNull, ocaml, findlib, ncurses}: stdenv.mkDerivation { name = "ocaml-text-0.6"; @@ -8,9 +8,12 @@ stdenv.mkDerivation { sha256 = "0j8gaak0ajnlmn8knvfygqwwzs7awjv5rfn5cbj6qxqbxhjd5m6g"; }; - buildInputs = [ocaml findlib libiconv ncurses]; + buildInputs = [ocaml findlib ncurses] + ++ stdenv.lib.optional (libiconvOrNull != null) libiconvOrNull; - configurePhase = "iconv_prefix=${libiconv} ocaml setup.ml -configure"; + configurePhase = + (stdenv.lib.optionalString (libiconvOrNull != null) "iconv_prefix=${libiconvOrNull} ") + + "ocaml setup.ml -configure"; createFindlibDestdir = true; @@ -18,9 +21,7 @@ stdenv.mkDerivation { meta = { homepage = "http://ocaml-text.forge.ocamlcore.org/"; description = "OCaml-Text is a library for dealing with ``text'', i.e. sequence of unicode characters, in a convenient way. "; - license = "BSD"; + license = stdenv.lib.licenses.bsd3; platforms = ocaml.meta.platforms; - maintainers = [ - ]; }; } diff --git a/pkgs/tools/filesystems/netatalk/default.nix b/pkgs/tools/filesystems/netatalk/default.nix index 850e16812488..61afe6ffb90c 100644 --- a/pkgs/tools/filesystems/netatalk/default.nix +++ b/pkgs/tools/filesystems/netatalk/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv, pkgconfig, db, libgcrypt, avahi, libiconv, pam, openssl }: +{ fetchurl, stdenv, pkgconfig, db, libgcrypt, avahi, libiconvOrEmpty, pam, openssl }: stdenv.mkDerivation rec { name = "netatalk-3.1.0"; @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "1d8dc8ysslkis4yl1xab1w9p0pz7a1kg0i6fds4wxsp4fhb6wqhq"; }; - buildInputs = [ pkgconfig db libgcrypt avahi libiconv pam openssl ]; + buildInputs = [ pkgconfig db libgcrypt avahi pam openssl ] ++ libiconvOrEmpty; configureFlags = [ "--with-bdb=${db}" diff --git a/pkgs/tools/misc/mdbtools/git.nix b/pkgs/tools/misc/mdbtools/git.nix index b97af331093b..11b5520c7bb2 100644 --- a/pkgs/tools/misc/mdbtools/git.nix +++ b/pkgs/tools/misc/mdbtools/git.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, fetchgit, glib, readline, bison, flex, pkgconfig, - libiconv, autoconf, automake, libtool, which, txt2man, gnome_doc_utils, + libiconvOrEmpty, autoconf, automake, libtool, which, txt2man, gnome_doc_utils, scrollkeeper}: stdenv.mkDerivation { @@ -12,8 +12,10 @@ stdenv.mkDerivation { name = "mdbtools-git-export"; }; - buildInputs = [glib readline bison flex pkgconfig libiconv autoconf automake - libtool which txt2man gnome_doc_utils scrollkeeper ]; + buildInputs = [ + glib readline bison flex pkgconfig autoconf automake + libtool which txt2man gnome_doc_utils scrollkeeper + ] ++ libiconvOrEmpty; preConfigure = '' sed -e 's@static \(GHashTable [*]mdb_backends;\)@\1@' -i src/libmdb/backend.c diff --git a/pkgs/tools/security/clamav/default.nix b/pkgs/tools/security/clamav/default.nix index 7dc13b3d11b2..6cbc82b26953 100644 --- a/pkgs/tools/security/clamav/default.nix +++ b/pkgs/tools/security/clamav/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, zlib, bzip2, libiconv, libxml2, openssl, ncurses, curl }: +{ stdenv, fetchurl, zlib, bzip2, libiconvOrNull, libxml2, openssl, ncurses, curl }: stdenv.mkDerivation rec { name = "clamav-${version}"; version = "0.98.4"; @@ -8,12 +8,15 @@ stdenv.mkDerivation rec { sha256 = "071yzamalj3rf7kl2jvc35ipnk1imdkq5ylbb8whyxfgmd3nf06k"; }; - buildInputs = [ zlib bzip2 libiconv libxml2 openssl ncurses curl ]; + buildInputs = [ zlib bzip2 libxml2 openssl ncurses curl ] + ++ stdenv.lib.optional (libiconvOrNull != null) libiconvOrNull; configureFlags = [ "--with-zlib=${zlib}" "--with-libbz2-prefix=${bzip2}" - "--with-iconv-dir=${libiconv}" + ] ++ (stdenv.lib.optional (libiconvOrNull != null) + "--with-iconv-dir=${libiconvOrNull}") + ++ [ "--with-xml=${libxml2}" "--with-openssl=${openssl}" "--with-libncurses-prefix=${ncurses}"