From e08b9ab8d3d6362c774a786797347fa7483af773 Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Wed, 26 Nov 2014 15:16:50 -0800 Subject: [PATCH 1/4] kill libiconvOr* Conflicts: pkgs/applications/networking/mailreaders/sup/default.nix pkgs/development/compilers/ghc/7.8.3-binary.nix pkgs/development/interpreters/php/5.3.nix pkgs/development/interpreters/ruby/patches.nix pkgs/development/libraries/cairo/default.nix pkgs/development/libraries/poppler/default.nix pkgs/top-level/all-packages.nix --- pkgs/applications/audio/ncmpcpp/default.nix | 5 ++--- pkgs/applications/misc/gammu/default.nix | 5 ++--- .../feedreaders/newsbeuter/default.nix | 5 ++--- .../networking/feedreaders/newsbeuter/dev.nix | 5 ++--- .../networking/p2p/twister/default.nix | 6 +++--- .../science/astronomy/stellarium/default.nix | 5 ++--- pkgs/applications/search/recoll/default.nix | 4 ++-- .../version-management/redmine/default.nix | 7 +++---- pkgs/applications/video/aegisub/default.nix | 5 ++--- pkgs/development/compilers/vala/0.26.nix | 5 ++--- pkgs/development/compilers/vala/default.nix | 5 ++--- pkgs/development/interpreters/ruby/patches.nix | 4 ++-- pkgs/development/libraries/apr-util/default.nix | 4 ++-- pkgs/development/libraries/avahi/default.nix | 7 +++---- pkgs/development/libraries/cairo/default.nix | 4 ++-- .../development/libraries/dbus-glib/default.nix | 4 ++-- pkgs/development/libraries/glib/default.nix | 5 ++--- pkgs/development/libraries/libgsf/default.nix | 5 ++--- .../libraries/libtorrent-rasterbar/generic.nix | 7 ++++--- pkgs/development/libraries/p11-kit/default.nix | 4 ++-- pkgs/development/libraries/poppler/default.nix | 4 ++-- pkgs/development/libraries/stfl/default.nix | 4 ++-- .../ocaml-modules/ocaml-text/default.nix | 9 +++------ pkgs/development/tools/vagrant/default.nix | 4 ++-- pkgs/misc/ghostscript/default.nix | 4 ++-- pkgs/servers/irc/ngircd/default.nix | 4 ++-- pkgs/tools/filesystems/netatalk/default.nix | 4 ++-- pkgs/tools/misc/aescrypt/default.nix | 4 ++-- pkgs/tools/misc/mdbtools/git.nix | 6 +++--- .../tools/package-management/disnix/default.nix | 4 ++-- pkgs/tools/security/clamav/default.nix | 12 +++++------- pkgs/tools/security/gnupg/20.nix | 5 ++--- pkgs/tools/security/opensc/default.nix | 4 ++-- pkgs/tools/text/enca/default.nix | 4 ++-- pkgs/tools/text/gnugrep/default.nix | 6 +++--- pkgs/tools/typesetting/docbook2x/default.nix | 6 +++--- pkgs/top-level/all-packages.nix | 17 ++++------------- 37 files changed, 88 insertions(+), 114 deletions(-) diff --git a/pkgs/applications/audio/ncmpcpp/default.nix b/pkgs/applications/audio/ncmpcpp/default.nix index e83e5a8ca74..15ce54f2bca 100644 --- a/pkgs/applications/audio/ncmpcpp/default.nix +++ b/pkgs/applications/audio/ncmpcpp/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, ncurses, curl, taglib, fftw, mpd_clientlib, pkgconfig -, libiconvOrEmpty, boost, readline }: +, libiconv, boost, readline }: stdenv.mkDerivation rec { version = "0.6.2"; @@ -12,8 +12,7 @@ stdenv.mkDerivation rec { configureFlags = "BOOST_LIB_SUFFIX="; - buildInputs = [ ncurses curl taglib fftw mpd_clientlib boost pkgconfig readline ] - ++ libiconvOrEmpty; + buildInputs = [ ncurses curl taglib fftw mpd_clientlib boost pkgconfig readline libiconv]; meta = with stdenv.lib; { description = "Curses-based interface for MPD (music player daemon)"; diff --git a/pkgs/applications/misc/gammu/default.nix b/pkgs/applications/misc/gammu/default.nix index b90a243aec4..36e45bd0485 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 -, libiconvOrEmpty, gettext, sqlite }: +, libiconv, gettext, sqlite }: with stdenv.lib; @@ -14,8 +14,7 @@ stdenv.mkDerivation rec { patches = [ ./bashcomp-dir.patch ]; - buildInputs = [ python pkgconfig cmake bluez libusb1 curl gettext sqlite ] - ++ libiconvOrEmpty; + buildInputs = [ python pkgconfig cmake bluez libusb1 curl gettext sqlite libiconv ]; enableParallelBuilding = true; diff --git a/pkgs/applications/networking/feedreaders/newsbeuter/default.nix b/pkgs/applications/networking/feedreaders/newsbeuter/default.nix index e5f18f72ced..183df058eff 100644 --- a/pkgs/applications/networking/feedreaders/newsbeuter/default.nix +++ b/pkgs/applications/networking/feedreaders/newsbeuter/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, sqlite, curl, pkgconfig, libxml2, stfl, json-c-0-11, ncurses -, gettext, libiconvOrEmpty, makeWrapper, perl }: +, gettext, libiconv, makeWrapper, perl }: stdenv.mkDerivation rec { name = "newsbeuter-2.8"; @@ -13,8 +13,7 @@ stdenv.mkDerivation rec { buildInputs # use gettext instead of libintlOrEmpty so we have access to the msgfmt # command - = [ pkgconfig sqlite curl libxml2 stfl json-c-0-11 ncurses gettext perl ] - ++ libiconvOrEmpty + = [ pkgconfig sqlite curl libxml2 stfl json-c-0-11 ncurses gettext perl libiconv ] ++ stdenv.lib.optional stdenv.isDarwin makeWrapper; preBuild = '' diff --git a/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix b/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix index 4390360ff9e..a254535dd70 100644 --- a/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix +++ b/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix @@ -1,5 +1,5 @@ { stdenv, fetchgit, sqlite, curl, pkgconfig, libxml2, stfl, json-c-0-11, ncurses -, gettext, libiconvOrEmpty, makeWrapper, perl }: +, gettext, libiconv, makeWrapper, perl }: stdenv.mkDerivation rec { name = "newsbeuter-dev-20140309"; @@ -13,8 +13,7 @@ stdenv.mkDerivation rec { buildInputs # use gettext instead of libintlOrEmpty so we have access to the msgfmt # command - = [ pkgconfig sqlite curl libxml2 stfl json-c-0-11 ncurses gettext perl ] - ++ libiconvOrEmpty + = [ pkgconfig sqlite curl libxml2 stfl json-c-0-11 ncurses gettext perl libiconv ] ++ stdenv.lib.optional stdenv.isDarwin makeWrapper; preBuild = '' diff --git a/pkgs/applications/networking/p2p/twister/default.nix b/pkgs/applications/networking/p2p/twister/default.nix index e6fd674e9e7..c762edb857b 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, libiconvOrEmpty, miniupnpc +, boost, db, openssl, geoip, libiconv, miniupnpc , srcOnly, fetchgit }: @@ -33,8 +33,8 @@ in stdenv.mkDerivation rec { buildInputs = [ autoconf automake libtool pkgconfig python - boost db openssl geoip miniupnpc - ] ++ libiconvOrEmpty; + boost db openssl geoip miniupnpc libiconv + ]; 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 ebe756a47f3..d73ebe87b11 100644 --- a/pkgs/applications/science/astronomy/stellarium/default.nix +++ b/pkgs/applications/science/astronomy/stellarium/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, cmake, freetype, libpng, mesa, gettext, openssl, qt5, perl -, libiconvOrEmpty }: +, libiconv }: stdenv.mkDerivation rec { name = "stellarium-0.13.2"; @@ -9,8 +9,7 @@ stdenv.mkDerivation rec { sha256 = "1asrq1v6vjzxd2zz92brdfs5f5b1qf8zwd7k2dpg3dl4shl8wwg5"; }; - buildInputs = [ cmake freetype libpng mesa gettext openssl qt5 perl ] - ++ libiconvOrEmpty; + buildInputs = [ cmake freetype libpng mesa gettext openssl qt5 perl libiconv ]; enableParallelBuilding = true; diff --git a/pkgs/applications/search/recoll/default.nix b/pkgs/applications/search/recoll/default.nix index 6bfa7c7905b..4274f73c7e5 100644 --- a/pkgs/applications/search/recoll/default.nix +++ b/pkgs/applications/search/recoll/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl , qt4, xapian, file, python , djvulibre, groff, libxslt, unzip, xpdf, antiword, catdoc, lyx -, ghostscript, gawk, gnugrep, gnused, gnutar, gzip, libiconvOrLibc }: +, ghostscript, gawk, gnugrep, gnused, gnutar, gzip, libiconv }: assert stdenv.system != "powerpc-linux"; @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { substituteInPlace $f --replace grep ${gnugrep}/bin/grep substituteInPlace $f --replace groff ${groff}/bin/groff substituteInPlace $f --replace gunzip ${gzip}/bin/gunzip - substituteInPlace $f --replace iconv ${libiconvOrLibc}/bin/iconv + substituteInPlace $f --replace iconv ${libiconv}/bin/iconv substituteInPlace $f --replace lyx ${lyx}/bin/lyx substituteInPlace $f --replace pdftotext ${xpdf}/bin/pdftotext substituteInPlace $f --replace pstotext ${ghostscript}/bin/ps2ascii diff --git a/pkgs/applications/version-management/redmine/default.nix b/pkgs/applications/version-management/redmine/default.nix index b1ef5ee757c..26ca2ad9748 100644 --- a/pkgs/applications/version-management/redmine/default.nix +++ b/pkgs/applications/version-management/redmine/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ruby, bundler, libiconv, libiconvOrNull, libiconvOrLibc, libxslt, libxml2, pkgconfig, libffi, glibc, imagemagickBig, postgresql }: +{ stdenv, fetchurl, ruby, bundler, libiconv, libxslt, libxml2, pkgconfig, libffi, glibc, imagemagickBig, postgresql }: let gemspec = map (gem: fetchurl { url=gem.url; sha256=gem.hash; }) (import ./Gemfile.nix); @@ -25,8 +25,7 @@ in stdenv.mkDerivation rec { ''; buildInputs = [ - ruby bundler - ] ++ (if (libiconvOrNull != null) then [libiconv] else []) ++ [ + ruby bundler libiconv libxslt libxml2 pkgconfig libffi imagemagickBig postgresql ]; @@ -48,7 +47,7 @@ in stdenv.mkDerivation rec { bundle config build.nokogiri \ --use-system-libraries \ - --with-iconv-dir=${libiconvOrLibc} \ + --with-iconv-dir=${libiconv} \ --with-xslt-dir=${libxslt} \ --with-xml2-dir=${libxml2} \ --with-pkg-config \ diff --git a/pkgs/applications/video/aegisub/default.nix b/pkgs/applications/video/aegisub/default.nix index c32235a592f..9d54ac99273 100644 --- a/pkgs/applications/video/aegisub/default.nix +++ b/pkgs/applications/video/aegisub/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl , libX11, wxGTK -, libiconvOrEmpty, fontconfig, freetype +, libiconv, fontconfig, freetype , mesa , libass, fftw, ffms , ffmpeg, pkgconfig, zlib # Undocumented (?) dependencies @@ -30,9 +30,8 @@ stdenv.mkDerivation rec { buildInputs = with stdenv.lib; [ pkgconfig intltool libX11 wxGTK fontconfig freetype mesa - libass fftw ffms ffmpeg zlib icu boost boost.lib + libass fftw ffms ffmpeg zlib icu boost boost.lib libiconv ] - ++ libiconvOrEmpty ++ optional spellChecking hunspell ++ optional automationSupport lua ++ optional openalSupport openal diff --git a/pkgs/development/compilers/vala/0.26.nix b/pkgs/development/compilers/vala/0.26.nix index 48b5476fe1d..4cc07eb7d9d 100644 --- a/pkgs/development/compilers/vala/0.26.nix +++ b/pkgs/development/compilers/vala/0.26.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgconfig, flex, bison, libxslt -, glib, libiconvOrEmpty, libintlOrEmpty +, glib, libiconv, libintlOrEmpty }: let @@ -25,7 +25,6 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig flex bison libxslt ]; - buildInputs = [ glib ] - ++ libiconvOrEmpty + buildInputs = [ glib libiconv ] ++ libintlOrEmpty; } diff --git a/pkgs/development/compilers/vala/default.nix b/pkgs/development/compilers/vala/default.nix index 38c3ead7bff..13b9c5f3983 100644 --- a/pkgs/development/compilers/vala/default.nix +++ b/pkgs/development/compilers/vala/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgconfig, flex, bison, libxslt -, glib, libiconvOrEmpty, libintlOrEmpty +, glib, libiconv, libintlOrEmpty }: let @@ -25,7 +25,6 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig flex bison libxslt ]; - buildInputs = [ glib ] - ++ libiconvOrEmpty + buildInputs = [ glib libiconv ] ++ libintlOrEmpty; } diff --git a/pkgs/development/interpreters/ruby/patches.nix b/pkgs/development/interpreters/ruby/patches.nix index 029e5cf18a5..5a2c206fad5 100644 --- a/pkgs/development/interpreters/ruby/patches.nix +++ b/pkgs/development/interpreters/ruby/patches.nix @@ -1,5 +1,5 @@ { fetchurl, writeScript, ruby, ncurses, sqlite, libxml2, libxslt, libffi -, zlib, libuuid, gems, jdk, python, stdenv, libiconvOrEmpty, imagemagick +, zlib, libuuid, gems, jdk, python, stdenv, libiconv, imagemagick , pkgconfig }: let @@ -33,7 +33,7 @@ in NIX_POST_EXTRACT_FILES_HOOK = patchUsrBinEnv; }; - iconv = { buildInputs = [ libiconvOrEmpty ]; }; + iconv = { buildInputs = [ libiconv ]; }; libv8 = { # This fix is needed to fool scons, which clears the environment by default. diff --git a/pkgs/development/libraries/apr-util/default.nix b/pkgs/development/libraries/apr-util/default.nix index 76477d38b6d..0f21af94c64 100644 --- a/pkgs/development/libraries/apr-util/default.nix +++ b/pkgs/development/libraries/apr-util/default.nix @@ -2,7 +2,7 @@ , sslSupport ? true, openssl , bdbSupport ? false, db , ldapSupport ? true, openldap -, libiconvOrNull +, libiconv }: assert sslSupport -> openssl != null; @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { ${stdenv.lib.optionalString ldapSupport "--with-ldap"} ''; - propagatedBuildInputs = [ makeWrapper apr expat libiconvOrNull ] + propagatedBuildInputs = [ makeWrapper apr expat libiconv ] ++ optional sslSupport openssl ++ optional bdbSupport db ++ optional ldapSupport openldap; diff --git a/pkgs/development/libraries/avahi/default.nix b/pkgs/development/libraries/avahi/default.nix index 0adc7d56357..6c8fe6e112b 100644 --- a/pkgs/development/libraries/avahi/default.nix +++ b/pkgs/development/libraries/avahi/default.nix @@ -1,5 +1,5 @@ { fetchurl, stdenv, pkgconfig, libdaemon, dbus, perl, perlXMLParser -, expat, gettext, intltool, glib, libiconvOrEmpty +, expat, gettext, intltool, glib, libiconv , qt4 ? null , qt4Support ? false , withLibdnssdCompat ? false }: @@ -16,9 +16,8 @@ stdenv.mkDerivation rec { patches = [ ./no-mkdir-localstatedir.patch ]; - buildInputs = [ libdaemon dbus perl perlXMLParser glib expat ] - ++ (stdenv.lib.optional qt4Support qt4) - ++ libiconvOrEmpty; + buildInputs = [ libdaemon dbus perl perlXMLParser glib expat libiconv ] + ++ (stdenv.lib.optional qt4Support qt4); nativeBuildInputs = [ pkgconfig gettext intltool ]; diff --git a/pkgs/development/libraries/cairo/default.nix b/pkgs/development/libraries/cairo/default.nix index 97e455b1f30..e38d996766a 100644 --- a/pkgs/development/libraries/cairo/default.nix +++ b/pkgs/development/libraries/cairo/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchpatch, pkgconfig, libiconvOrEmpty, libintlOrEmpty +{ stdenv, fetchurl, fetchpatch, pkgconfig, libiconv, libintlOrEmpty , expat, zlib, libpng, pixman, fontconfig, freetype, xlibs , gobjectSupport ? true, glib , xcbSupport ? true # no longer experimental since 1.12 @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { sha256 = "0mk2fd9fwxqzravlmnbbrzwak15wqspn7609y0yn6qh87va5i0x4"; })]; - nativeBuildInputs = [ pkgconfig ] ++ libintlOrEmpty ++ libiconvOrEmpty; + nativeBuildInputs = [ pkgconfig libiconv ] ++ libintlOrEmpty; propagatedBuildInputs = with xlibs; [ xlibs.xlibs fontconfig expat freetype pixman zlib libpng ] diff --git a/pkgs/development/libraries/dbus-glib/default.nix b/pkgs/development/libraries/dbus-glib/default.nix index 80afcb343dd..16a20ec94a4 100644 --- a/pkgs/development/libraries/dbus-glib/default.nix +++ b/pkgs/development/libraries/dbus-glib/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, expat, gettext, libiconvOrEmpty, dbus, glib }: +{ stdenv, fetchurl, pkgconfig, expat, gettext, libiconv, dbus, glib }: stdenv.mkDerivation rec { name = "dbus-glib-0.102"; @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig gettext ]; - buildInputs = [ expat ] ++ libiconvOrEmpty; + buildInputs = [ expat libiconv ]; propagatedBuildInputs = [ dbus.libs glib ]; diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index 714b8073ee0..1dff672b348 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgconfig, gettext, perl, python -, libiconvOrEmpty, libintlOrEmpty, zlib, libffi, pcre, libelf +, libiconv, libintlOrEmpty, zlib, libffi, pcre, libelf # this is just for tests (not in closure of any regular package) , coreutils, dbus_daemon, libxml2, tzdata, desktop_file_utils, shared_mime_info, doCheck ? false @@ -60,8 +60,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig gettext perl python ]; - propagatedBuildInputs = [ pcre zlib libffi ] - ++ optional (!stdenv.isDarwin) libiconvOrEmpty + propagatedBuildInputs = [ pcre zlib libffi libiconv ] ++ libintlOrEmpty; configureFlags = diff --git a/pkgs/development/libraries/libgsf/default.nix b/pkgs/development/libraries/libgsf/default.nix index dbcdabc8951..0479343a8f5 100644 --- a/pkgs/development/libraries/libgsf/default.nix +++ b/pkgs/development/libraries/libgsf/default.nix @@ -1,5 +1,5 @@ { fetchurl, stdenv, pkgconfig, intltool, gettext, glib, libxml2, zlib, bzip2 -, python, gdk_pixbuf, libiconvOrEmpty, libintlOrEmpty }: +, python, gdk_pixbuf, libiconv, libintlOrEmpty }: with { inherit (stdenv.lib) optionals; }; @@ -15,8 +15,7 @@ stdenv.mkDerivation rec { buildInputs = [ gettext bzip2 zlib python ]; - propagatedBuildInputs = [ libxml2 glib gdk_pixbuf ] - ++ libiconvOrEmpty + propagatedBuildInputs = [ libxml2 glib gdk_pixbuf libiconv ] ++ libintlOrEmpty; doCheck = true; diff --git a/pkgs/development/libraries/libtorrent-rasterbar/generic.nix b/pkgs/development/libraries/libtorrent-rasterbar/generic.nix index f47ff1081bc..b866f66dbfa 100644 --- a/pkgs/development/libraries/libtorrent-rasterbar/generic.nix +++ b/pkgs/development/libraries/libtorrent-rasterbar/generic.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, boost, openssl, pkgconfig, zlib, python, libiconvOrNull, geoip +{ stdenv, fetchurl, boost, openssl, pkgconfig, zlib, python, libiconv, geoip # Version specific options , version, sha256 , ... }: @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { inherit sha256; }; - buildInputs = [ boost pkgconfig openssl zlib python libiconvOrNull geoip ]; + buildInputs = [ boost pkgconfig openssl zlib python libiconv geoip ]; configureFlags = [ "--enable-python-binding" @@ -19,7 +19,8 @@ stdenv.mkDerivation rec { "--with-libiconv=yes" "--with-boost=${boost.dev}" "--with-boost-libdir=${boost.lib}/lib" - ] ++ stdenv.lib.optional (libiconvOrNull != null) "--with-libiconv=yes"; + "--with-libiconv=yes" + ]; meta = with stdenv.lib; { homepage = http://www.rasterbar.com/products/libtorrent/; diff --git a/pkgs/development/libraries/p11-kit/default.nix b/pkgs/development/libraries/p11-kit/default.nix index d1778093868..0ecbc109d39 100644 --- a/pkgs/development/libraries/p11-kit/default.nix +++ b/pkgs/development/libraries/p11-kit/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, libiconvOrEmpty, pkgconfig, libffi, libtasn1 }: +{ stdenv, fetchurl, libiconv, pkgconfig, libffi, libtasn1 }: stdenv.mkDerivation rec { name = "p11-kit-0.20.2"; @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { configureFlags = "--without-libtasn1"; - buildInputs = [ pkgconfig libffi libtasn1 ] ++ libiconvOrEmpty; + buildInputs = [ pkgconfig libffi libtasn1 libiconv ]; meta = { homepage = http://p11-glue.freedesktop.org/; diff --git a/pkgs/development/libraries/poppler/default.nix b/pkgs/development/libraries/poppler/default.nix index 76a45a0ecc8..08c85931204 100644 --- a/pkgs/development/libraries/poppler/default.nix +++ b/pkgs/development/libraries/poppler/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchpatch, pkgconfig, cmake, libiconvOrEmpty, libintlOrEmpty +{ stdenv, fetchurl, fetchpatch, pkgconfig, cmake, libiconv, libintlOrEmpty , zlib, curl, cairo, freetype, fontconfig, lcms, libjpeg, openjpeg , qt4Support ? false, qt4 ? null, qt5 }: @@ -26,7 +26,7 @@ let propagatedBuildInputs = [ zlib cairo freetype fontconfig libjpeg lcms curl openjpeg ]; - nativeBuildInputs = [ pkgconfig cmake ] ++ libiconvOrEmpty ++ libintlOrEmpty; + nativeBuildInputs = [ pkgconfig cmake libiconv ] ++ libintlOrEmpty; cmakeFlags = "-DENABLE_XPDF_HEADERS=ON -DENABLE_LIBCURL=ON -DENABLE_ZLIB=ON"; diff --git a/pkgs/development/libraries/stfl/default.nix b/pkgs/development/libraries/stfl/default.nix index 9e3f749ca8f..4e24268314e 100644 --- a/pkgs/development/libraries/stfl/default.nix +++ b/pkgs/development/libraries/stfl/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ncurses, libiconvOrEmpty }: +{ stdenv, fetchurl, ncurses, libiconv }: stdenv.mkDerivation rec { name = "stfl-0.22"; @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "062lqlf3qhp8bcapbpc0k3wym7x6ngncql8jmx5x06p6679szp9d"; }; - buildInputs = [ ncurses ] ++ libiconvOrEmpty; + buildInputs = [ ncurses libiconv ]; buildPhase = '' sed -i s%ncursesw/ncurses.h%ncurses.h% stfl_internals.h diff --git a/pkgs/development/ocaml-modules/ocaml-text/default.nix b/pkgs/development/ocaml-modules/ocaml-text/default.nix index 387c5cef19a..44b30b368b3 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, libiconvOrNull, ocaml, findlib, ncurses}: +{stdenv, fetchurl, libiconv, ocaml, findlib, ncurses}: stdenv.mkDerivation { name = "ocaml-text-0.6"; @@ -8,12 +8,9 @@ stdenv.mkDerivation { sha256 = "0j8gaak0ajnlmn8knvfygqwwzs7awjv5rfn5cbj6qxqbxhjd5m6g"; }; - buildInputs = [ocaml findlib ncurses] - ++ stdenv.lib.optional (libiconvOrNull != null) libiconvOrNull; + buildInputs = [ocaml findlib ncurses libiconv]; - configurePhase = - (stdenv.lib.optionalString (libiconvOrNull != null) "iconv_prefix=${libiconvOrNull} ") - + "ocaml setup.ml -configure"; + configurePhase = "iconv_prefix=${libiconv} ocaml setup.ml -configure"; createFindlibDestdir = true; diff --git a/pkgs/development/tools/vagrant/default.nix b/pkgs/development/tools/vagrant/default.nix index 1d9247604ae..6a5359b8147 100644 --- a/pkgs/development/tools/vagrant/default.nix +++ b/pkgs/development/tools/vagrant/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, dpkg, curl, libarchive, openssl, ruby, buildRubyGem, libiconvOrLibc +{ stdenv, fetchurl, dpkg, curl, libarchive, openssl, ruby, buildRubyGem, libiconv , libxml2, libxslt }: assert stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux"; @@ -73,7 +73,7 @@ stdenv.mkDerivation rec { # libiconv: iconv rm opt/vagrant/embedded/bin/iconv - ln -s ${libiconvOrLibc}/bin/iconv opt/vagrant/embedded/bin + ln -s ${libiconv}/bin/iconv opt/vagrant/embedded/bin # libxml: xml2-config, xmlcatalog, xmllint rm opt/vagrant/embedded/bin/{xml2-config,xmlcatalog,xmllint} diff --git a/pkgs/misc/ghostscript/default.nix b/pkgs/misc/ghostscript/default.nix index 9e753d8f830..c521e156f8e 100644 --- a/pkgs/misc/ghostscript/default.nix +++ b/pkgs/misc/ghostscript/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, pkgconfig, zlib, expat, openssl , libjpeg, libpng, libtiff, freetype, fontconfig, lcms2, libpaper, jbig2dec -, libiconvOrEmpty +, libiconv , x11Support ? false, x11 ? null , cupsSupport ? false, cups ? null }: @@ -33,10 +33,10 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig zlib expat openssl libjpeg libpng libtiff freetype fontconfig lcms2 libpaper jbig2dec + libiconv ] ++ stdenv.lib.optional x11Support x11 ++ stdenv.lib.optional cupsSupport cups - ++ libiconvOrEmpty # [] # maybe sometimes jpeg2000 support ; diff --git a/pkgs/servers/irc/ngircd/default.nix b/pkgs/servers/irc/ngircd/default.nix index 738881e2aaf..50bc86e805e 100644 --- a/pkgs/servers/irc/ngircd/default.nix +++ b/pkgs/servers/irc/ngircd/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, zlib, openssl, pam, libiconvOrNull }: +{ stdenv, fetchurl, zlib, openssl, pam, libiconv }: stdenv.mkDerivation rec { name = "ngircd-21"; @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { "--with-iconv" ]; - buildInputs = [ zlib pam openssl libiconvOrNull ]; + buildInputs = [ zlib pam openssl libiconv ]; meta = { description = "Next Generation IRC Daemon"; diff --git a/pkgs/tools/filesystems/netatalk/default.nix b/pkgs/tools/filesystems/netatalk/default.nix index 61afe6ffb90..d5a0cbbc419 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, libiconvOrEmpty, pam, openssl }: +{ fetchurl, stdenv, pkgconfig, db, libgcrypt, avahi, libiconv, pam, openssl }: stdenv.mkDerivation rec { name = "netatalk-3.1.0"; @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "1d8dc8ysslkis4yl1xab1w9p0pz7a1kg0i6fds4wxsp4fhb6wqhq"; }; - buildInputs = [ pkgconfig db libgcrypt avahi pam openssl ] ++ libiconvOrEmpty; + buildInputs = [ pkgconfig db libgcrypt avahi pam openssl libiconv ]; configureFlags = [ "--with-bdb=${db}" diff --git a/pkgs/tools/misc/aescrypt/default.nix b/pkgs/tools/misc/aescrypt/default.nix index f39e466c78f..ba58bd86a74 100644 --- a/pkgs/tools/misc/aescrypt/default.nix +++ b/pkgs/tools/misc/aescrypt/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, libiconvOrEmpty }: +{ stdenv, fetchurl, libiconv }: stdenv.mkDerivation rec { version = "3.0.9"; @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { cp aescrypt_keygen $out/bin ''; - buildInputs = [ libiconvOrEmpty ]; + buildInputs = [ libiconv ]; NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-liconv"; diff --git a/pkgs/tools/misc/mdbtools/git.nix b/pkgs/tools/misc/mdbtools/git.nix index 9262c6e8eb8..8cf5e5e9a38 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, - libiconvOrEmpty, autoconf, automake, libtool, which, txt2man, gnome_doc_utils, + libiconv, autoconf, automake, libtool, which, txt2man, gnome_doc_utils, scrollkeeper}: stdenv.mkDerivation { @@ -13,8 +13,8 @@ stdenv.mkDerivation { buildInputs = [ glib readline bison flex pkgconfig autoconf automake - libtool which txt2man gnome_doc_utils scrollkeeper - ] ++ libiconvOrEmpty; + libtool which txt2man gnome_doc_utils scrollkeeper libiconv + ]; preConfigure = '' sed -e 's@static \(GHashTable [*]mdb_backends;\)@\1@' -i src/libmdb/backend.c diff --git a/pkgs/tools/package-management/disnix/default.nix b/pkgs/tools/package-management/disnix/default.nix index 19eef437ad7..b4d80e10b64 100644 --- a/pkgs/tools/package-management/disnix/default.nix +++ b/pkgs/tools/package-management/disnix/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, dbus_glib, libxml2, libxslt, getopt, nixUnstable, dysnomia, libintlOrEmpty, libiconvOrEmpty }: +{ stdenv, fetchurl, pkgconfig, dbus_glib, libxml2, libxslt, getopt, nixUnstable, dysnomia, libintlOrEmpty, libiconv }: stdenv.mkDerivation { name = "disnix-0.3prea0484a2c19d1947c21f11b4fc7c3f6049bd11efa"; @@ -8,7 +8,7 @@ stdenv.mkDerivation { sha256 = "06qjaxysnkm31rgjlqy9n7p59q5v3jl57jm9jya7zf2g90syhdn7"; }; - buildInputs = [ pkgconfig dbus_glib libxml2 libxslt getopt nixUnstable libintlOrEmpty libiconvOrEmpty dysnomia ]; + buildInputs = [ pkgconfig dbus_glib libxml2 libxslt getopt nixUnstable libintlOrEmpty libiconv dysnomia ]; dontStrip = true; diff --git a/pkgs/tools/security/clamav/default.nix b/pkgs/tools/security/clamav/default.nix index 11e08d502ed..350a6f369f0 100644 --- a/pkgs/tools/security/clamav/default.nix +++ b/pkgs/tools/security/clamav/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, zlib, bzip2, libiconvOrNull, libxml2, openssl, ncurses, curl }: +{ stdenv, fetchurl, zlib, bzip2, libiconv, libxml2, openssl, ncurses, curl }: stdenv.mkDerivation rec { name = "clamav-${version}"; version = "0.98.6"; @@ -8,20 +8,18 @@ stdenv.mkDerivation rec { sha256 = "0l99a0shgzpl8rvrrgbm1ki2zxlb7g1n82bhq7f2snj4amfj94b5"; }; - buildInputs = [ zlib bzip2 libxml2 openssl ncurses curl ] - ++ stdenv.lib.optional (libiconvOrNull != null) libiconvOrNull; + buildInputs = [ zlib bzip2 libxml2 openssl ncurses curl libiconv ]; configureFlags = [ "--with-zlib=${zlib}" "--with-libbz2-prefix=${bzip2}" - ] ++ (stdenv.lib.optional (libiconvOrNull != null) - "--with-iconv-dir=${libiconvOrNull}") - ++ [ + "--with-iconv-dir=${libiconv}" "--with-xml=${libxml2}" "--with-openssl=${openssl}" "--with-libncurses-prefix=${ncurses}" "--with-libcurl=${curl}" - "--disable-clamav" ]; + "--disable-clamav" + ]; meta = with stdenv.lib; { homepage = http://www.clamav.net; diff --git a/pkgs/tools/security/gnupg/20.nix b/pkgs/tools/security/gnupg/20.nix index a584f2d1d85..0fcf334bee0 100644 --- a/pkgs/tools/security/gnupg/20.nix +++ b/pkgs/tools/security/gnupg/20.nix @@ -1,5 +1,5 @@ { fetchurl, stdenv, readline, zlib, libgpgerror, pth, libgcrypt, libassuan -, libksba, coreutils, libiconvOrEmpty +, libksba, coreutils, libiconv # Each of the dependencies below are optional. # Gnupg can be built without them at the cost of reduced functionality. , pinentry ? null, openldap ? null, bzip2 ? null, libusb ? null, curl ? null @@ -15,8 +15,7 @@ stdenv.mkDerivation rec { buildInputs = [ readline zlib libgpgerror libgcrypt libassuan libksba pth - openldap bzip2 libusb curl ] - ++ libiconvOrEmpty; + openldap bzip2 libusb curl libiconv ]; patchPhase = '' find tests -type f | xargs sed -e 's@/bin/pwd@${coreutils}&@g' -i diff --git a/pkgs/tools/security/opensc/default.nix b/pkgs/tools/security/opensc/default.nix index 42303fc356a..31ad1108dda 100644 --- a/pkgs/tools/security/opensc/default.nix +++ b/pkgs/tools/security/opensc/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, libtool, readline, zlib, openssl, libiconvOrNull, pcsclite +{ stdenv, fetchurl, libtool, readline, zlib, openssl, libiconv, pcsclite , libassuan1, pkgconfig, libXt, docbook_xsl, libxslt, docbook_xml_dtd_412 }: @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ libtool readline zlib openssl pcsclite libassuan1 pkgconfig - libXt libxslt libiconvOrNull docbook_xml_dtd_412 + libXt libxslt libiconv docbook_xml_dtd_412 ]; configureFlags = [ diff --git a/pkgs/tools/text/enca/default.nix b/pkgs/tools/text/enca/default.nix index 043f7cf5a12..363446d409b 100644 --- a/pkgs/tools/text/enca/default.nix +++ b/pkgs/tools/text/enca/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, libiconvOrNull, recode }: +{ stdenv, fetchurl, libiconv, recode }: stdenv.mkDerivation rec { name = "enca-1.16"; @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "0hg7ggldam66l9j53nlrvi2lv1k99r2qfk6dh23vg6mi05cph7bw"; }; - buildInputs = [ recode libiconvOrNull ]; + buildInputs = [ recode libiconv ]; meta = { homepage = http://freecode.com/projects/enca; diff --git a/pkgs/tools/text/gnugrep/default.nix b/pkgs/tools/text/gnugrep/default.nix index 8be986e0cbb..522a1a05ce9 100644 --- a/pkgs/tools/text/gnugrep/default.nix +++ b/pkgs/tools/text/gnugrep/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pcre, libiconvOrNull }: +{ stdenv, fetchurl, pcre, libiconv }: let version = "2.20"; in @@ -10,9 +10,9 @@ stdenv.mkDerivation { sha256 = "0rcs0spsxdmh6yz8y4frkqp6f5iw19mdbdl9s2v6956hq0mlbbzh"; }; - buildInputs = [ pcre libiconvOrNull ]; + buildInputs = [ pcre libiconv ]; - NIX_LDFLAGS = stdenv.lib.optionalString (libiconvOrNull != null) "-L${libiconvOrNull}/lib -liconv"; + NIX_LDFLAGS = "-L${libiconv}/lib -liconv"; doCheck = !stdenv.isDarwin; diff --git a/pkgs/tools/typesetting/docbook2x/default.nix b/pkgs/tools/typesetting/docbook2x/default.nix index b31c64e6936..37cd6a2e50b 100644 --- a/pkgs/tools/typesetting/docbook2x/default.nix +++ b/pkgs/tools/typesetting/docbook2x/default.nix @@ -1,6 +1,6 @@ { fetchurl, stdenv, texinfo, perl , XMLSAX, XMLParser, XMLNamespaceSupport -, groff, libxml2, libxslt, gnused, libiconvOrEmpty, opensp +, groff, libxml2, libxslt, gnused, libiconv, opensp , docbook_xml_dtd_43 , makeWrapper }: @@ -17,8 +17,8 @@ stdenv.mkDerivation rec { patches = [ ./db2x_texixml-to-stdout.patch ]; buildInputs = [ perl texinfo groff libxml2 libxslt makeWrapper - XMLSAX XMLParser XMLNamespaceSupport opensp - ] ++ libiconvOrEmpty; + XMLSAX XMLParser XMLNamespaceSupport opensp libiconv + ]; postConfigure = '' # Broken substitution is used for `perl/config.pl', which leaves literal diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8efb185bcde..85988f8490b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6244,19 +6244,10 @@ let libgsf = callPackage ../development/libraries/libgsf { }; - libiconv = callPackage ../development/libraries/libiconv { }; - - libiconvOrEmpty = if libiconvOrNull == null then [] else [libiconv]; - - libiconvOrNull = - if stdenv.cc.libc or null != null || stdenv.isGlibc - then null - else libiconv; - - # The logic behind this attribute is broken: libiconvOrNull==null does - # NOT imply libiconv=glibc! On Darwin, for example, we have a native - # libiconv library which is not glibc. - libiconvOrLibc = if libiconvOrNull == null then stdenv.cc.libc else libiconv; + libiconv = + if stdenv.isGlibc + then stdenv.cc.libc + else callPackage ../development/libraries/libiconv { }; # On non-GNU systems we need GNU Gettext for libintl. libintlOrEmpty = stdenv.lib.optional (!stdenv.isLinux) gettext; From 472feaf53becef9cc0551babc44a1f5db3beed51 Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Thu, 5 Feb 2015 08:59:35 -0800 Subject: [PATCH 2/4] dont need -liconv --- pkgs/tools/text/gnugrep/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/tools/text/gnugrep/default.nix b/pkgs/tools/text/gnugrep/default.nix index 522a1a05ce9..0380d2d2467 100644 --- a/pkgs/tools/text/gnugrep/default.nix +++ b/pkgs/tools/text/gnugrep/default.nix @@ -12,8 +12,6 @@ stdenv.mkDerivation { buildInputs = [ pcre libiconv ]; - NIX_LDFLAGS = "-L${libiconv}/lib -liconv"; - doCheck = !stdenv.isDarwin; # On Mac OS X, force use of mkdir -p, since Grep's fallback From 7bea6aafae10731b53e2f8b9a66d6488a3a9f54a Mon Sep 17 00:00:00 2001 From: Dan Peebles Date: Sun, 8 Feb 2015 13:36:13 -0500 Subject: [PATCH 3/4] Some cc-wrapper changes to better support darwin and clang: - Add a conditional flag for the c++ std lib - Build binaries that get linked by our own dyld (someday) - Automatically add framework directories in the setup hook --- pkgs/build-support/cc-wrapper/cc-wrapper.sh | 7 ++++++ pkgs/build-support/cc-wrapper/default.nix | 25 +++++++++++++++------ pkgs/build-support/cc-wrapper/setup-hook.sh | 4 ++++ 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/pkgs/build-support/cc-wrapper/cc-wrapper.sh b/pkgs/build-support/cc-wrapper/cc-wrapper.sh index 9284a62c643..548b1910645 100644 --- a/pkgs/build-support/cc-wrapper/cc-wrapper.sh +++ b/pkgs/build-support/cc-wrapper/cc-wrapper.sh @@ -79,6 +79,13 @@ if [ "$NIX_ENFORCE_PURITY" = 1 -a -n "$NIX_STORE" ]; then params=("${rest[@]}") fi +if [[ "@prog@" = *++ ]]; then + if echo "$@" | grep -qvw -- -nostdlib; then + NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $NIX_CXXSTDLIB_COMPILE" + NIX_CFLAGS_LINK="$NIX_CFLAGS_LINK $NIX_CXXSTDLIB_LINK" + fi +fi + # Add the flags for the C compiler proper. extraAfter=($NIX_CFLAGS_COMPILE) extraBefore=() diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 5d05b5eff86..ac33a0b083c 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -8,6 +8,7 @@ { name ? "", stdenv, nativeTools, nativeLibc, nativePrefix ? "" , cc ? null, libc ? null, binutils ? null, coreutils ? null, shell ? stdenv.shell , zlib ? null, extraPackages ? [] +, dyld ? null # TODO: should this be a setup-hook on dyld? , setupHook ? ./setup-hook.sh }: @@ -55,7 +56,7 @@ stdenv.mkDerivation { } '' - + optionalString (!nativeLibc) '' + + optionalString (!nativeLibc) (if (!stdenv.isDarwin) then '' dynamicLinker="$libc/lib/$dynamicLinker" echo $dynamicLinker > $out/nix-support/dynamic-linker @@ -63,6 +64,17 @@ stdenv.mkDerivation { echo $libc/lib/32/ld-linux.so.2 > $out/nix-support/dynamic-linker-m32 fi + # The dynamic linker is passed in `ldflagsBefore' to allow + # explicit overrides of the dynamic linker by callers to gcc/ld + # (the *last* value counts, so ours should come first). + echo "-dynamic-linker" $dynamicLinker > $out/nix-support/libc-ldflags-before + '' else '' + echo $dynamicLinker > $out/nix-support/dynamic-linker + + echo "export LD_DYLD_PATH=\"$dynamicLinker\"" >> $out/nix-support/setup-hook + '') + + + optionalString (!nativeLibc) '' # The "-B$libc/lib/" flag is a quick hack to force gcc to link # against the crt1.o from our own glibc, rather than the one in # /usr/lib. (This is only an issue when using an `impure' @@ -78,11 +90,6 @@ stdenv.mkDerivation { echo "-L$libc/lib" > $out/nix-support/libc-ldflags - # The dynamic linker is passed in `ldflagsBefore' to allow - # explicit overrides of the dynamic linker by callers to gcc/ld - # (the *last* value counts, so ours should come first). - echo "-dynamic-linker" $dynamicLinker > $out/nix-support/libc-ldflags-before - echo $libc > $out/nix-support/orig-libc '' @@ -213,7 +220,10 @@ stdenv.mkDerivation { '' + '' - substituteAll ${setupHook} $out/nix-support/setup-hook + substituteAll ${setupHook} $out/nix-support/setup-hook.tmp + cat $out/nix-support/setup-hook.tmp >> $out/nix-support/setup-hook + rm $out/nix-support/setup-hook.tmp + substituteAll ${./add-flags} $out/nix-support/add-flags.sh cp -p ${./utils.sh} $out/nix-support/utils.sh ''; @@ -227,6 +237,7 @@ stdenv.mkDerivation { if stdenv.isArm then "ld-linux*.so.3" else if stdenv.system == "powerpc-linux" then "ld.so.1" else if stdenv.system == "mips64el-linux" then "ld.so.1" else + if stdenv.system == "x86_64-darwin" then "${dyld}/lib/dyld" else abort "Don't know the name of the dynamic linker for this platform.") else ""; diff --git a/pkgs/build-support/cc-wrapper/setup-hook.sh b/pkgs/build-support/cc-wrapper/setup-hook.sh index e23d7f4cf12..648afda6ebb 100644 --- a/pkgs/build-support/cc-wrapper/setup-hook.sh +++ b/pkgs/build-support/cc-wrapper/setup-hook.sh @@ -12,6 +12,10 @@ addCVars () { if [ -d $1/lib ]; then export NIX_LDFLAGS+=" -L$1/lib" fi + + if test -d $1/Library/Frameworks; then + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -F$1/Library/Frameworks" + fi } envHooks+=(addCVars) From f2a376f52a49e1cc563b9a3d34a8be9194a33bcd Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Mon, 19 Jan 2015 18:32:10 +0100 Subject: [PATCH 4/4] Enable static libraries in "gmp" to allow static linking of Haskell programs. Haskell programs depend on gmp to implement the unbounded Integer type. Without static variants of gmp we cannot build statically linked Haskell programs, what some users have found desirable in the past. So far, we've used an override to derive our own copy of gmp in the Haskell ecosystem, but this patch ends the dichotomy between Haskell and the rest of Nixpkgs by enabling static gmp libraries in the default build default. --- pkgs/development/libraries/gmp/5.1.x.nix | 9 ++++----- pkgs/top-level/all-packages.nix | 2 +- pkgs/top-level/haskell-ng.nix | 16 ++++++++-------- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/pkgs/development/libraries/gmp/5.1.x.nix b/pkgs/development/libraries/gmp/5.1.x.nix index 5e1282c1d50..0df1a4f8cd8 100644 --- a/pkgs/development/libraries/gmp/5.1.x.nix +++ b/pkgs/development/libraries/gmp/5.1.x.nix @@ -1,8 +1,8 @@ -{ stdenv, fetchurl, m4, cxx ? true, withStatic ? false }: +{ stdenv, fetchurl, m4, cxx ? true, withStatic ? true }: with { inherit (stdenv.lib) optional; }; -stdenv.mkDerivation (rec { +stdenv.mkDerivation rec { name = "gmp-5.1.3"; src = fetchurl { # we need to use bz2, others aren't in bootstrapping stdenv @@ -30,6 +30,8 @@ stdenv.mkDerivation (rec { doCheck = true; + dontDisableStatic = withStatic; + enableParallelBuilding = true; meta = with stdenv.lib; { @@ -63,6 +65,3 @@ stdenv.mkDerivation (rec { maintainers = [ maintainers.simons ]; }; } - // stdenv.lib.optionalAttrs withStatic { dontDisableStatic = true; } -) - diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 299cd0afd44..c0cec16ca04 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3494,7 +3494,7 @@ let # Import Haskell infrastructure. - haskell = let pkgs_ = pkgs // { gmp = gmp.override { withStatic = true; }; }; + haskell = let pkgs_ = pkgs // { /* add necessary overrides here */ }; callPackage = newScope pkgs_; newScope = extra: lib.callPackageWith (pkgs_ // pkgs_.xorg // extra); in callPackage ./haskell-defaults.nix { pkgs = pkgs_; inherit callPackage newScope; }; diff --git a/pkgs/top-level/haskell-ng.nix b/pkgs/top-level/haskell-ng.nix index 2e0d61f1873..6a55023d358 100644 --- a/pkgs/top-level/haskell-ng.nix +++ b/pkgs/top-level/haskell-ng.nix @@ -14,24 +14,24 @@ rec { libiconv = pkgs.darwin.libiconv; }); - ghc6104 = callPackage ../development/compilers/ghc/6.10.4.nix { ghc = compiler.ghc6102Binary; gmp = pkgs.gmp.override { withStatic = true; }; }; - ghc6123 = callPackage ../development/compilers/ghc/6.12.3.nix { ghc = compiler.ghc6102Binary; gmp = pkgs.gmp.override { withStatic = true; }; }; - ghc704 = callPackage ../development/compilers/ghc/7.0.4.nix ({ ghc = compiler.ghc704Binary; gmp = pkgs.gmp.override { withStatic = true; }; } // stdenv.lib.optionalAttrs stdenv.isDarwin { + ghc6104 = callPackage ../development/compilers/ghc/6.10.4.nix { ghc = compiler.ghc6102Binary; }; + ghc6123 = callPackage ../development/compilers/ghc/6.12.3.nix { ghc = compiler.ghc6102Binary; }; + ghc704 = callPackage ../development/compilers/ghc/7.0.4.nix ({ ghc = compiler.ghc704Binary; } // stdenv.lib.optionalAttrs stdenv.isDarwin { libiconv = pkgs.darwin.libiconv; }); - ghc722 = callPackage ../development/compilers/ghc/7.2.2.nix ({ ghc = compiler.ghc704Binary; gmp = pkgs.gmp.override { withStatic = true; }; } // stdenv.lib.optionalAttrs stdenv.isDarwin { + ghc722 = callPackage ../development/compilers/ghc/7.2.2.nix ({ ghc = compiler.ghc704Binary; } // stdenv.lib.optionalAttrs stdenv.isDarwin { libiconv = pkgs.darwin.libiconv; }); - ghc742 = callPackage ../development/compilers/ghc/7.4.2.nix ({ ghc = compiler.ghc704Binary; gmp = pkgs.gmp.override { withStatic = true; }; } // stdenv.lib.optionalAttrs stdenv.isDarwin { + ghc742 = callPackage ../development/compilers/ghc/7.4.2.nix ({ ghc = compiler.ghc704Binary; } // stdenv.lib.optionalAttrs stdenv.isDarwin { libiconv = pkgs.darwin.libiconv; }); - ghc763 = callPackage ../development/compilers/ghc/7.6.3.nix ({ ghc = compiler.ghc704Binary; gmp = pkgs.gmp.override { withStatic = true; }; } // stdenv.lib.optionalAttrs stdenv.isDarwin { + ghc763 = callPackage ../development/compilers/ghc/7.6.3.nix ({ ghc = compiler.ghc704Binary; } // stdenv.lib.optionalAttrs stdenv.isDarwin { libiconv = pkgs.darwin.libiconv; }); - ghc784 = callPackage ../development/compilers/ghc/7.8.4.nix ({ ghc = compiler.ghc742Binary; gmp = pkgs.gmp.override { withStatic = true; }; } // stdenv.lib.optionalAttrs stdenv.isDarwin { + ghc784 = callPackage ../development/compilers/ghc/7.8.4.nix ({ ghc = compiler.ghc742Binary; } // stdenv.lib.optionalAttrs stdenv.isDarwin { libiconv = pkgs.darwin.libiconv; }); - ghc7101 = callPackage ../development/compilers/ghc/7.10.1.nix ({ ghc = compiler.ghc784; gmp = pkgs.gmp.override { withStatic = true; }; } // stdenv.lib.optionalAttrs stdenv.isDarwin { + ghc7101 = callPackage ../development/compilers/ghc/7.10.1.nix ({ ghc = compiler.ghc784; } // stdenv.lib.optionalAttrs stdenv.isDarwin { libiconv = pkgs.darwin.libiconv; }); ghcHEAD = callPackage ../development/compilers/ghc/head.nix ({ inherit (packages.ghc784) ghc alex happy; } // stdenv.lib.optionalAttrs stdenv.isDarwin {