From 88fd7f452703f3280a3747e97b938c8e50ae962c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 30 Dec 2014 10:53:41 +0100 Subject: [PATCH 01/29] Re-Revert merge #5505: util-linux: use /run/current-system/sw/bin/* This reverts commit 6222093eecf1f314f82deafa3162c2ad923e66d3. --- pkgs/os-specific/linux/util-linux/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix index 3b76eb63ea5f..3715a93d9328 100644 --- a/pkgs/os-specific/linux/util-linux/default.nix +++ b/pkgs/os-specific/linux/util-linux/default.nix @@ -8,6 +8,14 @@ stdenv.mkDerivation rec { sha256 = "e0457f715b73f4a349e1acb08cb410bf0edc9a74a3f75c357070f31f70e33cd6"; }; + #FIXME: make it also work on non-nixos? + postPatch = '' + # Substituting store paths would create a circular dependency on systemd + substituteInPlace include/pathnames.h \ + --replace "/bin/login" "/run/current-system/sw/bin/login" \ + --replace "/sbin/shutdown" "/run/current-system/sw/bin/shutdown" + ''; + crossAttrs = { # Work around use of `AC_RUN_IFELSE'. preConfigure = "export scanf_cv_type_modifier=ms"; From d0bad145f5e78f2be6d745da305067398722df17 Mon Sep 17 00:00:00 2001 From: Alexander Kjeldaas Date: Thu, 10 Apr 2014 13:45:26 +0200 Subject: [PATCH 02/29] perl-modules: do not create perllocal.pod, for determinism --- pkgs/development/perl-modules/generic/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/perl-modules/generic/default.nix b/pkgs/development/perl-modules/generic/default.nix index 96094ab4e538..6cd4134cc9c4 100644 --- a/pkgs/development/perl-modules/generic/default.nix +++ b/pkgs/development/perl-modules/generic/default.nix @@ -11,6 +11,9 @@ perl.stdenv.mkDerivation ( # Prevent CPAN downloads. PERL_AUTOINSTALL = "--skipdeps"; + # Avoid creating perllocal.pod, which contains a timestamp + installTargets = "pure_install"; + # From http://wiki.cpantesters.org/wiki/CPANAuthorNotes: "allows # authors to skip certain tests (or include certain tests) when # the results are not being monitored by a human being." From e53471eb54aa4de31a85fe072abb9c5e0f552ffc Mon Sep 17 00:00:00 2001 From: Alexander Kjeldaas Date: Fri, 11 Apr 2014 15:04:53 +0200 Subject: [PATCH 03/29] makeInitrd: use deterministic compression --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2cb3ea834d92..f1e2fc53be65 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -380,7 +380,7 @@ let inherit lib; }; - makeInitrd = {contents, compressor ? "gzip -9"}: + makeInitrd = {contents, compressor ? "gzip -9n"}: import ../build-support/kernel/make-initrd.nix { inherit stdenv perl perlArchiveCpio cpio contents ubootChooser compressor; }; From d8c5d95330d9806b3ee30569de76660f3931d5ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 21 Sep 2014 08:59:13 +0200 Subject: [PATCH 04/29] determinism: change some fixed timestamp to != (time_t)0 vcunat removed the unrelated glib change. Conflicts: pkgs/development/libraries/glib/default.nix pkgs/os-specific/linux/kernel/generic.nix pkgs/os-specific/linux/kernel/manual-config.nix --- .../interpreters/perl/5.16/no-impure-config-time.patch | 2 +- pkgs/development/libraries/libgcrypt/no-build-timestamp.patch | 2 +- pkgs/development/libraries/libgpg-error/default.nix | 2 +- pkgs/os-specific/linux/kernel/generic.nix | 1 + pkgs/os-specific/linux/kernel/manual-config.nix | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/development/interpreters/perl/5.16/no-impure-config-time.patch b/pkgs/development/interpreters/perl/5.16/no-impure-config-time.patch index 2bf1841e9dd2..1382de70625e 100644 --- a/pkgs/development/interpreters/perl/5.16/no-impure-config-time.patch +++ b/pkgs/development/interpreters/perl/5.16/no-impure-config-time.patch @@ -4,7 +4,7 @@ : who configured the system cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1` -+cf_time='Thu Jan 1 00:00:00 UTC 1970' ++cf_time='Thu Jan 1 00:00:01 UTC 1970' + case "$cf_by" in "") diff --git a/pkgs/development/libraries/libgcrypt/no-build-timestamp.patch b/pkgs/development/libraries/libgcrypt/no-build-timestamp.patch index 6ae708f059d7..897773387232 100644 --- a/pkgs/development/libraries/libgcrypt/no-build-timestamp.patch +++ b/pkgs/development/libraries/libgcrypt/no-build-timestamp.patch @@ -5,7 +5,7 @@ diff -ur libgcrypt-1.5.3.orig/configure libgcrypt-1.5.3/configure BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date` -+BUILD_TIMESTAMP=1970-01-01T00:00+0000 ++BUILD_TIMESTAMP=1970-01-01T00:01+0000 cat >>confdefs.h <<_ACEOF diff --git a/pkgs/development/libraries/libgpg-error/default.nix b/pkgs/development/libraries/libgpg-error/default.nix index ecea33275fe6..8f41f24cae4a 100644 --- a/pkgs/development/libraries/libgpg-error/default.nix +++ b/pkgs/development/libraries/libgpg-error/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "1dapxzxl1naghf342fwfc2w2f2c5hb9gr1a1s4n8dsqn26kybx1z"; }; - postPatch = "sed '/BUILD_TIMESTAMP=/s/=.*/=1970-01-01T00:00+0000/' -i ./configure"; + postPatch = "sed '/BUILD_TIMESTAMP=/s/=.*/=1970-01-01T00:01+0000/' -i ./configure"; # If architecture-dependent MO files aren't available, they're generated # during build, so we need gettext for cross-builds. diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index 13250e45494f..af2ae3b54db4 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -57,6 +57,7 @@ let autoModules = stdenv.platform.kernelAutoModules; arch = stdenv.platform.kernelArch; + KBUILD_BUILD_TIMESTAMP = 1; # (time_t)1 crossAttrs = let cp = stdenv.cross.platform; in { diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 6d9baed7f2dd..b840e252cdf4 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -104,7 +104,7 @@ let buildFlagsArray+=("KBUILD_BUILD_TIMESTAMP=Thu Jan 1 00:00:01 UTC 1970") ''; - buildFlags = [ + KBUILD_BUILD_TIMESTAMP=1; # (time_t)1 "KBUILD_BUILD_VERSION=1-NixOS" platform.kernelTarget ] ++ optional isModular "modules"; From 512fbb280f72980e84230b72b631258df1755919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Fri, 2 Jan 2015 02:58:18 +0100 Subject: [PATCH 05/29] Introduce patchShebangsPhase ran in preConfigurePhases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 91c7e8747af1fdc2a70cd98594ccbb12a5c6902d) Signed-off-by: Domen Kožar --- doc/stdenv.xml | 6 ++++++ pkgs/applications/audio/caudec/default.nix | 4 ---- pkgs/applications/editors/geany/default.nix | 2 -- pkgs/applications/graphics/shotwell/default.nix | 4 ---- pkgs/applications/graphics/xara/default.nix | 1 - pkgs/applications/misc/bibletime/default.nix | 1 - pkgs/applications/misc/xiphos/default.nix | 1 - .../networking/browsers/chromium/source/default.nix | 2 -- .../networking/cluster/kubernetes/default.nix | 2 -- .../networking/instant-messengers/freetalk/default.nix | 1 - .../networking/instant-messengers/jitsi/default.nix | 1 - .../networking/instant-messengers/kadu/default.nix | 4 ---- .../networking/mailreaders/thunderbird/default.nix | 2 -- pkgs/applications/networking/p2p/gnunet/default.nix | 1 - pkgs/applications/networking/p2p/gnunet/svn.nix | 1 - pkgs/applications/science/logic/cvc4/default.nix | 2 -- pkgs/applications/science/logic/isabelle/default.nix | 1 - pkgs/applications/video/cmplayer/default.nix | 6 ------ pkgs/applications/video/mplayer2/default.nix | 4 ---- pkgs/applications/video/mpv/default.nix | 1 - pkgs/applications/virtualization/docker/default.nix | 1 - pkgs/applications/window-managers/i3/default.nix | 4 ---- pkgs/build-support/setup-hooks/patch-shebangs.sh | 6 ++++++ pkgs/data/documentation/stdman/default.nix | 5 ----- pkgs/desktops/cinnamon/cjs.nix | 2 -- pkgs/desktops/cinnamon/muffin.nix | 3 --- pkgs/desktops/gnome-3/3.12/core/caribou/default.nix | 4 ---- pkgs/desktops/gnome-3/3.12/core/gnome-shell/default.nix | 1 - pkgs/desktops/gnome-3/3.12/core/vte/0.38.0.nix | 2 -- pkgs/development/compilers/go/1.1-darwin.nix | 1 - pkgs/development/compilers/go/1.1.nix | 1 - pkgs/development/compilers/go/1.2.nix | 1 - pkgs/development/compilers/go/default.nix | 1 - pkgs/development/compilers/julia/0.3.3.nix | 2 -- pkgs/development/compilers/mono/default.nix | 1 - pkgs/development/compilers/opa/default.nix | 1 - .../libraries/agda/agda-iowa-stdlib/default.nix | 1 - pkgs/development/libraries/dbus/default.nix | 1 - pkgs/development/libraries/folly/default.nix | 3 --- pkgs/development/libraries/hspell/default.nix | 1 - pkgs/development/libraries/ibus/default.nix | 1 - pkgs/development/libraries/libcouchbase/default.nix | 3 +-- pkgs/development/libraries/libctemplate/default.nix | 4 ---- pkgs/development/libraries/libqmi/default.nix | 4 ---- pkgs/development/libraries/libsoup/default.nix | 4 ---- pkgs/development/libraries/libvirt/default.nix | 1 - pkgs/development/libraries/lirc/default.nix | 2 -- pkgs/development/libraries/mesa-darwin/default.nix | 2 -- pkgs/development/libraries/mesa/default.nix | 1 - pkgs/development/libraries/polkit/default.nix | 4 +--- pkgs/development/libraries/qpdf/default.nix | 2 -- pkgs/development/libraries/sword/default.nix | 4 ---- pkgs/development/libraries/webkitgtk/2.4.6.nix | 4 ---- pkgs/development/libraries/webkitgtk/default.nix | 2 -- pkgs/development/libraries/zeitgeist/default.nix | 2 -- pkgs/development/ocaml-modules/javalib/default.nix | 2 -- pkgs/development/ocaml-modules/sawja/default.nix | 2 -- pkgs/development/python-modules/dbus/default.nix | 2 -- pkgs/development/r-modules/default.nix | 8 -------- pkgs/development/tools/build-managers/icmake/default.nix | 3 +-- pkgs/development/tools/documentation/doxygen/default.nix | 4 +--- pkgs/development/tools/misc/yodl/default.nix | 1 - pkgs/games/crawl/default.nix | 4 ---- pkgs/misc/vim-plugins/default.nix | 2 -- pkgs/os-specific/darwin/cctools-port/default.nix | 1 - pkgs/os-specific/linux/hwdata/default.nix | 2 -- pkgs/os-specific/linux/x86info/default.nix | 2 -- pkgs/servers/amqp/rabbitmq-server/default.nix | 5 ----- pkgs/servers/fleet/default.nix | 1 - pkgs/servers/gpsd/default.nix | 1 - pkgs/servers/http/openresty/default.nix | 1 - pkgs/servers/nosql/rethinkdb/default.nix | 1 - pkgs/servers/nosql/riak/1.3.1.nix | 1 - pkgs/servers/openafs-client/default.nix | 1 - pkgs/tools/backup/bup/default.nix | 1 - pkgs/tools/cd-dvd/dvdisaster/default.nix | 4 ---- pkgs/tools/filesystems/nixpart/0.4/pyparted.nix | 1 - pkgs/tools/misc/convmv/default.nix | 3 +-- pkgs/tools/misc/opentsdb/default.nix | 1 - pkgs/tools/misc/parted/default.nix | 1 - pkgs/tools/misc/pipelight/default.nix | 1 - pkgs/tools/security/mbox/default.nix | 1 - pkgs/tools/typesetting/tex/latex2html/default.nix | 1 - pkgs/tools/virtualization/cloud-init/default.nix | 2 -- pkgs/top-level/perl-packages.nix | 1 - pkgs/top-level/python-packages.nix | 5 ----- 86 files changed, 17 insertions(+), 178 deletions(-) diff --git a/doc/stdenv.xml b/doc/stdenv.xml index 00fa7567c078..8eb6fadd3c86 100644 --- a/doc/stdenv.xml +++ b/doc/stdenv.xml @@ -853,6 +853,12 @@ following: rewritten to paths in the Nix store. + + dontPatchSourceShebangs + Same as dontPatchShebangs, but applied + to the source code before configurePhase. + + forceShare The list of directories that must be moved from diff --git a/pkgs/applications/audio/caudec/default.nix b/pkgs/applications/audio/caudec/default.nix index 24613d4dd965..fb2970ed5fa5 100644 --- a/pkgs/applications/audio/caudec/default.nix +++ b/pkgs/applications/audio/caudec/default.nix @@ -12,10 +12,6 @@ stdenv.mkDerivation rec { sha256 = "5d1f5ab3286bb748bd29cbf45df2ad2faf5ed86070f90deccf71c60be832f3d5"; }; - preBuild = '' - patchShebangs ./install.sh - ''; - buildInputs = [ bash makeWrapper ]; installPhase = '' diff --git a/pkgs/applications/editors/geany/default.nix b/pkgs/applications/editors/geany/default.nix index 8d4002c9ef85..9b3ee6d4f887 100644 --- a/pkgs/applications/editors/geany/default.nix +++ b/pkgs/applications/editors/geany/default.nix @@ -18,8 +18,6 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - patchPhase = "patchShebangs ."; - # This file should normally require a gtk-update-icon-cache -q /usr/share/icons/hicolor command # It have no reasons to exist in a redistribuable package postInstall = "rm $out/share/icons/hicolor/icon-theme.cache"; diff --git a/pkgs/applications/graphics/shotwell/default.nix b/pkgs/applications/graphics/shotwell/default.nix index 223f632f937d..5f3b96ba16e3 100644 --- a/pkgs/applications/graphics/shotwell/default.nix +++ b/pkgs/applications/graphics/shotwell/default.nix @@ -30,10 +30,6 @@ in stdenv.mkDerivation rec { configureFlags = [ "--disable-gsettings-convert-install" ]; - preConfigure = '' - patchShebangs . - ''; - postInstall = '' mkdir -p $out/share/gsettings-schemas/$name mv $out/share/glib-2.0 $out/share/gsettings-schemas/$name/ diff --git a/pkgs/applications/graphics/xara/default.nix b/pkgs/applications/graphics/xara/default.nix index cd3a09887d0f..e53514a6c1f6 100644 --- a/pkgs/applications/graphics/xara/default.nix +++ b/pkgs/applications/graphics/xara/default.nix @@ -16,5 +16,4 @@ stdenv.mkDerivation { patches = map fetchurl (import ./debian-patches.nix); - prePatch = "patchShebangs Scripts"; } diff --git a/pkgs/applications/misc/bibletime/default.nix b/pkgs/applications/misc/bibletime/default.nix index 41184d6e9492..df6a3a271b67 100644 --- a/pkgs/applications/misc/bibletime/default.nix +++ b/pkgs/applications/misc/bibletime/default.nix @@ -12,7 +12,6 @@ stdenv.mkDerivation rec { }; prePatch = '' - patchShebangs .; ''; preConfigure = '' diff --git a/pkgs/applications/misc/xiphos/default.nix b/pkgs/applications/misc/xiphos/default.nix index d2739dbec505..bce45286d1f3 100644 --- a/pkgs/applications/misc/xiphos/default.nix +++ b/pkgs/applications/misc/xiphos/default.nix @@ -24,7 +24,6 @@ stdenv.mkDerivation rec { libglade scrollkeeper webkitgtk dbus_glib enchant isocodes libuuid ]; prePatch = '' - patchShebangs .; ''; preConfigure = '' diff --git a/pkgs/applications/networking/browsers/chromium/source/default.nix b/pkgs/applications/networking/browsers/chromium/source/default.nix index adac4baa29cd..f4e54c533236 100644 --- a/pkgs/applications/networking/browsers/chromium/source/default.nix +++ b/pkgs/applications/networking/browsers/chromium/source/default.nix @@ -20,8 +20,6 @@ stdenv.mkDerivation { opensslPatches = optional useOpenSSL openssl.patches; - prePatch = "patchShebangs ."; - patches = [ ./sandbox_userns_36.patch ./nix_plugin_paths.patch ]; postPatch = '' diff --git a/pkgs/applications/networking/cluster/kubernetes/default.nix b/pkgs/applications/networking/cluster/kubernetes/default.nix index 7931da602d6e..7f3eef7554c6 100644 --- a/pkgs/applications/networking/cluster/kubernetes/default.nix +++ b/pkgs/applications/networking/cluster/kubernetes/default.nix @@ -13,8 +13,6 @@ stdenv.mkDerivation rec { buildInputs = [ makeWrapper which go iptables rsync ]; - preBuild = "patchShebangs ./hack"; - postBuild = ''go build --ldflags '-extldflags "-static" -s' build/pause/pause.go''; installPhase = '' diff --git a/pkgs/applications/networking/instant-messengers/freetalk/default.nix b/pkgs/applications/networking/instant-messengers/freetalk/default.nix index 320e7094d484..fd545ee7f587 100644 --- a/pkgs/applications/networking/instant-messengers/freetalk/default.nix +++ b/pkgs/applications/networking/instant-messengers/freetalk/default.nix @@ -28,7 +28,6 @@ stdenv.mkDerivation { }; preConfigure = '' - patchShebangs . ./autogen.sh ''; diff --git a/pkgs/applications/networking/instant-messengers/jitsi/default.nix b/pkgs/applications/networking/instant-messengers/jitsi/default.nix index e6dd6569a55f..575c6c044643 100644 --- a/pkgs/applications/networking/instant-messengers/jitsi/default.nix +++ b/pkgs/applications/networking/instant-messengers/jitsi/default.nix @@ -33,7 +33,6 @@ stdenv.mkDerivation rec { cp resources/install/generic/run.sh $out/bin/jitsi chmod +x $out/bin/jitsi sed -i 's| java | ${jdk}/bin/java |' $out/bin/jitsi - patchShebangs $out ''; meta = { diff --git a/pkgs/applications/networking/instant-messengers/kadu/default.nix b/pkgs/applications/networking/instant-messengers/kadu/default.nix index 44cf13e2917c..df8846c36b11 100644 --- a/pkgs/applications/networking/instant-messengers/kadu/default.nix +++ b/pkgs/applications/networking/instant-messengers/kadu/default.nix @@ -21,10 +21,6 @@ stdenv.mkDerivation { cmakeFlags = "-DENABLE_AUTODOWNLOAD=OFF -DBUILD_DESCRIPTION='NixOS' -DCMAKE_BUILD_TYPE=Release"; - prePatch = '' - patchShebangs . - ''; - # Disable the kadu plugins I wasn't able to get to work patchPhase = '' sed -i -e '/mpd_mediaplayer/d' \ diff --git a/pkgs/applications/networking/mailreaders/thunderbird/default.nix b/pkgs/applications/networking/mailreaders/thunderbird/default.nix index e6ba7e21dc8e..6e628dc081cb 100644 --- a/pkgs/applications/networking/mailreaders/thunderbird/default.nix +++ b/pkgs/applications/networking/mailreaders/thunderbird/default.nix @@ -71,8 +71,6 @@ stdenv.mkDerivation rec { ++ stdenv.lib.optional enableOfficialBranding "--enable-official-branding"; configurePhase = '' - patchShebangs . - echo '${stdenv.lib.concatMapStrings (s : "ac_add_options ${s}\n") configureFlags}' > .mozconfig echo "ac_add_options --prefix='$out'" >> .mozconfig echo "mk_add_options MOZ_MAKE_FLAGS='-j$NIX_BUILD_CORES'" >> .mozconfig diff --git a/pkgs/applications/networking/p2p/gnunet/default.nix b/pkgs/applications/networking/p2p/gnunet/default.nix index 052c53112536..2475adadefbf 100644 --- a/pkgs/applications/networking/p2p/gnunet/default.nix +++ b/pkgs/applications/networking/p2p/gnunet/default.nix @@ -38,7 +38,6 @@ stdenv.mkDerivation rec { # Ensure NSS installation works fine configureFlags="$configureFlags --with-nssdir=$out/lib" - patchShebangs src/gns/nss/install-nss-plugin.sh ''; doCheck = false; diff --git a/pkgs/applications/networking/p2p/gnunet/svn.nix b/pkgs/applications/networking/p2p/gnunet/svn.nix index 25a51b3c9365..9e593975412d 100644 --- a/pkgs/applications/networking/p2p/gnunet/svn.nix +++ b/pkgs/applications/networking/p2p/gnunet/svn.nix @@ -47,7 +47,6 @@ stdenv.mkDerivation rec { # Ensure NSS installation works fine configureFlags="$configureFlags --with-nssdir=$out/lib" - patchShebangs src/gns/nss/install-nss-plugin.sh sh contrib/pogen.sh sh bootstrap diff --git a/pkgs/applications/science/logic/cvc4/default.nix b/pkgs/applications/science/logic/cvc4/default.nix index 5b2e9c54d6f8..a2618d88918f 100644 --- a/pkgs/applications/science/logic/cvc4/default.nix +++ b/pkgs/applications/science/logic/cvc4/default.nix @@ -9,8 +9,6 @@ stdenv.mkDerivation { buildInputs = [ gmp libantlr3c boost ]; - preConfigure = "patchShebangs ./src/"; - doChecks = true; meta = with stdenv.lib; { diff --git a/pkgs/applications/science/logic/isabelle/default.nix b/pkgs/applications/science/logic/isabelle/default.nix index 88bbe820e2f3..4b68f0e3cd6b 100644 --- a/pkgs/applications/science/logic/isabelle/default.nix +++ b/pkgs/applications/science/logic/isabelle/default.nix @@ -27,7 +27,6 @@ stdenv.mkDerivation { postPatch = '' ENV=$(type -p env) - patchShebangs "." substituteInPlace lib/Tools/env \ --replace /usr/bin/env $ENV substituteInPlace lib/Tools/install \ diff --git a/pkgs/applications/video/cmplayer/default.nix b/pkgs/applications/video/cmplayer/default.nix index 3fa38646d9df..fe02f9a33011 100644 --- a/pkgs/applications/video/cmplayer/default.nix +++ b/pkgs/applications/video/cmplayer/default.nix @@ -54,10 +54,6 @@ stdenv.mkDerivation rec { ++ optional cddaSupport libcdda ; - preConfigure = '' - patchShebangs ./configure - patchShebangs src/mpv/waf - ''; configureFlags = with stdenv.lib; [ "--qmake=qmake" ] @@ -67,8 +63,6 @@ stdenv.mkDerivation rec { ++ optional cddaSupport "--enable-cdda" ; - preBuild = "patchShebangs ./build-mpv"; - nativeBuildInputs = [ pkgconfig python2 perl ]; enableParallelBuilding = true; diff --git a/pkgs/applications/video/mplayer2/default.nix b/pkgs/applications/video/mplayer2/default.nix index 5827e22ea5e0..6d47ed71b40e 100644 --- a/pkgs/applications/video/mplayer2/default.nix +++ b/pkgs/applications/video/mplayer2/default.nix @@ -103,10 +103,6 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ yasm python3 ]; - postConfigure = '' - patchShebangs TOOLS - ''; - configureFlags = with stdenv.lib; '' ${optionalString (useUnfreeCodecs && codecs != null) "--codecsdir=${codecs}"} diff --git a/pkgs/applications/video/mpv/default.nix b/pkgs/applications/video/mpv/default.nix index 052add92a1fe..b87024303fe2 100644 --- a/pkgs/applications/video/mpv/default.nix +++ b/pkgs/applications/video/mpv/default.nix @@ -97,7 +97,6 @@ stdenv.mkDerivation rec { configurePhase = '' python3 ${waf} configure --prefix=$out ${lib.optionalString vaapiSupport "--enable-vaapi"} - patchShebangs TOOLS ''; buildPhase = '' diff --git a/pkgs/applications/virtualization/docker/default.nix b/pkgs/applications/virtualization/docker/default.nix index 3483b0ac6d20..01f0542e6f4b 100644 --- a/pkgs/applications/virtualization/docker/default.nix +++ b/pkgs/applications/virtualization/docker/default.nix @@ -15,7 +15,6 @@ stdenv.mkDerivation rec { dontStrip = true; buildPhase = '' - patchShebangs ./hack export AUTO_GOPATH=1 export DOCKER_GITCOMMIT="c78088f" ./hack/make.sh dynbinary diff --git a/pkgs/applications/window-managers/i3/default.nix b/pkgs/applications/window-managers/i3/default.nix index 39705aca1162..aceb7a0b13c2 100644 --- a/pkgs/applications/window-managers/i3/default.nix +++ b/pkgs/applications/window-managers/i3/default.nix @@ -18,10 +18,6 @@ stdenv.mkDerivation rec { perlPackages.ExtUtilsPkgConfig perlPackages.TestMore perlPackages.InlineC ]; - postPatch = '' - patchShebangs . - ''; - doCheck = stdenv.system == "x86_64-linux"; checkPhase = '' diff --git a/pkgs/build-support/setup-hooks/patch-shebangs.sh b/pkgs/build-support/setup-hooks/patch-shebangs.sh index 5a7f23b2d816..c51fce708f35 100644 --- a/pkgs/build-support/setup-hooks/patch-shebangs.sh +++ b/pkgs/build-support/setup-hooks/patch-shebangs.sh @@ -7,6 +7,12 @@ fixupOutputHooks+=('if [ -z "$dontPatchShebangs" ]; then patchShebangs "$prefix"; fi') +preConfigurePhases+=" patchShebangsPhase" + +patchShebangsPhase() { + if [ -z "$dontPatchSourceShebangs" ]; then patchShebangs "."; fi +} + patchShebangs() { local dir="$1" header "patching script interpreter paths in $dir" diff --git a/pkgs/data/documentation/stdman/default.nix b/pkgs/data/documentation/stdman/default.nix index 33c002e98013..53f44736350a 100644 --- a/pkgs/data/documentation/stdman/default.nix +++ b/pkgs/data/documentation/stdman/default.nix @@ -11,11 +11,6 @@ stdenv.mkDerivation rec { sha256 = "09c5gjhcz97ghfrv9zkgfb1wckvmqnhbzga0xidbm1ir7640di8l"; }; - preConfigure = " - patchShebangs ./configure - patchShebangs ./do_install - "; - buildInputs = [ curl ]; meta = with stdenv.lib; { diff --git a/pkgs/desktops/cinnamon/cjs.nix b/pkgs/desktops/cinnamon/cjs.nix index 5d5847615653..6c10340a8f9e 100644 --- a/pkgs/desktops/cinnamon/cjs.nix +++ b/pkgs/desktops/cinnamon/cjs.nix @@ -19,8 +19,6 @@ stdenv.mkDerivation rec { gobjectIntrospection ]; - preBuild = "patchShebangs ./scripts"; - meta = { homepage = "http://cinnamon.linuxmint.com"; description = "JavaScript bindings for Cinnamon" ; diff --git a/pkgs/desktops/cinnamon/muffin.nix b/pkgs/desktops/cinnamon/muffin.nix index a1fd6b97ac16..7eb24444246a 100644 --- a/pkgs/desktops/cinnamon/muffin.nix +++ b/pkgs/desktops/cinnamon/muffin.nix @@ -25,9 +25,6 @@ stdenv.mkDerivation { clutter cogl zenity python gnome_doc_utils makeWrapper]; - preBuild = "patchShebangs ./scripts"; - - postFixup = '' for f in "$out/bin/"*; do diff --git a/pkgs/desktops/gnome-3/3.12/core/caribou/default.nix b/pkgs/desktops/gnome-3/3.12/core/caribou/default.nix index 3a6c3f0dd357..966d26cff01e 100644 --- a/pkgs/desktops/gnome-3/3.12/core/caribou/default.nix +++ b/pkgs/desktops/gnome-3/3.12/core/caribou/default.nix @@ -16,10 +16,6 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ gnome3.libgee libxklavier ]; - preBuild = '' - patchShebangs . - ''; - meta = with stdenv.lib; { platforms = platforms.linux; }; diff --git a/pkgs/desktops/gnome-3/3.12/core/gnome-shell/default.nix b/pkgs/desktops/gnome-3/3.12/core/gnome-shell/default.nix index 6f6816efa5bd..9136a48d4012 100644 --- a/pkgs/desktops/gnome-3/3.12/core/gnome-shell/default.nix +++ b/pkgs/desktops/gnome-3/3.12/core/gnome-shell/default.nix @@ -27,7 +27,6 @@ stdenv.mkDerivation rec { installFlags = [ "keysdir=$(out)/share/gnome-control-center/keybindings" ]; preBuild = '' - patchShebangs src/data-to-c.pl substituteInPlace data/Makefile --replace " install-keysDATA" "" ''; diff --git a/pkgs/desktops/gnome-3/3.12/core/vte/0.38.0.nix b/pkgs/desktops/gnome-3/3.12/core/vte/0.38.0.nix index 548ca347a456..2c10eccb1e83 100644 --- a/pkgs/desktops/gnome-3/3.12/core/vte/0.38.0.nix +++ b/pkgs/desktops/gnome-3/3.12/core/vte/0.38.0.nix @@ -17,8 +17,6 @@ stdenv.mkDerivation rec { buildInputs = [ gobjectIntrospection intltool pkgconfig gnome3.glib gnome3.gtk3 ncurses vala libxml2 ]; - preConfigure = "patchShebangs ."; - configureFlags = [ "--enable-introspection" ]; enableParallelBuilding = true; diff --git a/pkgs/development/compilers/go/1.1-darwin.nix b/pkgs/development/compilers/go/1.1-darwin.nix index 5b17f56ac37a..411c3e029a6a 100644 --- a/pkgs/development/compilers/go/1.1-darwin.nix +++ b/pkgs/development/compilers/go/1.1-darwin.nix @@ -22,7 +22,6 @@ stdenv.mkDerivation { fi cd go - patchShebangs ./ # replace /bin/bash rm src/pkg/net/{multicast_test.go,parse_test.go,port_test.go} # The os test wants to read files in an existing path. Just it don't be /usr/bin. sed -i 's,/usr/bin,'"`pwd`", src/pkg/os/os_test.go diff --git a/pkgs/development/compilers/go/1.1.nix b/pkgs/development/compilers/go/1.1.nix index 11640f2393d2..1a6bfcad3990 100644 --- a/pkgs/development/compilers/go/1.1.nix +++ b/pkgs/development/compilers/go/1.1.nix @@ -33,7 +33,6 @@ stdenv.mkDerivation { fi cd go - patchShebangs ./ # replace /bin/bash # !!! substituteInPlace does not seems to be effective. sed -i 's,/lib/ld-linux.so.2,${loader386},' src/cmd/8l/asm.c sed -i 's,/lib64/ld-linux-x86-64.so.2,${loaderAmd64},' src/cmd/6l/asm.c diff --git a/pkgs/development/compilers/go/1.2.nix b/pkgs/development/compilers/go/1.2.nix index a00fe7346701..c091312c2a99 100644 --- a/pkgs/development/compilers/go/1.2.nix +++ b/pkgs/development/compilers/go/1.2.nix @@ -32,7 +32,6 @@ stdenv.mkDerivation { fi cd go - patchShebangs ./ # replace /bin/bash # !!! substituteInPlace does not seems to be effective. sed -i 's,/lib/ld-linux.so.2,${loader386},' src/cmd/8l/asm.c sed -i 's,/lib64/ld-linux-x86-64.so.2,${loaderAmd64},' src/cmd/6l/asm.c diff --git a/pkgs/development/compilers/go/default.nix b/pkgs/development/compilers/go/default.nix index b35159c10e79..8756aaa66291 100644 --- a/pkgs/development/compilers/go/default.nix +++ b/pkgs/development/compilers/go/default.nix @@ -30,7 +30,6 @@ stdenv.mkDerivation { fi cd go - patchShebangs ./ # replace /bin/bash # !!! substituteInPlace does not seems to be effective. sed -i 's,/lib/ld-linux.so.2,${loader386},' src/cmd/8l/asm.c sed -i 's,/lib64/ld-linux-x86-64.so.2,${loaderAmd64},' src/cmd/6l/asm.c diff --git a/pkgs/development/compilers/julia/0.3.3.nix b/pkgs/development/compilers/julia/0.3.3.nix index a8ad9d00aec5..89297995c4ee 100644 --- a/pkgs/development/compilers/julia/0.3.3.nix +++ b/pkgs/development/compilers/julia/0.3.3.nix @@ -106,8 +106,6 @@ stdenv.mkDerivation rec { export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PWD/usr/lib:$PWD/usr/lib/julia" - patchShebangs . contrib - export PATH="$PATH:${stdenv.cc.libc}/sbin" # ldconfig doesn't seem to ever work on NixOS; system-wide ldconfig cache diff --git a/pkgs/development/compilers/mono/default.nix b/pkgs/development/compilers/mono/default.nix index e098f48a24ce..c715a6843954 100644 --- a/pkgs/development/compilers/mono/default.nix +++ b/pkgs/development/compilers/mono/default.nix @@ -35,7 +35,6 @@ stdenv.mkDerivation rec { # LLVM path to point into the Mono LLVM build, since it's private anyway. preBuild = '' makeFlagsArray=(INSTALL=`type -tp install`) - patchShebangs ./ '' + stdenv.lib.optionalString withLLVM '' substituteInPlace mono/mini/aot-compiler.c --replace "llvm_path = g_strdup (\"\")" "llvm_path = g_strdup (\"${llvm}/bin/\")" ''; diff --git a/pkgs/development/compilers/opa/default.nix b/pkgs/development/compilers/opa/default.nix index f0b503bd0be7..f60b90296325 100644 --- a/pkgs/development/compilers/opa/default.nix +++ b/pkgs/development/compilers/opa/default.nix @@ -19,7 +19,6 @@ stdenv.mkDerivation rec { codeGeneratorPaths = "${ocamlPackages.ocaml}/bin:${gcc}/bin:${binutils}/bin:${gnumake}/bin:${nodejs}/bin"; preConfigure = '' - patchShebangs . ( cat ./compiler/buildinfos/buildInfos.ml.pre ./compiler/buildinfos/generate_buildinfos.sh . --release --version ./compiler/buildinfos/version_major.txt diff --git a/pkgs/development/libraries/agda/agda-iowa-stdlib/default.nix b/pkgs/development/libraries/agda/agda-iowa-stdlib/default.nix index 2c76c2f43508..446bfdf9ca78 100644 --- a/pkgs/development/libraries/agda/agda-iowa-stdlib/default.nix +++ b/pkgs/development/libraries/agda/agda-iowa-stdlib/default.nix @@ -12,7 +12,6 @@ agda.mkDerivation (self: rec { sourceDirectories = [ "./." ]; buildPhase = '' - patchShebangs find-deps.sh make ''; diff --git a/pkgs/development/libraries/dbus/default.nix b/pkgs/development/libraries/dbus/default.nix index d332321a22ad..145462b38d0e 100644 --- a/pkgs/development/libraries/dbus/default.nix +++ b/pkgs/development/libraries/dbus/default.nix @@ -47,7 +47,6 @@ let buildInputs = [ autoconf automake libtool ]; # ToDo: optional selinux? preConfigure = '' - patchShebangs . substituteInPlace tools/Makefile.am --replace 'install-localstatelibDATA:' 'disabled:' autoreconf -fi ''; diff --git a/pkgs/development/libraries/folly/default.nix b/pkgs/development/libraries/folly/default.nix index 66d4f73096b8..dced097a05ae 100644 --- a/pkgs/development/libraries/folly/default.nix +++ b/pkgs/development/libraries/folly/default.nix @@ -17,9 +17,6 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook python boost ]; postUnpack = "sourceRoot=\${sourceRoot}/folly"; - preBuild = '' - patchShebangs build - ''; configureFlags = [ "--with-boost-libdir=${boost.lib}/lib" ]; diff --git a/pkgs/development/libraries/hspell/default.nix b/pkgs/development/libraries/hspell/default.nix index 9b44d12c2934..9cd071f6cbe9 100644 --- a/pkgs/development/libraries/hspell/default.nix +++ b/pkgs/development/libraries/hspell/default.nix @@ -13,7 +13,6 @@ stdenv.mkDerivation rec { sha256 = "08x7rigq5pa1pfpl30qp353hbdkpadr1zc49slpczhsn0sg36pd6"; }; - patchPhase = ''patchShebangs .''; buildInputs = [ perl zlib ]; makeFlags = "CFLAGS=-fPIC"; diff --git a/pkgs/development/libraries/ibus/default.nix b/pkgs/development/libraries/ibus/default.nix index 6b426169a708..ef794b452798 100644 --- a/pkgs/development/libraries/ibus/default.nix +++ b/pkgs/development/libraries/ibus/default.nix @@ -20,7 +20,6 @@ stdenv.mkDerivation rec { ]; preBuild = '' - patchShebangs ./scripts substituteInPlace data/dconf/Makefile --replace "dconf update" "echo" ''; diff --git a/pkgs/development/libraries/libcouchbase/default.nix b/pkgs/development/libraries/libcouchbase/default.nix index 841edd3dff61..3e1251215795 100644 --- a/pkgs/development/libraries/libcouchbase/default.nix +++ b/pkgs/development/libraries/libcouchbase/default.nix @@ -11,7 +11,6 @@ stdenv.mkDerivation { }; preConfigure = '' - patchShebangs ./config/ ./config/autorun.sh ''; @@ -25,4 +24,4 @@ stdenv.mkDerivation { license = stdenv.lib.licenses.asl20; platforms = stdenv.lib.platforms.unix; }; -} \ No newline at end of file +} diff --git a/pkgs/development/libraries/libctemplate/default.nix b/pkgs/development/libraries/libctemplate/default.nix index 142025c1e51d..578ccffd0948 100644 --- a/pkgs/development/libraries/libctemplate/default.nix +++ b/pkgs/development/libraries/libctemplate/default.nix @@ -12,10 +12,6 @@ stdenv.mkDerivation rec { buildInputs = [ python ]; - postPatch = '' - patchShebangs . - ''; - meta = { description = "A simple but powerful template language for C++"; longDescription = '' diff --git a/pkgs/development/libraries/libqmi/default.nix b/pkgs/development/libraries/libqmi/default.nix index a0292067dbb2..9a934befde98 100644 --- a/pkgs/development/libraries/libqmi/default.nix +++ b/pkgs/development/libraries/libqmi/default.nix @@ -8,10 +8,6 @@ stdenv.mkDerivation rec { sha256 = "03gf221yjcdzvnl4v2adwpc6cyg5mlbccn20s00fp5bgvmq81pgs"; }; - preBuild = '' - patchShebangs . - ''; - buildInputs = [ pkgconfig glib python ]; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/libsoup/default.nix b/pkgs/development/libraries/libsoup/default.nix index cd2a15ffc668..517eed606e6e 100644 --- a/pkgs/development/libraries/libsoup/default.nix +++ b/pkgs/development/libraries/libsoup/default.nix @@ -14,10 +14,6 @@ stdenv.mkDerivation { sha256 = "ea34dd64fe44343445daf6dd690d0691e9d973468de44878da97371c16d89784"; }; - patchPhase = '' - patchShebangs libsoup/ - ''; - buildInputs = libintlOrEmpty ++ [ intltool python ]; nativeBuildInputs = [ pkgconfig ]; propagatedBuildInputs = [ glib libxml2 gobjectIntrospection ] diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix index 8bd4866cb21c..b6b82a12ed6e 100644 --- a/pkgs/development/libraries/libvirt/default.nix +++ b/pkgs/development/libraries/libvirt/default.nix @@ -25,7 +25,6 @@ stdenv.mkDerivation rec { preConfigure = '' PATH=${iproute}/sbin:${iptables}/sbin:${ebtables}/sbin:${lvm2}/sbin:${udev}/sbin:${dnsmasq}/bin:$PATH - patchShebangs . # fixes /usr/bin/python references ''; configureFlags = [ diff --git a/pkgs/development/libraries/lirc/default.nix b/pkgs/development/libraries/lirc/default.nix index 278eb8e9e523..755bb48af1c8 100644 --- a/pkgs/development/libraries/lirc/default.nix +++ b/pkgs/development/libraries/lirc/default.nix @@ -15,8 +15,6 @@ stdenv.mkDerivation rec { }) ]; - preBuild = "patchShebangs ."; - buildInputs = [ alsaLib help2man ]; configureFlags = [ diff --git a/pkgs/development/libraries/mesa-darwin/default.nix b/pkgs/development/libraries/mesa-darwin/default.nix index f259a397c847..0b0cf5f28220 100644 --- a/pkgs/development/libraries/mesa-darwin/default.nix +++ b/pkgs/development/libraries/mesa-darwin/default.nix @@ -41,8 +41,6 @@ let ./patches/patch-src-mapi-vgapi-Makefile.diff ]; - postPatch = "patchShebangs ."; - configurePhase = ":"; makeFlags = "INSTALL_DIR=\${out} CC=cc CXX=c++"; diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index a3b40eb612c2..4db3b003f2f0 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -38,7 +38,6 @@ stdenv.mkDerivation { sha256 = "f6031f8b7113a92325b60635c504c510490eebb2e707119bbff7bd86aa34657d"; }; - prePatch = "patchShebangs ."; patches = [ ./static-gallium.patch diff --git a/pkgs/development/libraries/polkit/default.nix b/pkgs/development/libraries/polkit/default.nix index 7fe16cec56b9..6a0cc50c4123 100644 --- a/pkgs/development/libraries/polkit/default.nix +++ b/pkgs/development/libraries/polkit/default.nix @@ -35,9 +35,7 @@ stdenv.mkDerivation rec { ( map (var: ''-DPACKAGE_${var}_DIR=\""${builtins.getAttr var foolVars}"\"'') (builtins.attrNames foolVars) ); - preConfigure = '' - patchShebangs . - '' + stdenv.lib.optionalString useSystemd /* bogus chroot detection */ '' + preConfigure = stdenv.lib.optionalString useSystemd /* bogus chroot detection */ '' sed '/libsystemd-login autoconfigured, but system does not appear to use systemd/s/.*/:/' -i configure '' # ‘libpolkit-agent-1.so’ should call the setuid wrapper on diff --git a/pkgs/development/libraries/qpdf/default.nix b/pkgs/development/libraries/qpdf/default.nix index 63ba58f23432..2f4815036709 100644 --- a/pkgs/development/libraries/qpdf/default.nix +++ b/pkgs/development/libraries/qpdf/default.nix @@ -15,11 +15,9 @@ stdenv.mkDerivation rec { buildInputs = [ pcre zlib ]; postPatch = '' - patchShebangs qpdf/fix-qdf ''; preCheck = '' - patchShebangs qtest/bin/qtest-driver ''; doCheck = true; diff --git a/pkgs/development/libraries/sword/default.nix b/pkgs/development/libraries/sword/default.nix index 6faf2224b0cf..a91474d054c7 100644 --- a/pkgs/development/libraries/sword/default.nix +++ b/pkgs/development/libraries/sword/default.nix @@ -13,10 +13,6 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig icu clucene_core curl ]; - prePatch = '' - patchShebangs .; - ''; - configureFlags = "--without-conf --enable-tests=no CXXFLAGS=-Wno-unused-but-set-variable"; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/webkitgtk/2.4.6.nix b/pkgs/development/libraries/webkitgtk/2.4.6.nix index a2344f71f882..bb8e95fb1ecd 100644 --- a/pkgs/development/libraries/webkitgtk/2.4.6.nix +++ b/pkgs/development/libraries/webkitgtk/2.4.6.nix @@ -28,10 +28,6 @@ stdenv.mkDerivation rec { CC = "cc"; - prePatch = '' - patchShebangs Tools/gtk - ''; - configureFlags = with stdenv.lib; [ "--disable-geolocation" (optionalString enableIntrospection "--enable-introspection") diff --git a/pkgs/development/libraries/webkitgtk/default.nix b/pkgs/development/libraries/webkitgtk/default.nix index 3cbf36987323..08576c2ebc36 100644 --- a/pkgs/development/libraries/webkitgtk/default.nix +++ b/pkgs/development/libraries/webkitgtk/default.nix @@ -17,8 +17,6 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ iyzsong koral ]; }; - preConfigure = "patchShebangs Tools"; - src = fetchurl { url = "http://webkitgtk.org/releases/${name}.tar.xz"; sha256 = "1f9qm5g1mbjm2hrnlzymas99piws4h4y3yxz4p6f6gavnsvfjwji"; diff --git a/pkgs/development/libraries/zeitgeist/default.nix b/pkgs/development/libraries/zeitgeist/default.nix index d0de624890b5..ecdcd7804e54 100644 --- a/pkgs/development/libraries/zeitgeist/default.nix +++ b/pkgs/development/libraries/zeitgeist/default.nix @@ -21,8 +21,6 @@ stdenv.mkDerivation rec { libtool python dbus_libs telepathy_glib vala dbus_glib gtk3 json_glib librdf_raptor2 pythonPackages.rdflib ]; - prePatch = "patchShebangs ."; - patches = [ ./dbus_glib.patch ]; patchFlags = [ "-p0" ]; diff --git a/pkgs/development/ocaml-modules/javalib/default.nix b/pkgs/development/ocaml-modules/javalib/default.nix index 7272e668aa20..960824731f67 100644 --- a/pkgs/development/ocaml-modules/javalib/default.nix +++ b/pkgs/development/ocaml-modules/javalib/default.nix @@ -20,8 +20,6 @@ stdenv.mkDerivation rec { createFindlibDestdir = true; - preConfigure = "patchShebangs ./configure.sh"; - configureScript = "./configure.sh"; dontAddPrefix = "true"; diff --git a/pkgs/development/ocaml-modules/sawja/default.nix b/pkgs/development/ocaml-modules/sawja/default.nix index 534a7684cec4..2ee035aadb61 100644 --- a/pkgs/development/ocaml-modules/sawja/default.nix +++ b/pkgs/development/ocaml-modules/sawja/default.nix @@ -22,8 +22,6 @@ stdenv.mkDerivation rec { createFindlibDestdir = true; - preConfigure = "patchShebangs ./configure.sh"; - configureScript = "./configure.sh"; dontAddPrefix = "true"; diff --git a/pkgs/development/python-modules/dbus/default.nix b/pkgs/development/python-modules/dbus/default.nix index bc386e7e5ac2..9a6e25d13a44 100644 --- a/pkgs/development/python-modules/dbus/default.nix +++ b/pkgs/development/python-modules/dbus/default.nix @@ -8,8 +8,6 @@ if isPyPy then throw "dbus-python not supported for interpreter ${python.executa sha256 = "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"; }; - postPatch = "patchShebangs ."; - buildInputs = [ python pkgconfig dbus dbus_glib ] ++ stdenv.lib.optional doCheck dbus_tools; diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix index 1ec48bcc06f2..46bed164fef8 100644 --- a/pkgs/development/r-modules/default.nix +++ b/pkgs/development/r-modules/default.nix @@ -916,14 +916,6 @@ let ]; otherOverrides = old: new: { - RcppArmadillo = old.RcppArmadillo.overrideDerivation (attrs: { - patchPhase = "patchShebangs configure"; - }); - - rpf = old.rpf.overrideDerivation (attrs: { - patchPhase = "patchShebangs configure"; - }); - BayesXsrc = old.BayesXsrc.overrideDerivation (attrs: { patches = [ ./patches/BayesXsrc.patch ]; }); diff --git a/pkgs/development/tools/build-managers/icmake/default.nix b/pkgs/development/tools/build-managers/icmake/default.nix index a32ea9a3adda..929e68ed4e0b 100644 --- a/pkgs/development/tools/build-managers/icmake/default.nix +++ b/pkgs/development/tools/build-managers/icmake/default.nix @@ -10,7 +10,6 @@ stdenv.mkDerivation rec { }; preConfigure = '' - patchShebangs ./ sed -i "s;usr/;;g" INSTALL.im ''; @@ -25,4 +24,4 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ pSub ]; platforms = platforms.linux; }; -} \ No newline at end of file +} diff --git a/pkgs/development/tools/documentation/doxygen/default.nix b/pkgs/development/tools/documentation/doxygen/default.nix index 50f2037b271c..65ae4b61b4f2 100644 --- a/pkgs/development/tools/documentation/doxygen/default.nix +++ b/pkgs/development/tools/documentation/doxygen/default.nix @@ -24,9 +24,7 @@ stdenv.mkDerivation { ++ stdenv.lib.optional (qt4 != null) "--with-doxywizard"; preConfigure = - '' - patchShebangs . - '' + stdenv.lib.optionalString (qt4 != null) + stdenv.lib.optionalString (qt4 != null) '' echo "using QTDIR=${qt4}..." export QTDIR=${qt4} diff --git a/pkgs/development/tools/misc/yodl/default.nix b/pkgs/development/tools/misc/yodl/default.nix index 691974353e10..f16c961f4cf4 100644 --- a/pkgs/development/tools/misc/yodl/default.nix +++ b/pkgs/development/tools/misc/yodl/default.nix @@ -12,7 +12,6 @@ stdenv.mkDerivation rec { }; preConfigure = '' - patchShebangs scripts/. sed -i 's;/usr;;g' INSTALL.im substituteInPlace build --replace /usr/bin/icmake ${icmake}/bin/icmake substituteInPlace macros/rawmacros/startdoc.pl --replace /usr/bin/perl ${perl}/bin/perl diff --git a/pkgs/games/crawl/default.nix b/pkgs/games/crawl/default.nix index 7f971150c675..21432f0190de 100644 --- a/pkgs/games/crawl/default.nix +++ b/pkgs/games/crawl/default.nix @@ -25,10 +25,6 @@ stdenv.mkDerivation rec { cd source # Related to issue #1963 sed -i 's/-fuse-ld=gold//g' Makefile - for i in util/*.pl; do - patchShebangs $i - done - patchShebangs util/gen-mi-enum ''; makeFlags = [ "prefix=$(out)" "FORCE_CC=gcc" "FORCE_CXX=g++" "HOSTCXX=g++" diff --git a/pkgs/misc/vim-plugins/default.nix b/pkgs/misc/vim-plugins/default.nix index 2ca31d523feb..25a3a051fb95 100644 --- a/pkgs/misc/vim-plugins/default.nix +++ b/pkgs/misc/vim-plugins/default.nix @@ -527,8 +527,6 @@ rec { configurePhase = ":"; buildPhase = '' - patchShebangs . - target=$out/${rtpPath}/youcompleteme mkdir -p $target cp -a ./ $target diff --git a/pkgs/os-specific/darwin/cctools-port/default.nix b/pkgs/os-specific/darwin/cctools-port/default.nix index cdc259c1e2a0..eb4924ef8d4b 100644 --- a/pkgs/os-specific/darwin/cctools-port/default.nix +++ b/pkgs/os-specific/darwin/cctools-port/default.nix @@ -22,7 +22,6 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; postPatch = '' - patchShebangs tools sed -i -e 's/which/type -P/' tools/*.sh sed -i -e 's|clang++|& -I${libcxx}/include/c++/v1|' cctools/autogen.sh diff --git a/pkgs/os-specific/linux/hwdata/default.nix b/pkgs/os-specific/linux/hwdata/default.nix index 325a44f97aa4..57785d40132c 100644 --- a/pkgs/os-specific/linux/hwdata/default.nix +++ b/pkgs/os-specific/linux/hwdata/default.nix @@ -8,8 +8,6 @@ stdenv.mkDerivation { sha256 = "1ak3h3psg3wk9yk0dqnzdzik3jadzja3ah22vjfmf71p3b5xc8ai"; }; - preConfigure = "patchShebangs ./configure"; - configureFlags = "--datadir=$(prefix)/data"; meta = { diff --git a/pkgs/os-specific/linux/x86info/default.nix b/pkgs/os-specific/linux/x86info/default.nix index 54bd33cc92fd..ef1935b931f6 100644 --- a/pkgs/os-specific/linux/x86info/default.nix +++ b/pkgs/os-specific/linux/x86info/default.nix @@ -10,8 +10,6 @@ stdenv.mkDerivation rec { }; preConfigure = '' - patchShebangs . - # ignore warnings sed -i 's/-Werror -Wall//' Makefile ''; diff --git a/pkgs/servers/amqp/rabbitmq-server/default.nix b/pkgs/servers/amqp/rabbitmq-server/default.nix index b5f9195abbde..e850727ca1ae 100644 --- a/pkgs/servers/amqp/rabbitmq-server/default.nix +++ b/pkgs/servers/amqp/rabbitmq-server/default.nix @@ -14,11 +14,6 @@ stdenv.mkDerivation rec { buildInputs = [ erlang python libxml2 libxslt xmlto docbook_xml_dtd_45 docbook_xsl zip unzip ]; - preBuild = - '' - # Fix the "/usr/bin/env" in "calculate-relative". - patchShebangs . - ''; installFlags = "TARGET_DIR=$(out)/libexec/rabbitmq SBIN_DIR=$(out)/sbin MAN_DIR=$(out)/share/man DOC_INSTALL_DIR=$(out)/share/doc"; diff --git a/pkgs/servers/fleet/default.nix b/pkgs/servers/fleet/default.nix index 9a122ae90a69..94343fcba5c2 100644 --- a/pkgs/servers/fleet/default.nix +++ b/pkgs/servers/fleet/default.nix @@ -14,7 +14,6 @@ stdenv.mkDerivation rec { buildInputs = [ go ]; buildPhase = '' - patchShebangs build ./build ''; diff --git a/pkgs/servers/gpsd/default.nix b/pkgs/servers/gpsd/default.nix index 17325ccb2914..90d7d7435be5 100644 --- a/pkgs/servers/gpsd/default.nix +++ b/pkgs/servers/gpsd/default.nix @@ -36,7 +36,6 @@ stdenv.mkDerivation rec { # 'chrpath' is used to be able to run the tests from the source tree, but # we use $LD_LIBRARY_PATH instead. buildPhase = '' - patchShebangs . mkdir -p "$out" sed -e "s|python_lib_dir = .*|python_lib_dir = \"$out/lib/${pythonFull.libPrefix}/site-packages\"|" -i SConstruct scons prefix="$out" leapfetch=no gpsd_user=${gpsdUser} gpsd_group=${gpsdGroup} \ diff --git a/pkgs/servers/http/openresty/default.nix b/pkgs/servers/http/openresty/default.nix index 65c81c455b9e..213313cb6b20 100644 --- a/pkgs/servers/http/openresty/default.nix +++ b/pkgs/servers/http/openresty/default.nix @@ -52,7 +52,6 @@ stdenv.mkDerivation rec { preConfigure = '' export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libxml2}/include/libxml2 $additionalFlags" export PATH="$PATH:${stdenv.cc.libc}/sbin" - patchShebangs . ''; meta = { diff --git a/pkgs/servers/nosql/rethinkdb/default.nix b/pkgs/servers/nosql/rethinkdb/default.nix index 1c8eac99737c..0bf4ed1c1bdf 100644 --- a/pkgs/servers/nosql/rethinkdb/default.nix +++ b/pkgs/servers/nosql/rethinkdb/default.nix @@ -10,7 +10,6 @@ stdenv.mkDerivation rec { preConfigure = '' export ALLOW_WARNINGS=1 - patchShebangs . ''; configureFlags = "--lib-path ${gperftools}/lib"; diff --git a/pkgs/servers/nosql/riak/1.3.1.nix b/pkgs/servers/nosql/riak/1.3.1.nix index e773f6ddcc36..e414668195e8 100644 --- a/pkgs/servers/nosql/riak/1.3.1.nix +++ b/pkgs/servers/nosql/riak/1.3.1.nix @@ -32,7 +32,6 @@ stdenv.mkDerivation rec { cp -R getopt riaknostic/deps cp -R meck riaknostic/deps popd - patchShebangs . ''; buildPhase = '' diff --git a/pkgs/servers/openafs-client/default.nix b/pkgs/servers/openafs-client/default.nix index 9d9df2e38c0e..4aedc0193276 100644 --- a/pkgs/servers/openafs-client/default.nix +++ b/pkgs/servers/openafs-client/default.nix @@ -24,7 +24,6 @@ stdenv.mkDerivation { preConfigure = '' ln -s ${kernel.dev}/lib/modules/*/build $TMP/linux - patchShebangs . for i in `grep -l -R '/usr/\(include\|src\)' .`; do echo "Patch /usr/include and /usr/src in $i" substituteInPlace $i \ diff --git a/pkgs/tools/backup/bup/default.nix b/pkgs/tools/backup/bup/default.nix index 1964f01b0774..e181b4ca18ea 100644 --- a/pkgs/tools/backup/bup/default.nix +++ b/pkgs/tools/backup/bup/default.nix @@ -19,7 +19,6 @@ stdenv.mkDerivation { nativeBuildInputs = [ pandoc perl makeWrapper ]; patchPhase = '' - patchShebangs . substituteInPlace Makefile --replace "-Werror" "" substituteInPlace Makefile --replace "./format-subst.pl" "perl ./format-subst.pl" '' + optionalString par2Support '' diff --git a/pkgs/tools/cd-dvd/dvdisaster/default.nix b/pkgs/tools/cd-dvd/dvdisaster/default.nix index b54f342b3454..34ca3d848712 100644 --- a/pkgs/tools/cd-dvd/dvdisaster/default.nix +++ b/pkgs/tools/cd-dvd/dvdisaster/default.nix @@ -10,10 +10,6 @@ stdenv.mkDerivation rec { sha256 = "e9787dea39aeafa38b26604752561bc895083c17b588489d857ac05c58be196b"; }; - postPatch = '' - patchShebangs ./ - ''; - buildInputs = [ pkgconfig which gettext intltool glib gtk2 diff --git a/pkgs/tools/filesystems/nixpart/0.4/pyparted.nix b/pkgs/tools/filesystems/nixpart/0.4/pyparted.nix index 67f318c863e1..81fe82144153 100644 --- a/pkgs/tools/filesystems/nixpart/0.4/pyparted.nix +++ b/pkgs/tools/filesystems/nixpart/0.4/pyparted.nix @@ -29,7 +29,6 @@ buildPythonPackage rec { propagatedBuildInputs = [ parted ]; checkPhase = '' - patchShebangs Makefile make test PYTHON=${python.executable} ''; diff --git a/pkgs/tools/misc/convmv/default.nix b/pkgs/tools/misc/convmv/default.nix index 7db7ebf96d6d..aea4fb8aad00 100644 --- a/pkgs/tools/misc/convmv/default.nix +++ b/pkgs/tools/misc/convmv/default.nix @@ -12,9 +12,8 @@ stdenv.mkDerivation rec { makeFlags="PREFIX=$out" ''; - patchPhase='' + postBuild='' tar -xf testsuite.tar - patchShebangs . ''; doCheck = true; diff --git a/pkgs/tools/misc/opentsdb/default.nix b/pkgs/tools/misc/opentsdb/default.nix index 6f9695ba363c..c19ccfba001c 100644 --- a/pkgs/tools/misc/opentsdb/default.nix +++ b/pkgs/tools/misc/opentsdb/default.nix @@ -16,7 +16,6 @@ stdenv.mkDerivation rec { mkdir build cd build ../configure --prefix=$out - patchShebangs ../build-aux/ ''; installPhase = '' diff --git a/pkgs/tools/misc/parted/default.nix b/pkgs/tools/misc/parted/default.nix index 0763532260a9..fdfcfdc73d97 100644 --- a/pkgs/tools/misc/parted/default.nix +++ b/pkgs/tools/misc/parted/default.nix @@ -12,7 +12,6 @@ stdenv.mkDerivation rec { patches = stdenv.lib.optional doCheck ./gpt-unicode-test-fix.patch; postPatch = stdenv.lib.optionalString doCheck '' - patchShebangs tests ''; buildInputs = [ libuuid ] diff --git a/pkgs/tools/misc/pipelight/default.nix b/pkgs/tools/misc/pipelight/default.nix index 5ead0e7c8bab..e30ce14d5e9f 100644 --- a/pkgs/tools/misc/pipelight/default.nix +++ b/pkgs/tools/misc/pipelight/default.nix @@ -32,7 +32,6 @@ let ]; postPatch = '' export wineDir=$(pwd) - patchShebangs $wineDir/tools/ chmod u+w $wineDir/../git-export/debian/tools/ patchShebangs $wineDir/../git-export/debian/tools/ chmod -R +rwx ../git-export/ diff --git a/pkgs/tools/security/mbox/default.nix b/pkgs/tools/security/mbox/default.nix index 732cf7046610..1dba136bda7e 100644 --- a/pkgs/tools/security/mbox/default.nix +++ b/pkgs/tools/security/mbox/default.nix @@ -21,7 +21,6 @@ stdenv.mkDerivation { checkPhase = '' rm tests/test-*vim.sh tests/test-pip.sh - patchShebangs ./; dontPatchShebags=1 sed -i 's|^/bin/||' tests/test-fileops.sh ./testall.sh diff --git a/pkgs/tools/typesetting/tex/latex2html/default.nix b/pkgs/tools/typesetting/tex/latex2html/default.nix index f6fc640eb3f8..853668c3b8aa 100644 --- a/pkgs/tools/typesetting/tex/latex2html/default.nix +++ b/pkgs/tools/typesetting/tex/latex2html/default.nix @@ -11,7 +11,6 @@ stdenv.mkDerivation rec { buildInputs = [ tex perl ghostscript netpbm ]; preConfigure = '' - patchShebangs . sed -i -e "s|#! /bin/cat|#! $(type -p cat)|" configure configureFlags="--with-texpath=$out/share/texmf-nix"; ''; diff --git a/pkgs/tools/virtualization/cloud-init/default.nix b/pkgs/tools/virtualization/cloud-init/default.nix index 48eb68242e1e..93814684bc13 100644 --- a/pkgs/tools/virtualization/cloud-init/default.nix +++ b/pkgs/tools/virtualization/cloud-init/default.nix @@ -12,8 +12,6 @@ in pythonPackages.buildPythonPackage rec { }; preBuild = '' - patchShebangs ./tools - substituteInPlace setup.py \ --replace /usr $out \ --replace /etc $out/etc \ diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 813284ede8f8..6ad1e46de0ae 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -1357,7 +1357,6 @@ let self = _self // overrides; _self = with self; { url = mirror://cpan/authors/id/S/SC/SCHWIGON/class-methodmaker/Class-MethodMaker-2.21.tar.gz; sha256 = "0gca1cjy2k0mrpfnbyzm5islzfayqfvg3zzlrlm7n60p0cb48y7w"; }; - preConfigure = "patchShebangs ."; meta = { description = "A module for creating generic methods"; license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 77e380105c84..24f2feffdfed 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7213,10 +7213,6 @@ let sha256 = "1mrh233pj584gf7la64d4xlmvdnfl4jwpxs95lnd3i4zd5drid14"; }; - preConfigure = '' - patchShebangs . - ''; - buildInputs = [ self.setuptools self.nose pkgs.pkgconfig pkgs.swig pkgs.libcdio ]; @@ -7585,7 +7581,6 @@ let propagatedBuildInputs = with self; [ pkgs.parted ]; checkPhase = '' - patchShebangs Makefile make test PYTHON=${python.executable} ''; From c510f3da4980feab839b24a5f953a669358794a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Fri, 2 Jan 2015 13:55:04 +0100 Subject: [PATCH 06/29] fix eval /cc @vcunat --- pkgs/os-specific/linux/kernel/manual-config.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index b840e252cdf4..acc593035591 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -104,7 +104,8 @@ let buildFlagsArray+=("KBUILD_BUILD_TIMESTAMP=Thu Jan 1 00:00:01 UTC 1970") ''; - KBUILD_BUILD_TIMESTAMP=1; # (time_t)1 + buildFlags = [ + "KBUILD_BUILD_TIMESTAMP=1" # (time_t)1 "KBUILD_BUILD_VERSION=1-NixOS" platform.kernelTarget ] ++ optional isModular "modules"; From 6671aff83e4082f3a825c456cf259b9e30ae702c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sat, 3 Jan 2015 12:29:52 +0100 Subject: [PATCH 07/29] linux kernel determinism: unify timestamp style Testing showed the linux build is sensitive to /usr/include/ncursesw unless chrooted (on non-nixos). On a single chrooted nixos machine, -A linux is binary reproducible. CC #2281 & @alexanderkjeldaas. --- pkgs/os-specific/linux/kernel/generic.nix | 5 ++++- pkgs/os-specific/linux/kernel/manual-config.nix | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index af2ae3b54db4..b42892f9f2d8 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -57,7 +57,10 @@ let autoModules = stdenv.platform.kernelAutoModules; arch = stdenv.platform.kernelArch; - KBUILD_BUILD_TIMESTAMP = 1; # (time_t)1 + preConfigure = '' + buildFlagsArray+=("KBUILD_BUILD_TIMESTAMP=Thu Jan 1 00:00:01 UTC 1970") + ''; + crossAttrs = let cp = stdenv.cross.platform; in { diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index acc593035591..6d9baed7f2dd 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -105,7 +105,6 @@ let ''; buildFlags = [ - "KBUILD_BUILD_TIMESTAMP=1" # (time_t)1 "KBUILD_BUILD_VERSION=1-NixOS" platform.kernelTarget ] ++ optional isModular "modules"; From 9b7b2ce8eb855b99598183b06bbd2f021e01d359 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Thu, 8 Jan 2015 10:26:49 +0100 Subject: [PATCH 08/29] Revert "Introduce patchShebangsPhase ran in preConfigurePhases" This reverts commit 512fbb280f72980e84230b72b631258df1755919. See #5368 --- doc/stdenv.xml | 6 ------ pkgs/applications/audio/caudec/default.nix | 4 ++++ pkgs/applications/editors/geany/default.nix | 2 ++ pkgs/applications/graphics/shotwell/default.nix | 4 ++++ pkgs/applications/graphics/xara/default.nix | 1 + pkgs/applications/misc/bibletime/default.nix | 1 + pkgs/applications/misc/xiphos/default.nix | 1 + .../networking/browsers/chromium/source/default.nix | 2 ++ .../networking/cluster/kubernetes/default.nix | 2 ++ .../networking/instant-messengers/freetalk/default.nix | 1 + .../networking/instant-messengers/jitsi/default.nix | 1 + .../networking/instant-messengers/kadu/default.nix | 4 ++++ .../networking/mailreaders/thunderbird/default.nix | 2 ++ pkgs/applications/networking/p2p/gnunet/default.nix | 1 + pkgs/applications/networking/p2p/gnunet/svn.nix | 1 + pkgs/applications/science/logic/cvc4/default.nix | 2 ++ pkgs/applications/science/logic/isabelle/default.nix | 1 + pkgs/applications/video/cmplayer/default.nix | 6 ++++++ pkgs/applications/video/mplayer2/default.nix | 4 ++++ pkgs/applications/video/mpv/default.nix | 1 + pkgs/applications/virtualization/docker/default.nix | 1 + pkgs/applications/window-managers/i3/default.nix | 4 ++++ pkgs/build-support/setup-hooks/patch-shebangs.sh | 6 ------ pkgs/data/documentation/stdman/default.nix | 5 +++++ pkgs/desktops/cinnamon/cjs.nix | 2 ++ pkgs/desktops/cinnamon/muffin.nix | 3 +++ pkgs/desktops/gnome-3/3.12/core/caribou/default.nix | 4 ++++ pkgs/desktops/gnome-3/3.12/core/gnome-shell/default.nix | 1 + pkgs/desktops/gnome-3/3.12/core/vte/0.38.0.nix | 2 ++ pkgs/development/compilers/go/1.1-darwin.nix | 1 + pkgs/development/compilers/go/1.1.nix | 1 + pkgs/development/compilers/go/1.2.nix | 1 + pkgs/development/compilers/go/default.nix | 1 + pkgs/development/compilers/julia/0.3.3.nix | 2 ++ pkgs/development/compilers/mono/default.nix | 1 + pkgs/development/compilers/opa/default.nix | 1 + .../libraries/agda/agda-iowa-stdlib/default.nix | 1 + pkgs/development/libraries/dbus/default.nix | 1 + pkgs/development/libraries/folly/default.nix | 3 +++ pkgs/development/libraries/hspell/default.nix | 1 + pkgs/development/libraries/ibus/default.nix | 1 + pkgs/development/libraries/libcouchbase/default.nix | 3 ++- pkgs/development/libraries/libctemplate/default.nix | 4 ++++ pkgs/development/libraries/libqmi/default.nix | 4 ++++ pkgs/development/libraries/libsoup/default.nix | 4 ++++ pkgs/development/libraries/libvirt/default.nix | 1 + pkgs/development/libraries/lirc/default.nix | 2 ++ pkgs/development/libraries/mesa-darwin/default.nix | 2 ++ pkgs/development/libraries/mesa/default.nix | 1 + pkgs/development/libraries/polkit/default.nix | 4 +++- pkgs/development/libraries/qpdf/default.nix | 2 ++ pkgs/development/libraries/sword/default.nix | 4 ++++ pkgs/development/libraries/webkitgtk/2.4.6.nix | 4 ++++ pkgs/development/libraries/webkitgtk/default.nix | 2 ++ pkgs/development/libraries/zeitgeist/default.nix | 2 ++ pkgs/development/ocaml-modules/javalib/default.nix | 2 ++ pkgs/development/ocaml-modules/sawja/default.nix | 2 ++ pkgs/development/python-modules/dbus/default.nix | 2 ++ pkgs/development/r-modules/default.nix | 8 ++++++++ pkgs/development/tools/build-managers/icmake/default.nix | 3 ++- pkgs/development/tools/documentation/doxygen/default.nix | 4 +++- pkgs/development/tools/misc/yodl/default.nix | 1 + pkgs/games/crawl/default.nix | 4 ++++ pkgs/misc/vim-plugins/default.nix | 2 ++ pkgs/os-specific/darwin/cctools-port/default.nix | 1 + pkgs/os-specific/linux/hwdata/default.nix | 2 ++ pkgs/os-specific/linux/x86info/default.nix | 2 ++ pkgs/servers/amqp/rabbitmq-server/default.nix | 5 +++++ pkgs/servers/fleet/default.nix | 1 + pkgs/servers/gpsd/default.nix | 1 + pkgs/servers/http/openresty/default.nix | 1 + pkgs/servers/nosql/rethinkdb/default.nix | 1 + pkgs/servers/nosql/riak/1.3.1.nix | 1 + pkgs/servers/openafs-client/default.nix | 1 + pkgs/tools/backup/bup/default.nix | 1 + pkgs/tools/cd-dvd/dvdisaster/default.nix | 4 ++++ pkgs/tools/filesystems/nixpart/0.4/pyparted.nix | 1 + pkgs/tools/misc/convmv/default.nix | 3 ++- pkgs/tools/misc/opentsdb/default.nix | 1 + pkgs/tools/misc/parted/default.nix | 1 + pkgs/tools/misc/pipelight/default.nix | 1 + pkgs/tools/security/mbox/default.nix | 1 + pkgs/tools/typesetting/tex/latex2html/default.nix | 1 + pkgs/tools/virtualization/cloud-init/default.nix | 2 ++ pkgs/top-level/perl-packages.nix | 1 + pkgs/top-level/python-packages.nix | 5 +++++ 86 files changed, 178 insertions(+), 17 deletions(-) diff --git a/doc/stdenv.xml b/doc/stdenv.xml index 8eb6fadd3c86..00fa7567c078 100644 --- a/doc/stdenv.xml +++ b/doc/stdenv.xml @@ -853,12 +853,6 @@ following: rewritten to paths in the Nix store. - - dontPatchSourceShebangs - Same as dontPatchShebangs, but applied - to the source code before configurePhase. - - forceShare The list of directories that must be moved from diff --git a/pkgs/applications/audio/caudec/default.nix b/pkgs/applications/audio/caudec/default.nix index fb2970ed5fa5..24613d4dd965 100644 --- a/pkgs/applications/audio/caudec/default.nix +++ b/pkgs/applications/audio/caudec/default.nix @@ -12,6 +12,10 @@ stdenv.mkDerivation rec { sha256 = "5d1f5ab3286bb748bd29cbf45df2ad2faf5ed86070f90deccf71c60be832f3d5"; }; + preBuild = '' + patchShebangs ./install.sh + ''; + buildInputs = [ bash makeWrapper ]; installPhase = '' diff --git a/pkgs/applications/editors/geany/default.nix b/pkgs/applications/editors/geany/default.nix index 9b3ee6d4f887..8d4002c9ef85 100644 --- a/pkgs/applications/editors/geany/default.nix +++ b/pkgs/applications/editors/geany/default.nix @@ -18,6 +18,8 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + patchPhase = "patchShebangs ."; + # This file should normally require a gtk-update-icon-cache -q /usr/share/icons/hicolor command # It have no reasons to exist in a redistribuable package postInstall = "rm $out/share/icons/hicolor/icon-theme.cache"; diff --git a/pkgs/applications/graphics/shotwell/default.nix b/pkgs/applications/graphics/shotwell/default.nix index 5f3b96ba16e3..223f632f937d 100644 --- a/pkgs/applications/graphics/shotwell/default.nix +++ b/pkgs/applications/graphics/shotwell/default.nix @@ -30,6 +30,10 @@ in stdenv.mkDerivation rec { configureFlags = [ "--disable-gsettings-convert-install" ]; + preConfigure = '' + patchShebangs . + ''; + postInstall = '' mkdir -p $out/share/gsettings-schemas/$name mv $out/share/glib-2.0 $out/share/gsettings-schemas/$name/ diff --git a/pkgs/applications/graphics/xara/default.nix b/pkgs/applications/graphics/xara/default.nix index e53514a6c1f6..cd3a09887d0f 100644 --- a/pkgs/applications/graphics/xara/default.nix +++ b/pkgs/applications/graphics/xara/default.nix @@ -16,4 +16,5 @@ stdenv.mkDerivation { patches = map fetchurl (import ./debian-patches.nix); + prePatch = "patchShebangs Scripts"; } diff --git a/pkgs/applications/misc/bibletime/default.nix b/pkgs/applications/misc/bibletime/default.nix index df6a3a271b67..41184d6e9492 100644 --- a/pkgs/applications/misc/bibletime/default.nix +++ b/pkgs/applications/misc/bibletime/default.nix @@ -12,6 +12,7 @@ stdenv.mkDerivation rec { }; prePatch = '' + patchShebangs .; ''; preConfigure = '' diff --git a/pkgs/applications/misc/xiphos/default.nix b/pkgs/applications/misc/xiphos/default.nix index bce45286d1f3..d2739dbec505 100644 --- a/pkgs/applications/misc/xiphos/default.nix +++ b/pkgs/applications/misc/xiphos/default.nix @@ -24,6 +24,7 @@ stdenv.mkDerivation rec { libglade scrollkeeper webkitgtk dbus_glib enchant isocodes libuuid ]; prePatch = '' + patchShebangs .; ''; preConfigure = '' diff --git a/pkgs/applications/networking/browsers/chromium/source/default.nix b/pkgs/applications/networking/browsers/chromium/source/default.nix index f4e54c533236..adac4baa29cd 100644 --- a/pkgs/applications/networking/browsers/chromium/source/default.nix +++ b/pkgs/applications/networking/browsers/chromium/source/default.nix @@ -20,6 +20,8 @@ stdenv.mkDerivation { opensslPatches = optional useOpenSSL openssl.patches; + prePatch = "patchShebangs ."; + patches = [ ./sandbox_userns_36.patch ./nix_plugin_paths.patch ]; postPatch = '' diff --git a/pkgs/applications/networking/cluster/kubernetes/default.nix b/pkgs/applications/networking/cluster/kubernetes/default.nix index 7f3eef7554c6..7931da602d6e 100644 --- a/pkgs/applications/networking/cluster/kubernetes/default.nix +++ b/pkgs/applications/networking/cluster/kubernetes/default.nix @@ -13,6 +13,8 @@ stdenv.mkDerivation rec { buildInputs = [ makeWrapper which go iptables rsync ]; + preBuild = "patchShebangs ./hack"; + postBuild = ''go build --ldflags '-extldflags "-static" -s' build/pause/pause.go''; installPhase = '' diff --git a/pkgs/applications/networking/instant-messengers/freetalk/default.nix b/pkgs/applications/networking/instant-messengers/freetalk/default.nix index fd545ee7f587..320e7094d484 100644 --- a/pkgs/applications/networking/instant-messengers/freetalk/default.nix +++ b/pkgs/applications/networking/instant-messengers/freetalk/default.nix @@ -28,6 +28,7 @@ stdenv.mkDerivation { }; preConfigure = '' + patchShebangs . ./autogen.sh ''; diff --git a/pkgs/applications/networking/instant-messengers/jitsi/default.nix b/pkgs/applications/networking/instant-messengers/jitsi/default.nix index 575c6c044643..e6dd6569a55f 100644 --- a/pkgs/applications/networking/instant-messengers/jitsi/default.nix +++ b/pkgs/applications/networking/instant-messengers/jitsi/default.nix @@ -33,6 +33,7 @@ stdenv.mkDerivation rec { cp resources/install/generic/run.sh $out/bin/jitsi chmod +x $out/bin/jitsi sed -i 's| java | ${jdk}/bin/java |' $out/bin/jitsi + patchShebangs $out ''; meta = { diff --git a/pkgs/applications/networking/instant-messengers/kadu/default.nix b/pkgs/applications/networking/instant-messengers/kadu/default.nix index df8846c36b11..44cf13e2917c 100644 --- a/pkgs/applications/networking/instant-messengers/kadu/default.nix +++ b/pkgs/applications/networking/instant-messengers/kadu/default.nix @@ -21,6 +21,10 @@ stdenv.mkDerivation { cmakeFlags = "-DENABLE_AUTODOWNLOAD=OFF -DBUILD_DESCRIPTION='NixOS' -DCMAKE_BUILD_TYPE=Release"; + prePatch = '' + patchShebangs . + ''; + # Disable the kadu plugins I wasn't able to get to work patchPhase = '' sed -i -e '/mpd_mediaplayer/d' \ diff --git a/pkgs/applications/networking/mailreaders/thunderbird/default.nix b/pkgs/applications/networking/mailreaders/thunderbird/default.nix index 6e628dc081cb..e6ba7e21dc8e 100644 --- a/pkgs/applications/networking/mailreaders/thunderbird/default.nix +++ b/pkgs/applications/networking/mailreaders/thunderbird/default.nix @@ -71,6 +71,8 @@ stdenv.mkDerivation rec { ++ stdenv.lib.optional enableOfficialBranding "--enable-official-branding"; configurePhase = '' + patchShebangs . + echo '${stdenv.lib.concatMapStrings (s : "ac_add_options ${s}\n") configureFlags}' > .mozconfig echo "ac_add_options --prefix='$out'" >> .mozconfig echo "mk_add_options MOZ_MAKE_FLAGS='-j$NIX_BUILD_CORES'" >> .mozconfig diff --git a/pkgs/applications/networking/p2p/gnunet/default.nix b/pkgs/applications/networking/p2p/gnunet/default.nix index 2475adadefbf..052c53112536 100644 --- a/pkgs/applications/networking/p2p/gnunet/default.nix +++ b/pkgs/applications/networking/p2p/gnunet/default.nix @@ -38,6 +38,7 @@ stdenv.mkDerivation rec { # Ensure NSS installation works fine configureFlags="$configureFlags --with-nssdir=$out/lib" + patchShebangs src/gns/nss/install-nss-plugin.sh ''; doCheck = false; diff --git a/pkgs/applications/networking/p2p/gnunet/svn.nix b/pkgs/applications/networking/p2p/gnunet/svn.nix index 9e593975412d..25a51b3c9365 100644 --- a/pkgs/applications/networking/p2p/gnunet/svn.nix +++ b/pkgs/applications/networking/p2p/gnunet/svn.nix @@ -47,6 +47,7 @@ stdenv.mkDerivation rec { # Ensure NSS installation works fine configureFlags="$configureFlags --with-nssdir=$out/lib" + patchShebangs src/gns/nss/install-nss-plugin.sh sh contrib/pogen.sh sh bootstrap diff --git a/pkgs/applications/science/logic/cvc4/default.nix b/pkgs/applications/science/logic/cvc4/default.nix index a2618d88918f..5b2e9c54d6f8 100644 --- a/pkgs/applications/science/logic/cvc4/default.nix +++ b/pkgs/applications/science/logic/cvc4/default.nix @@ -9,6 +9,8 @@ stdenv.mkDerivation { buildInputs = [ gmp libantlr3c boost ]; + preConfigure = "patchShebangs ./src/"; + doChecks = true; meta = with stdenv.lib; { diff --git a/pkgs/applications/science/logic/isabelle/default.nix b/pkgs/applications/science/logic/isabelle/default.nix index 4b68f0e3cd6b..88bbe820e2f3 100644 --- a/pkgs/applications/science/logic/isabelle/default.nix +++ b/pkgs/applications/science/logic/isabelle/default.nix @@ -27,6 +27,7 @@ stdenv.mkDerivation { postPatch = '' ENV=$(type -p env) + patchShebangs "." substituteInPlace lib/Tools/env \ --replace /usr/bin/env $ENV substituteInPlace lib/Tools/install \ diff --git a/pkgs/applications/video/cmplayer/default.nix b/pkgs/applications/video/cmplayer/default.nix index fe02f9a33011..3fa38646d9df 100644 --- a/pkgs/applications/video/cmplayer/default.nix +++ b/pkgs/applications/video/cmplayer/default.nix @@ -54,6 +54,10 @@ stdenv.mkDerivation rec { ++ optional cddaSupport libcdda ; + preConfigure = '' + patchShebangs ./configure + patchShebangs src/mpv/waf + ''; configureFlags = with stdenv.lib; [ "--qmake=qmake" ] @@ -63,6 +67,8 @@ stdenv.mkDerivation rec { ++ optional cddaSupport "--enable-cdda" ; + preBuild = "patchShebangs ./build-mpv"; + nativeBuildInputs = [ pkgconfig python2 perl ]; enableParallelBuilding = true; diff --git a/pkgs/applications/video/mplayer2/default.nix b/pkgs/applications/video/mplayer2/default.nix index 6d47ed71b40e..5827e22ea5e0 100644 --- a/pkgs/applications/video/mplayer2/default.nix +++ b/pkgs/applications/video/mplayer2/default.nix @@ -103,6 +103,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ yasm python3 ]; + postConfigure = '' + patchShebangs TOOLS + ''; + configureFlags = with stdenv.lib; '' ${optionalString (useUnfreeCodecs && codecs != null) "--codecsdir=${codecs}"} diff --git a/pkgs/applications/video/mpv/default.nix b/pkgs/applications/video/mpv/default.nix index b87024303fe2..052add92a1fe 100644 --- a/pkgs/applications/video/mpv/default.nix +++ b/pkgs/applications/video/mpv/default.nix @@ -97,6 +97,7 @@ stdenv.mkDerivation rec { configurePhase = '' python3 ${waf} configure --prefix=$out ${lib.optionalString vaapiSupport "--enable-vaapi"} + patchShebangs TOOLS ''; buildPhase = '' diff --git a/pkgs/applications/virtualization/docker/default.nix b/pkgs/applications/virtualization/docker/default.nix index 01f0542e6f4b..3483b0ac6d20 100644 --- a/pkgs/applications/virtualization/docker/default.nix +++ b/pkgs/applications/virtualization/docker/default.nix @@ -15,6 +15,7 @@ stdenv.mkDerivation rec { dontStrip = true; buildPhase = '' + patchShebangs ./hack export AUTO_GOPATH=1 export DOCKER_GITCOMMIT="c78088f" ./hack/make.sh dynbinary diff --git a/pkgs/applications/window-managers/i3/default.nix b/pkgs/applications/window-managers/i3/default.nix index aceb7a0b13c2..39705aca1162 100644 --- a/pkgs/applications/window-managers/i3/default.nix +++ b/pkgs/applications/window-managers/i3/default.nix @@ -18,6 +18,10 @@ stdenv.mkDerivation rec { perlPackages.ExtUtilsPkgConfig perlPackages.TestMore perlPackages.InlineC ]; + postPatch = '' + patchShebangs . + ''; + doCheck = stdenv.system == "x86_64-linux"; checkPhase = '' diff --git a/pkgs/build-support/setup-hooks/patch-shebangs.sh b/pkgs/build-support/setup-hooks/patch-shebangs.sh index c51fce708f35..5a7f23b2d816 100644 --- a/pkgs/build-support/setup-hooks/patch-shebangs.sh +++ b/pkgs/build-support/setup-hooks/patch-shebangs.sh @@ -7,12 +7,6 @@ fixupOutputHooks+=('if [ -z "$dontPatchShebangs" ]; then patchShebangs "$prefix"; fi') -preConfigurePhases+=" patchShebangsPhase" - -patchShebangsPhase() { - if [ -z "$dontPatchSourceShebangs" ]; then patchShebangs "."; fi -} - patchShebangs() { local dir="$1" header "patching script interpreter paths in $dir" diff --git a/pkgs/data/documentation/stdman/default.nix b/pkgs/data/documentation/stdman/default.nix index 53f44736350a..33c002e98013 100644 --- a/pkgs/data/documentation/stdman/default.nix +++ b/pkgs/data/documentation/stdman/default.nix @@ -11,6 +11,11 @@ stdenv.mkDerivation rec { sha256 = "09c5gjhcz97ghfrv9zkgfb1wckvmqnhbzga0xidbm1ir7640di8l"; }; + preConfigure = " + patchShebangs ./configure + patchShebangs ./do_install + "; + buildInputs = [ curl ]; meta = with stdenv.lib; { diff --git a/pkgs/desktops/cinnamon/cjs.nix b/pkgs/desktops/cinnamon/cjs.nix index 6c10340a8f9e..5d5847615653 100644 --- a/pkgs/desktops/cinnamon/cjs.nix +++ b/pkgs/desktops/cinnamon/cjs.nix @@ -19,6 +19,8 @@ stdenv.mkDerivation rec { gobjectIntrospection ]; + preBuild = "patchShebangs ./scripts"; + meta = { homepage = "http://cinnamon.linuxmint.com"; description = "JavaScript bindings for Cinnamon" ; diff --git a/pkgs/desktops/cinnamon/muffin.nix b/pkgs/desktops/cinnamon/muffin.nix index 7eb24444246a..a1fd6b97ac16 100644 --- a/pkgs/desktops/cinnamon/muffin.nix +++ b/pkgs/desktops/cinnamon/muffin.nix @@ -25,6 +25,9 @@ stdenv.mkDerivation { clutter cogl zenity python gnome_doc_utils makeWrapper]; + preBuild = "patchShebangs ./scripts"; + + postFixup = '' for f in "$out/bin/"*; do diff --git a/pkgs/desktops/gnome-3/3.12/core/caribou/default.nix b/pkgs/desktops/gnome-3/3.12/core/caribou/default.nix index 966d26cff01e..3a6c3f0dd357 100644 --- a/pkgs/desktops/gnome-3/3.12/core/caribou/default.nix +++ b/pkgs/desktops/gnome-3/3.12/core/caribou/default.nix @@ -16,6 +16,10 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ gnome3.libgee libxklavier ]; + preBuild = '' + patchShebangs . + ''; + meta = with stdenv.lib; { platforms = platforms.linux; }; diff --git a/pkgs/desktops/gnome-3/3.12/core/gnome-shell/default.nix b/pkgs/desktops/gnome-3/3.12/core/gnome-shell/default.nix index 9136a48d4012..6f6816efa5bd 100644 --- a/pkgs/desktops/gnome-3/3.12/core/gnome-shell/default.nix +++ b/pkgs/desktops/gnome-3/3.12/core/gnome-shell/default.nix @@ -27,6 +27,7 @@ stdenv.mkDerivation rec { installFlags = [ "keysdir=$(out)/share/gnome-control-center/keybindings" ]; preBuild = '' + patchShebangs src/data-to-c.pl substituteInPlace data/Makefile --replace " install-keysDATA" "" ''; diff --git a/pkgs/desktops/gnome-3/3.12/core/vte/0.38.0.nix b/pkgs/desktops/gnome-3/3.12/core/vte/0.38.0.nix index 2c10eccb1e83..548ca347a456 100644 --- a/pkgs/desktops/gnome-3/3.12/core/vte/0.38.0.nix +++ b/pkgs/desktops/gnome-3/3.12/core/vte/0.38.0.nix @@ -17,6 +17,8 @@ stdenv.mkDerivation rec { buildInputs = [ gobjectIntrospection intltool pkgconfig gnome3.glib gnome3.gtk3 ncurses vala libxml2 ]; + preConfigure = "patchShebangs ."; + configureFlags = [ "--enable-introspection" ]; enableParallelBuilding = true; diff --git a/pkgs/development/compilers/go/1.1-darwin.nix b/pkgs/development/compilers/go/1.1-darwin.nix index 411c3e029a6a..5b17f56ac37a 100644 --- a/pkgs/development/compilers/go/1.1-darwin.nix +++ b/pkgs/development/compilers/go/1.1-darwin.nix @@ -22,6 +22,7 @@ stdenv.mkDerivation { fi cd go + patchShebangs ./ # replace /bin/bash rm src/pkg/net/{multicast_test.go,parse_test.go,port_test.go} # The os test wants to read files in an existing path. Just it don't be /usr/bin. sed -i 's,/usr/bin,'"`pwd`", src/pkg/os/os_test.go diff --git a/pkgs/development/compilers/go/1.1.nix b/pkgs/development/compilers/go/1.1.nix index 1a6bfcad3990..11640f2393d2 100644 --- a/pkgs/development/compilers/go/1.1.nix +++ b/pkgs/development/compilers/go/1.1.nix @@ -33,6 +33,7 @@ stdenv.mkDerivation { fi cd go + patchShebangs ./ # replace /bin/bash # !!! substituteInPlace does not seems to be effective. sed -i 's,/lib/ld-linux.so.2,${loader386},' src/cmd/8l/asm.c sed -i 's,/lib64/ld-linux-x86-64.so.2,${loaderAmd64},' src/cmd/6l/asm.c diff --git a/pkgs/development/compilers/go/1.2.nix b/pkgs/development/compilers/go/1.2.nix index c091312c2a99..a00fe7346701 100644 --- a/pkgs/development/compilers/go/1.2.nix +++ b/pkgs/development/compilers/go/1.2.nix @@ -32,6 +32,7 @@ stdenv.mkDerivation { fi cd go + patchShebangs ./ # replace /bin/bash # !!! substituteInPlace does not seems to be effective. sed -i 's,/lib/ld-linux.so.2,${loader386},' src/cmd/8l/asm.c sed -i 's,/lib64/ld-linux-x86-64.so.2,${loaderAmd64},' src/cmd/6l/asm.c diff --git a/pkgs/development/compilers/go/default.nix b/pkgs/development/compilers/go/default.nix index 8756aaa66291..b35159c10e79 100644 --- a/pkgs/development/compilers/go/default.nix +++ b/pkgs/development/compilers/go/default.nix @@ -30,6 +30,7 @@ stdenv.mkDerivation { fi cd go + patchShebangs ./ # replace /bin/bash # !!! substituteInPlace does not seems to be effective. sed -i 's,/lib/ld-linux.so.2,${loader386},' src/cmd/8l/asm.c sed -i 's,/lib64/ld-linux-x86-64.so.2,${loaderAmd64},' src/cmd/6l/asm.c diff --git a/pkgs/development/compilers/julia/0.3.3.nix b/pkgs/development/compilers/julia/0.3.3.nix index 89297995c4ee..a8ad9d00aec5 100644 --- a/pkgs/development/compilers/julia/0.3.3.nix +++ b/pkgs/development/compilers/julia/0.3.3.nix @@ -106,6 +106,8 @@ stdenv.mkDerivation rec { export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PWD/usr/lib:$PWD/usr/lib/julia" + patchShebangs . contrib + export PATH="$PATH:${stdenv.cc.libc}/sbin" # ldconfig doesn't seem to ever work on NixOS; system-wide ldconfig cache diff --git a/pkgs/development/compilers/mono/default.nix b/pkgs/development/compilers/mono/default.nix index c715a6843954..e098f48a24ce 100644 --- a/pkgs/development/compilers/mono/default.nix +++ b/pkgs/development/compilers/mono/default.nix @@ -35,6 +35,7 @@ stdenv.mkDerivation rec { # LLVM path to point into the Mono LLVM build, since it's private anyway. preBuild = '' makeFlagsArray=(INSTALL=`type -tp install`) + patchShebangs ./ '' + stdenv.lib.optionalString withLLVM '' substituteInPlace mono/mini/aot-compiler.c --replace "llvm_path = g_strdup (\"\")" "llvm_path = g_strdup (\"${llvm}/bin/\")" ''; diff --git a/pkgs/development/compilers/opa/default.nix b/pkgs/development/compilers/opa/default.nix index f60b90296325..f0b503bd0be7 100644 --- a/pkgs/development/compilers/opa/default.nix +++ b/pkgs/development/compilers/opa/default.nix @@ -19,6 +19,7 @@ stdenv.mkDerivation rec { codeGeneratorPaths = "${ocamlPackages.ocaml}/bin:${gcc}/bin:${binutils}/bin:${gnumake}/bin:${nodejs}/bin"; preConfigure = '' + patchShebangs . ( cat ./compiler/buildinfos/buildInfos.ml.pre ./compiler/buildinfos/generate_buildinfos.sh . --release --version ./compiler/buildinfos/version_major.txt diff --git a/pkgs/development/libraries/agda/agda-iowa-stdlib/default.nix b/pkgs/development/libraries/agda/agda-iowa-stdlib/default.nix index 446bfdf9ca78..2c76c2f43508 100644 --- a/pkgs/development/libraries/agda/agda-iowa-stdlib/default.nix +++ b/pkgs/development/libraries/agda/agda-iowa-stdlib/default.nix @@ -12,6 +12,7 @@ agda.mkDerivation (self: rec { sourceDirectories = [ "./." ]; buildPhase = '' + patchShebangs find-deps.sh make ''; diff --git a/pkgs/development/libraries/dbus/default.nix b/pkgs/development/libraries/dbus/default.nix index 145462b38d0e..d332321a22ad 100644 --- a/pkgs/development/libraries/dbus/default.nix +++ b/pkgs/development/libraries/dbus/default.nix @@ -47,6 +47,7 @@ let buildInputs = [ autoconf automake libtool ]; # ToDo: optional selinux? preConfigure = '' + patchShebangs . substituteInPlace tools/Makefile.am --replace 'install-localstatelibDATA:' 'disabled:' autoreconf -fi ''; diff --git a/pkgs/development/libraries/folly/default.nix b/pkgs/development/libraries/folly/default.nix index dced097a05ae..66d4f73096b8 100644 --- a/pkgs/development/libraries/folly/default.nix +++ b/pkgs/development/libraries/folly/default.nix @@ -17,6 +17,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook python boost ]; postUnpack = "sourceRoot=\${sourceRoot}/folly"; + preBuild = '' + patchShebangs build + ''; configureFlags = [ "--with-boost-libdir=${boost.lib}/lib" ]; diff --git a/pkgs/development/libraries/hspell/default.nix b/pkgs/development/libraries/hspell/default.nix index 9cd071f6cbe9..9b44d12c2934 100644 --- a/pkgs/development/libraries/hspell/default.nix +++ b/pkgs/development/libraries/hspell/default.nix @@ -13,6 +13,7 @@ stdenv.mkDerivation rec { sha256 = "08x7rigq5pa1pfpl30qp353hbdkpadr1zc49slpczhsn0sg36pd6"; }; + patchPhase = ''patchShebangs .''; buildInputs = [ perl zlib ]; makeFlags = "CFLAGS=-fPIC"; diff --git a/pkgs/development/libraries/ibus/default.nix b/pkgs/development/libraries/ibus/default.nix index ef794b452798..6b426169a708 100644 --- a/pkgs/development/libraries/ibus/default.nix +++ b/pkgs/development/libraries/ibus/default.nix @@ -20,6 +20,7 @@ stdenv.mkDerivation rec { ]; preBuild = '' + patchShebangs ./scripts substituteInPlace data/dconf/Makefile --replace "dconf update" "echo" ''; diff --git a/pkgs/development/libraries/libcouchbase/default.nix b/pkgs/development/libraries/libcouchbase/default.nix index 3e1251215795..841edd3dff61 100644 --- a/pkgs/development/libraries/libcouchbase/default.nix +++ b/pkgs/development/libraries/libcouchbase/default.nix @@ -11,6 +11,7 @@ stdenv.mkDerivation { }; preConfigure = '' + patchShebangs ./config/ ./config/autorun.sh ''; @@ -24,4 +25,4 @@ stdenv.mkDerivation { license = stdenv.lib.licenses.asl20; platforms = stdenv.lib.platforms.unix; }; -} +} \ No newline at end of file diff --git a/pkgs/development/libraries/libctemplate/default.nix b/pkgs/development/libraries/libctemplate/default.nix index 578ccffd0948..142025c1e51d 100644 --- a/pkgs/development/libraries/libctemplate/default.nix +++ b/pkgs/development/libraries/libctemplate/default.nix @@ -12,6 +12,10 @@ stdenv.mkDerivation rec { buildInputs = [ python ]; + postPatch = '' + patchShebangs . + ''; + meta = { description = "A simple but powerful template language for C++"; longDescription = '' diff --git a/pkgs/development/libraries/libqmi/default.nix b/pkgs/development/libraries/libqmi/default.nix index 9a934befde98..a0292067dbb2 100644 --- a/pkgs/development/libraries/libqmi/default.nix +++ b/pkgs/development/libraries/libqmi/default.nix @@ -8,6 +8,10 @@ stdenv.mkDerivation rec { sha256 = "03gf221yjcdzvnl4v2adwpc6cyg5mlbccn20s00fp5bgvmq81pgs"; }; + preBuild = '' + patchShebangs . + ''; + buildInputs = [ pkgconfig glib python ]; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/libsoup/default.nix b/pkgs/development/libraries/libsoup/default.nix index 517eed606e6e..cd2a15ffc668 100644 --- a/pkgs/development/libraries/libsoup/default.nix +++ b/pkgs/development/libraries/libsoup/default.nix @@ -14,6 +14,10 @@ stdenv.mkDerivation { sha256 = "ea34dd64fe44343445daf6dd690d0691e9d973468de44878da97371c16d89784"; }; + patchPhase = '' + patchShebangs libsoup/ + ''; + buildInputs = libintlOrEmpty ++ [ intltool python ]; nativeBuildInputs = [ pkgconfig ]; propagatedBuildInputs = [ glib libxml2 gobjectIntrospection ] diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix index b6b82a12ed6e..8bd4866cb21c 100644 --- a/pkgs/development/libraries/libvirt/default.nix +++ b/pkgs/development/libraries/libvirt/default.nix @@ -25,6 +25,7 @@ stdenv.mkDerivation rec { preConfigure = '' PATH=${iproute}/sbin:${iptables}/sbin:${ebtables}/sbin:${lvm2}/sbin:${udev}/sbin:${dnsmasq}/bin:$PATH + patchShebangs . # fixes /usr/bin/python references ''; configureFlags = [ diff --git a/pkgs/development/libraries/lirc/default.nix b/pkgs/development/libraries/lirc/default.nix index 755bb48af1c8..278eb8e9e523 100644 --- a/pkgs/development/libraries/lirc/default.nix +++ b/pkgs/development/libraries/lirc/default.nix @@ -15,6 +15,8 @@ stdenv.mkDerivation rec { }) ]; + preBuild = "patchShebangs ."; + buildInputs = [ alsaLib help2man ]; configureFlags = [ diff --git a/pkgs/development/libraries/mesa-darwin/default.nix b/pkgs/development/libraries/mesa-darwin/default.nix index 0b0cf5f28220..f259a397c847 100644 --- a/pkgs/development/libraries/mesa-darwin/default.nix +++ b/pkgs/development/libraries/mesa-darwin/default.nix @@ -41,6 +41,8 @@ let ./patches/patch-src-mapi-vgapi-Makefile.diff ]; + postPatch = "patchShebangs ."; + configurePhase = ":"; makeFlags = "INSTALL_DIR=\${out} CC=cc CXX=c++"; diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 4db3b003f2f0..a3b40eb612c2 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -38,6 +38,7 @@ stdenv.mkDerivation { sha256 = "f6031f8b7113a92325b60635c504c510490eebb2e707119bbff7bd86aa34657d"; }; + prePatch = "patchShebangs ."; patches = [ ./static-gallium.patch diff --git a/pkgs/development/libraries/polkit/default.nix b/pkgs/development/libraries/polkit/default.nix index 6a0cc50c4123..7fe16cec56b9 100644 --- a/pkgs/development/libraries/polkit/default.nix +++ b/pkgs/development/libraries/polkit/default.nix @@ -35,7 +35,9 @@ stdenv.mkDerivation rec { ( map (var: ''-DPACKAGE_${var}_DIR=\""${builtins.getAttr var foolVars}"\"'') (builtins.attrNames foolVars) ); - preConfigure = stdenv.lib.optionalString useSystemd /* bogus chroot detection */ '' + preConfigure = '' + patchShebangs . + '' + stdenv.lib.optionalString useSystemd /* bogus chroot detection */ '' sed '/libsystemd-login autoconfigured, but system does not appear to use systemd/s/.*/:/' -i configure '' # ‘libpolkit-agent-1.so’ should call the setuid wrapper on diff --git a/pkgs/development/libraries/qpdf/default.nix b/pkgs/development/libraries/qpdf/default.nix index 2f4815036709..63ba58f23432 100644 --- a/pkgs/development/libraries/qpdf/default.nix +++ b/pkgs/development/libraries/qpdf/default.nix @@ -15,9 +15,11 @@ stdenv.mkDerivation rec { buildInputs = [ pcre zlib ]; postPatch = '' + patchShebangs qpdf/fix-qdf ''; preCheck = '' + patchShebangs qtest/bin/qtest-driver ''; doCheck = true; diff --git a/pkgs/development/libraries/sword/default.nix b/pkgs/development/libraries/sword/default.nix index a91474d054c7..6faf2224b0cf 100644 --- a/pkgs/development/libraries/sword/default.nix +++ b/pkgs/development/libraries/sword/default.nix @@ -13,6 +13,10 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig icu clucene_core curl ]; + prePatch = '' + patchShebangs .; + ''; + configureFlags = "--without-conf --enable-tests=no CXXFLAGS=-Wno-unused-but-set-variable"; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/webkitgtk/2.4.6.nix b/pkgs/development/libraries/webkitgtk/2.4.6.nix index bb8e95fb1ecd..a2344f71f882 100644 --- a/pkgs/development/libraries/webkitgtk/2.4.6.nix +++ b/pkgs/development/libraries/webkitgtk/2.4.6.nix @@ -28,6 +28,10 @@ stdenv.mkDerivation rec { CC = "cc"; + prePatch = '' + patchShebangs Tools/gtk + ''; + configureFlags = with stdenv.lib; [ "--disable-geolocation" (optionalString enableIntrospection "--enable-introspection") diff --git a/pkgs/development/libraries/webkitgtk/default.nix b/pkgs/development/libraries/webkitgtk/default.nix index 08576c2ebc36..3cbf36987323 100644 --- a/pkgs/development/libraries/webkitgtk/default.nix +++ b/pkgs/development/libraries/webkitgtk/default.nix @@ -17,6 +17,8 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ iyzsong koral ]; }; + preConfigure = "patchShebangs Tools"; + src = fetchurl { url = "http://webkitgtk.org/releases/${name}.tar.xz"; sha256 = "1f9qm5g1mbjm2hrnlzymas99piws4h4y3yxz4p6f6gavnsvfjwji"; diff --git a/pkgs/development/libraries/zeitgeist/default.nix b/pkgs/development/libraries/zeitgeist/default.nix index ecdcd7804e54..d0de624890b5 100644 --- a/pkgs/development/libraries/zeitgeist/default.nix +++ b/pkgs/development/libraries/zeitgeist/default.nix @@ -21,6 +21,8 @@ stdenv.mkDerivation rec { libtool python dbus_libs telepathy_glib vala dbus_glib gtk3 json_glib librdf_raptor2 pythonPackages.rdflib ]; + prePatch = "patchShebangs ."; + patches = [ ./dbus_glib.patch ]; patchFlags = [ "-p0" ]; diff --git a/pkgs/development/ocaml-modules/javalib/default.nix b/pkgs/development/ocaml-modules/javalib/default.nix index 960824731f67..7272e668aa20 100644 --- a/pkgs/development/ocaml-modules/javalib/default.nix +++ b/pkgs/development/ocaml-modules/javalib/default.nix @@ -20,6 +20,8 @@ stdenv.mkDerivation rec { createFindlibDestdir = true; + preConfigure = "patchShebangs ./configure.sh"; + configureScript = "./configure.sh"; dontAddPrefix = "true"; diff --git a/pkgs/development/ocaml-modules/sawja/default.nix b/pkgs/development/ocaml-modules/sawja/default.nix index 2ee035aadb61..534a7684cec4 100644 --- a/pkgs/development/ocaml-modules/sawja/default.nix +++ b/pkgs/development/ocaml-modules/sawja/default.nix @@ -22,6 +22,8 @@ stdenv.mkDerivation rec { createFindlibDestdir = true; + preConfigure = "patchShebangs ./configure.sh"; + configureScript = "./configure.sh"; dontAddPrefix = "true"; diff --git a/pkgs/development/python-modules/dbus/default.nix b/pkgs/development/python-modules/dbus/default.nix index 9a6e25d13a44..bc386e7e5ac2 100644 --- a/pkgs/development/python-modules/dbus/default.nix +++ b/pkgs/development/python-modules/dbus/default.nix @@ -8,6 +8,8 @@ if isPyPy then throw "dbus-python not supported for interpreter ${python.executa sha256 = "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"; }; + postPatch = "patchShebangs ."; + buildInputs = [ python pkgconfig dbus dbus_glib ] ++ stdenv.lib.optional doCheck dbus_tools; diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix index 46bed164fef8..1ec48bcc06f2 100644 --- a/pkgs/development/r-modules/default.nix +++ b/pkgs/development/r-modules/default.nix @@ -916,6 +916,14 @@ let ]; otherOverrides = old: new: { + RcppArmadillo = old.RcppArmadillo.overrideDerivation (attrs: { + patchPhase = "patchShebangs configure"; + }); + + rpf = old.rpf.overrideDerivation (attrs: { + patchPhase = "patchShebangs configure"; + }); + BayesXsrc = old.BayesXsrc.overrideDerivation (attrs: { patches = [ ./patches/BayesXsrc.patch ]; }); diff --git a/pkgs/development/tools/build-managers/icmake/default.nix b/pkgs/development/tools/build-managers/icmake/default.nix index 929e68ed4e0b..a32ea9a3adda 100644 --- a/pkgs/development/tools/build-managers/icmake/default.nix +++ b/pkgs/development/tools/build-managers/icmake/default.nix @@ -10,6 +10,7 @@ stdenv.mkDerivation rec { }; preConfigure = '' + patchShebangs ./ sed -i "s;usr/;;g" INSTALL.im ''; @@ -24,4 +25,4 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ pSub ]; platforms = platforms.linux; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/documentation/doxygen/default.nix b/pkgs/development/tools/documentation/doxygen/default.nix index 65ae4b61b4f2..50f2037b271c 100644 --- a/pkgs/development/tools/documentation/doxygen/default.nix +++ b/pkgs/development/tools/documentation/doxygen/default.nix @@ -24,7 +24,9 @@ stdenv.mkDerivation { ++ stdenv.lib.optional (qt4 != null) "--with-doxywizard"; preConfigure = - stdenv.lib.optionalString (qt4 != null) + '' + patchShebangs . + '' + stdenv.lib.optionalString (qt4 != null) '' echo "using QTDIR=${qt4}..." export QTDIR=${qt4} diff --git a/pkgs/development/tools/misc/yodl/default.nix b/pkgs/development/tools/misc/yodl/default.nix index f16c961f4cf4..691974353e10 100644 --- a/pkgs/development/tools/misc/yodl/default.nix +++ b/pkgs/development/tools/misc/yodl/default.nix @@ -12,6 +12,7 @@ stdenv.mkDerivation rec { }; preConfigure = '' + patchShebangs scripts/. sed -i 's;/usr;;g' INSTALL.im substituteInPlace build --replace /usr/bin/icmake ${icmake}/bin/icmake substituteInPlace macros/rawmacros/startdoc.pl --replace /usr/bin/perl ${perl}/bin/perl diff --git a/pkgs/games/crawl/default.nix b/pkgs/games/crawl/default.nix index 21432f0190de..7f971150c675 100644 --- a/pkgs/games/crawl/default.nix +++ b/pkgs/games/crawl/default.nix @@ -25,6 +25,10 @@ stdenv.mkDerivation rec { cd source # Related to issue #1963 sed -i 's/-fuse-ld=gold//g' Makefile + for i in util/*.pl; do + patchShebangs $i + done + patchShebangs util/gen-mi-enum ''; makeFlags = [ "prefix=$(out)" "FORCE_CC=gcc" "FORCE_CXX=g++" "HOSTCXX=g++" diff --git a/pkgs/misc/vim-plugins/default.nix b/pkgs/misc/vim-plugins/default.nix index 25a3a051fb95..2ca31d523feb 100644 --- a/pkgs/misc/vim-plugins/default.nix +++ b/pkgs/misc/vim-plugins/default.nix @@ -527,6 +527,8 @@ rec { configurePhase = ":"; buildPhase = '' + patchShebangs . + target=$out/${rtpPath}/youcompleteme mkdir -p $target cp -a ./ $target diff --git a/pkgs/os-specific/darwin/cctools-port/default.nix b/pkgs/os-specific/darwin/cctools-port/default.nix index eb4924ef8d4b..cdc259c1e2a0 100644 --- a/pkgs/os-specific/darwin/cctools-port/default.nix +++ b/pkgs/os-specific/darwin/cctools-port/default.nix @@ -22,6 +22,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; postPatch = '' + patchShebangs tools sed -i -e 's/which/type -P/' tools/*.sh sed -i -e 's|clang++|& -I${libcxx}/include/c++/v1|' cctools/autogen.sh diff --git a/pkgs/os-specific/linux/hwdata/default.nix b/pkgs/os-specific/linux/hwdata/default.nix index 57785d40132c..325a44f97aa4 100644 --- a/pkgs/os-specific/linux/hwdata/default.nix +++ b/pkgs/os-specific/linux/hwdata/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation { sha256 = "1ak3h3psg3wk9yk0dqnzdzik3jadzja3ah22vjfmf71p3b5xc8ai"; }; + preConfigure = "patchShebangs ./configure"; + configureFlags = "--datadir=$(prefix)/data"; meta = { diff --git a/pkgs/os-specific/linux/x86info/default.nix b/pkgs/os-specific/linux/x86info/default.nix index ef1935b931f6..54bd33cc92fd 100644 --- a/pkgs/os-specific/linux/x86info/default.nix +++ b/pkgs/os-specific/linux/x86info/default.nix @@ -10,6 +10,8 @@ stdenv.mkDerivation rec { }; preConfigure = '' + patchShebangs . + # ignore warnings sed -i 's/-Werror -Wall//' Makefile ''; diff --git a/pkgs/servers/amqp/rabbitmq-server/default.nix b/pkgs/servers/amqp/rabbitmq-server/default.nix index e850727ca1ae..b5f9195abbde 100644 --- a/pkgs/servers/amqp/rabbitmq-server/default.nix +++ b/pkgs/servers/amqp/rabbitmq-server/default.nix @@ -14,6 +14,11 @@ stdenv.mkDerivation rec { buildInputs = [ erlang python libxml2 libxslt xmlto docbook_xml_dtd_45 docbook_xsl zip unzip ]; + preBuild = + '' + # Fix the "/usr/bin/env" in "calculate-relative". + patchShebangs . + ''; installFlags = "TARGET_DIR=$(out)/libexec/rabbitmq SBIN_DIR=$(out)/sbin MAN_DIR=$(out)/share/man DOC_INSTALL_DIR=$(out)/share/doc"; diff --git a/pkgs/servers/fleet/default.nix b/pkgs/servers/fleet/default.nix index 94343fcba5c2..9a122ae90a69 100644 --- a/pkgs/servers/fleet/default.nix +++ b/pkgs/servers/fleet/default.nix @@ -14,6 +14,7 @@ stdenv.mkDerivation rec { buildInputs = [ go ]; buildPhase = '' + patchShebangs build ./build ''; diff --git a/pkgs/servers/gpsd/default.nix b/pkgs/servers/gpsd/default.nix index 90d7d7435be5..17325ccb2914 100644 --- a/pkgs/servers/gpsd/default.nix +++ b/pkgs/servers/gpsd/default.nix @@ -36,6 +36,7 @@ stdenv.mkDerivation rec { # 'chrpath' is used to be able to run the tests from the source tree, but # we use $LD_LIBRARY_PATH instead. buildPhase = '' + patchShebangs . mkdir -p "$out" sed -e "s|python_lib_dir = .*|python_lib_dir = \"$out/lib/${pythonFull.libPrefix}/site-packages\"|" -i SConstruct scons prefix="$out" leapfetch=no gpsd_user=${gpsdUser} gpsd_group=${gpsdGroup} \ diff --git a/pkgs/servers/http/openresty/default.nix b/pkgs/servers/http/openresty/default.nix index 213313cb6b20..65c81c455b9e 100644 --- a/pkgs/servers/http/openresty/default.nix +++ b/pkgs/servers/http/openresty/default.nix @@ -52,6 +52,7 @@ stdenv.mkDerivation rec { preConfigure = '' export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libxml2}/include/libxml2 $additionalFlags" export PATH="$PATH:${stdenv.cc.libc}/sbin" + patchShebangs . ''; meta = { diff --git a/pkgs/servers/nosql/rethinkdb/default.nix b/pkgs/servers/nosql/rethinkdb/default.nix index 0bf4ed1c1bdf..1c8eac99737c 100644 --- a/pkgs/servers/nosql/rethinkdb/default.nix +++ b/pkgs/servers/nosql/rethinkdb/default.nix @@ -10,6 +10,7 @@ stdenv.mkDerivation rec { preConfigure = '' export ALLOW_WARNINGS=1 + patchShebangs . ''; configureFlags = "--lib-path ${gperftools}/lib"; diff --git a/pkgs/servers/nosql/riak/1.3.1.nix b/pkgs/servers/nosql/riak/1.3.1.nix index e414668195e8..e773f6ddcc36 100644 --- a/pkgs/servers/nosql/riak/1.3.1.nix +++ b/pkgs/servers/nosql/riak/1.3.1.nix @@ -32,6 +32,7 @@ stdenv.mkDerivation rec { cp -R getopt riaknostic/deps cp -R meck riaknostic/deps popd + patchShebangs . ''; buildPhase = '' diff --git a/pkgs/servers/openafs-client/default.nix b/pkgs/servers/openafs-client/default.nix index 4aedc0193276..9d9df2e38c0e 100644 --- a/pkgs/servers/openafs-client/default.nix +++ b/pkgs/servers/openafs-client/default.nix @@ -24,6 +24,7 @@ stdenv.mkDerivation { preConfigure = '' ln -s ${kernel.dev}/lib/modules/*/build $TMP/linux + patchShebangs . for i in `grep -l -R '/usr/\(include\|src\)' .`; do echo "Patch /usr/include and /usr/src in $i" substituteInPlace $i \ diff --git a/pkgs/tools/backup/bup/default.nix b/pkgs/tools/backup/bup/default.nix index e181b4ca18ea..1964f01b0774 100644 --- a/pkgs/tools/backup/bup/default.nix +++ b/pkgs/tools/backup/bup/default.nix @@ -19,6 +19,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ pandoc perl makeWrapper ]; patchPhase = '' + patchShebangs . substituteInPlace Makefile --replace "-Werror" "" substituteInPlace Makefile --replace "./format-subst.pl" "perl ./format-subst.pl" '' + optionalString par2Support '' diff --git a/pkgs/tools/cd-dvd/dvdisaster/default.nix b/pkgs/tools/cd-dvd/dvdisaster/default.nix index 34ca3d848712..b54f342b3454 100644 --- a/pkgs/tools/cd-dvd/dvdisaster/default.nix +++ b/pkgs/tools/cd-dvd/dvdisaster/default.nix @@ -10,6 +10,10 @@ stdenv.mkDerivation rec { sha256 = "e9787dea39aeafa38b26604752561bc895083c17b588489d857ac05c58be196b"; }; + postPatch = '' + patchShebangs ./ + ''; + buildInputs = [ pkgconfig which gettext intltool glib gtk2 diff --git a/pkgs/tools/filesystems/nixpart/0.4/pyparted.nix b/pkgs/tools/filesystems/nixpart/0.4/pyparted.nix index 81fe82144153..67f318c863e1 100644 --- a/pkgs/tools/filesystems/nixpart/0.4/pyparted.nix +++ b/pkgs/tools/filesystems/nixpart/0.4/pyparted.nix @@ -29,6 +29,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ parted ]; checkPhase = '' + patchShebangs Makefile make test PYTHON=${python.executable} ''; diff --git a/pkgs/tools/misc/convmv/default.nix b/pkgs/tools/misc/convmv/default.nix index aea4fb8aad00..7db7ebf96d6d 100644 --- a/pkgs/tools/misc/convmv/default.nix +++ b/pkgs/tools/misc/convmv/default.nix @@ -12,8 +12,9 @@ stdenv.mkDerivation rec { makeFlags="PREFIX=$out" ''; - postBuild='' + patchPhase='' tar -xf testsuite.tar + patchShebangs . ''; doCheck = true; diff --git a/pkgs/tools/misc/opentsdb/default.nix b/pkgs/tools/misc/opentsdb/default.nix index c19ccfba001c..6f9695ba363c 100644 --- a/pkgs/tools/misc/opentsdb/default.nix +++ b/pkgs/tools/misc/opentsdb/default.nix @@ -16,6 +16,7 @@ stdenv.mkDerivation rec { mkdir build cd build ../configure --prefix=$out + patchShebangs ../build-aux/ ''; installPhase = '' diff --git a/pkgs/tools/misc/parted/default.nix b/pkgs/tools/misc/parted/default.nix index fdfcfdc73d97..0763532260a9 100644 --- a/pkgs/tools/misc/parted/default.nix +++ b/pkgs/tools/misc/parted/default.nix @@ -12,6 +12,7 @@ stdenv.mkDerivation rec { patches = stdenv.lib.optional doCheck ./gpt-unicode-test-fix.patch; postPatch = stdenv.lib.optionalString doCheck '' + patchShebangs tests ''; buildInputs = [ libuuid ] diff --git a/pkgs/tools/misc/pipelight/default.nix b/pkgs/tools/misc/pipelight/default.nix index e30ce14d5e9f..5ead0e7c8bab 100644 --- a/pkgs/tools/misc/pipelight/default.nix +++ b/pkgs/tools/misc/pipelight/default.nix @@ -32,6 +32,7 @@ let ]; postPatch = '' export wineDir=$(pwd) + patchShebangs $wineDir/tools/ chmod u+w $wineDir/../git-export/debian/tools/ patchShebangs $wineDir/../git-export/debian/tools/ chmod -R +rwx ../git-export/ diff --git a/pkgs/tools/security/mbox/default.nix b/pkgs/tools/security/mbox/default.nix index 1dba136bda7e..732cf7046610 100644 --- a/pkgs/tools/security/mbox/default.nix +++ b/pkgs/tools/security/mbox/default.nix @@ -21,6 +21,7 @@ stdenv.mkDerivation { checkPhase = '' rm tests/test-*vim.sh tests/test-pip.sh + patchShebangs ./; dontPatchShebags=1 sed -i 's|^/bin/||' tests/test-fileops.sh ./testall.sh diff --git a/pkgs/tools/typesetting/tex/latex2html/default.nix b/pkgs/tools/typesetting/tex/latex2html/default.nix index 853668c3b8aa..f6fc640eb3f8 100644 --- a/pkgs/tools/typesetting/tex/latex2html/default.nix +++ b/pkgs/tools/typesetting/tex/latex2html/default.nix @@ -11,6 +11,7 @@ stdenv.mkDerivation rec { buildInputs = [ tex perl ghostscript netpbm ]; preConfigure = '' + patchShebangs . sed -i -e "s|#! /bin/cat|#! $(type -p cat)|" configure configureFlags="--with-texpath=$out/share/texmf-nix"; ''; diff --git a/pkgs/tools/virtualization/cloud-init/default.nix b/pkgs/tools/virtualization/cloud-init/default.nix index 93814684bc13..48eb68242e1e 100644 --- a/pkgs/tools/virtualization/cloud-init/default.nix +++ b/pkgs/tools/virtualization/cloud-init/default.nix @@ -12,6 +12,8 @@ in pythonPackages.buildPythonPackage rec { }; preBuild = '' + patchShebangs ./tools + substituteInPlace setup.py \ --replace /usr $out \ --replace /etc $out/etc \ diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 6ad1e46de0ae..813284ede8f8 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -1357,6 +1357,7 @@ let self = _self // overrides; _self = with self; { url = mirror://cpan/authors/id/S/SC/SCHWIGON/class-methodmaker/Class-MethodMaker-2.21.tar.gz; sha256 = "0gca1cjy2k0mrpfnbyzm5islzfayqfvg3zzlrlm7n60p0cb48y7w"; }; + preConfigure = "patchShebangs ."; meta = { description = "A module for creating generic methods"; license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 24f2feffdfed..77e380105c84 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7213,6 +7213,10 @@ let sha256 = "1mrh233pj584gf7la64d4xlmvdnfl4jwpxs95lnd3i4zd5drid14"; }; + preConfigure = '' + patchShebangs . + ''; + buildInputs = [ self.setuptools self.nose pkgs.pkgconfig pkgs.swig pkgs.libcdio ]; @@ -7581,6 +7585,7 @@ let propagatedBuildInputs = with self; [ pkgs.parted ]; checkPhase = '' + patchShebangs Makefile make test PYTHON=${python.executable} ''; From 71c3c1963899e0bc6e18e32a7191670993c3e583 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 12 Jan 2015 13:01:33 +0100 Subject: [PATCH 09/29] stdenv: Remove redundant "building ..." message Nix already shows what paths are being built. --- pkgs/stdenv/generic/setup.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 1cc60ebf02bc..8c9f127e806c 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -783,8 +783,6 @@ showPhaseHeader() { genericBuild() { - header "building $out" - if [ -n "$buildCommand" ]; then eval "$buildCommand" return @@ -828,8 +826,6 @@ genericBuild() { stopNest done - - stopNest } From 2533a1124192c9da20087514986c3d37cc106c15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 11 Jan 2015 20:07:38 +0100 Subject: [PATCH 10/29] stdenv substitute: avoid using a temporary file - IMO using a temporary is not needed here (anymore), - temporary at that location can cause a problem (in a specific case): for example, when using the substituteAll function from nixpkgs on a single file directly under /nix/store/ (or ./foo-file), the stdenv's substitute tries to create a temporary directly under /nix/store, which causes problems on chrooted darwin (according to @copumpkin earlier today on IRC) --- pkgs/stdenv/generic/setup.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 1cc60ebf02bc..d72fddf439eb 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -370,9 +370,8 @@ substitute() { content="${content//"$pattern"/$replacement}" done - printf "%s" "$content" > "$output".tmp - if [ -x "$output" ]; then chmod +x "$output".tmp; fi - mv -f "$output".tmp "$output" + chmod -f +w "$output" || true + printf "%s" "$content" > "$output" } From 309b956215309b7cc17a3877b98eba062969f8f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 13 Jan 2015 16:55:11 +0100 Subject: [PATCH 11/29] lib/licenses: add IJG (Independent JPEG...) --- lib/licenses.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/licenses.nix b/lib/licenses.nix index e3b551953fdd..5959a3d5036d 100644 --- a/lib/licenses.nix +++ b/lib/licenses.nix @@ -185,6 +185,11 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec { url = http://www.calculate-linux.org/packages/licenses/iASL; }; + ijg = spdx { + spdxId = "IJG"; + fullName = "Independent JPEG Group License"; + }; + inria = { fullName = "INRIA Non-Commercial License Agreement"; url = "http://compcert.inria.fr/doc/LICENSE"; From 51fdc6e2385116bf28cb21c1b94b025b1c4055f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 13 Jan 2015 16:55:58 +0100 Subject: [PATCH 12/29] libjpeg-turbo: major update, and populate meta TODO: also some darwin packaging improvements were in the news. Maybe it would be suitable to have this as the default libjpeg in there. --- pkgs/development/libraries/libjpeg-turbo/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/libjpeg-turbo/default.nix b/pkgs/development/libraries/libjpeg-turbo/default.nix index 07f3d65ffc1f..6a650de85646 100644 --- a/pkgs/development/libraries/libjpeg-turbo/default.nix +++ b/pkgs/development/libraries/libjpeg-turbo/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, nasm }: stdenv.mkDerivation rec { - name = "libjpeg-turbo-1.3.1"; + name = "libjpeg-turbo-1.4.0"; src = fetchurl { url = "mirror://sourceforge/libjpeg-turbo/${name}.tar.gz"; - sha256 = "1fbgcvlnn3d5gvf0v9jnlcabpv2z3nwxclzyabahxi6x2xs90cn1"; + sha256 = "1vmv5ciqq98gi2ishqbvlx9hsk7sl06lr6xkcgw480jiddadhfnr"; }; buildInputs = [ nasm ]; @@ -13,9 +13,12 @@ stdenv.mkDerivation rec { doCheck = true; checkTarget = "test"; - meta = { + meta = with stdenv.lib; { homepage = http://libjpeg-turbo.virtualgl.org/; description = "A faster (using SIMD) libjpeg implementation"; - license = stdenv.lib.licenses.free; + license = licenses.ijg; # and some parts under other BSD-style licenses + platforms = platforms.all; + maintainers = [ maintainers.vcunat ]; }; } + From e85c899f8d247d26d5f76849187d96f623546555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 13 Jan 2015 17:59:41 +0100 Subject: [PATCH 13/29] harfbuzz: small update --- pkgs/development/libraries/harfbuzz/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/harfbuzz/default.nix b/pkgs/development/libraries/harfbuzz/default.nix index 9c7244fdc6ed..0b75797b366f 100644 --- a/pkgs/development/libraries/harfbuzz/default.nix +++ b/pkgs/development/libraries/harfbuzz/default.nix @@ -8,11 +8,11 @@ # (icu is a ~30 MB dependency, the rest is very small in comparison) stdenv.mkDerivation rec { - name = "harfbuzz-0.9.36"; + name = "harfbuzz-0.9.37"; src = fetchurl { url = "http://www.freedesktop.org/software/harfbuzz/release/${name}.tar.bz2"; - sha256 = "3bfbf7b016167ee6b2a2f83948fef75cc1253081873d6a91022161815956b9be"; + sha256 = "01q22an29ni6b7yaial7l2zq0yyr8dk2230x7n31dbfy88w3npr5"; }; configureFlags = [ From 1c0477c08cfcb04d41bf7c0b828d642ce2956b4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 13 Jan 2015 18:01:27 +0100 Subject: [PATCH 14/29] dbus: a security-hardening update --- pkgs/development/libraries/dbus/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/dbus/default.nix b/pkgs/development/libraries/dbus/default.nix index d332321a22ad..525ed64a97d5 100644 --- a/pkgs/development/libraries/dbus/default.nix +++ b/pkgs/development/libraries/dbus/default.nix @@ -3,8 +3,8 @@ , libX11, libICE, libSM, useX11 ? (stdenv.isLinux || stdenv.isDarwin) }: let - version = "1.8.12"; - sha256 = "07jhcalg00i2rx5zrgk73rg0vm7lzi5q5z2gscrbl999ipr2h569"; + version = "1.8.14"; + sha256 = "06hzrvlpm91c4a4a19bk5pzxvs00fwd7fjd3njd3pjd4lr854hl3"; inherit (stdenv) lib; From 48f63c2f2e3752df2a0b73cad9b9bba9eda8ac60 Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Fri, 9 Jan 2015 11:22:12 -0800 Subject: [PATCH 15/29] rename gcc-wrapper to cc-wrapper. also makes cc-wrapper compatible with clang in the darwin fork. --- .../applications/editors/vim/configurable.nix | 2 +- pkgs/applications/editors/vim/qvim.nix | 2 +- .../{gcc-wrapper => cc-wrapper}/add-flags | 4 +- .../cc-wrapper.sh} | 12 ++ .../{gcc-wrapper => cc-wrapper}/default.nix | 128 +++++++++--------- .../gnat-wrapper.sh | 0 .../gnatlink-wrapper.sh | 0 .../ld-solaris-wrapper.sh | 0 .../{gcc-wrapper => cc-wrapper}/ld-wrapper.sh | 0 .../{gcc-wrapper => cc-wrapper}/setup-hook.sh | 4 +- .../{gcc-wrapper => cc-wrapper}/utils.sh | 0 pkgs/stdenv/adapters.nix | 2 +- pkgs/stdenv/darwin/default.nix | 4 +- pkgs/stdenv/linux/default.nix | 10 +- pkgs/stdenv/native/default.nix | 4 +- pkgs/stdenv/nix/default.nix | 8 +- pkgs/top-level/all-packages.nix | 93 +++++++------ 17 files changed, 146 insertions(+), 127 deletions(-) rename pkgs/build-support/{gcc-wrapper => cc-wrapper}/add-flags (84%) rename pkgs/build-support/{gcc-wrapper/gcc-wrapper.sh => cc-wrapper/cc-wrapper.sh} (88%) rename pkgs/build-support/{gcc-wrapper => cc-wrapper}/default.nix (64%) rename pkgs/build-support/{gcc-wrapper => cc-wrapper}/gnat-wrapper.sh (100%) rename pkgs/build-support/{gcc-wrapper => cc-wrapper}/gnatlink-wrapper.sh (100%) rename pkgs/build-support/{gcc-wrapper => cc-wrapper}/ld-solaris-wrapper.sh (100%) rename pkgs/build-support/{gcc-wrapper => cc-wrapper}/ld-wrapper.sh (100%) rename pkgs/build-support/{gcc-wrapper => cc-wrapper}/setup-hook.sh (91%) rename pkgs/build-support/{gcc-wrapper => cc-wrapper}/utils.sh (100%) diff --git a/pkgs/applications/editors/vim/configurable.nix b/pkgs/applications/editors/vim/configurable.nix index d5b7182c64a7..6910f13bb36a 100644 --- a/pkgs/applications/editors/vim/configurable.nix +++ b/pkgs/applications/editors/vim/configurable.nix @@ -33,7 +33,7 @@ in composableDerivation { # use gccApple to compile on darwin mkDerivation = ( if stdenv.isDarwin - then stdenvAdapters.overrideGCC stdenv gccApple + then stdenvAdapters.overrideCC stdenv gccApple else stdenv ).mkDerivation; } (fix: { diff --git a/pkgs/applications/editors/vim/qvim.nix b/pkgs/applications/editors/vim/qvim.nix index 5d1a8a6f1410..8c87d3c1e20c 100644 --- a/pkgs/applications/editors/vim/qvim.nix +++ b/pkgs/applications/editors/vim/qvim.nix @@ -8,7 +8,7 @@ let inherit (args.composableDerivation) composableDerivation edf; in composableDerivation { # use gccApple to compile on darwin mkDerivation = ( if stdenv.isDarwin - then stdenvAdapters.overrideGCC stdenv gccApple + then stdenvAdapters.overrideCC stdenv gccApple else stdenv ).mkDerivation; } (fix: { diff --git a/pkgs/build-support/gcc-wrapper/add-flags b/pkgs/build-support/cc-wrapper/add-flags similarity index 84% rename from pkgs/build-support/gcc-wrapper/add-flags rename to pkgs/build-support/cc-wrapper/add-flags index be79fc370ec9..d48361539047 100644 --- a/pkgs/build-support/gcc-wrapper/add-flags +++ b/pkgs/build-support/cc-wrapper/add-flags @@ -6,7 +6,7 @@ if [ -e @out@/nix-support/libc-cflags ]; then fi if [ -e @out@/nix-support/gcc-cflags ]; then - export NIX_CFLAGS_COMPILE="$(cat @out@/nix-support/gcc-cflags) $NIX_CFLAGS_COMPILE" + export NIX_CFLAGS_COMPILE="$(cat @out@/nix-support/cc-cflags) $NIX_CFLAGS_COMPILE" fi if [ -e @out@/nix-support/gnat-cflags ]; then @@ -18,7 +18,7 @@ if [ -e @out@/nix-support/libc-ldflags ]; then fi if [ -e @out@/nix-support/gcc-ldflags ]; then - export NIX_LDFLAGS+=" $(cat @out@/nix-support/gcc-ldflags)" + export NIX_LDFLAGS+=" $(cat @out@/nix-support/cc-ldflags)" fi if [ -e @out@/nix-support/libc-ldflags-before ]; then diff --git a/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh b/pkgs/build-support/cc-wrapper/cc-wrapper.sh similarity index 88% rename from pkgs/build-support/gcc-wrapper/gcc-wrapper.sh rename to pkgs/build-support/cc-wrapper/cc-wrapper.sh index c918cc30d9ab..3a7e24dfcafb 100644 --- a/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh +++ b/pkgs/build-support/cc-wrapper/cc-wrapper.sh @@ -79,6 +79,18 @@ if [ "$NIX_ENFORCE_PURITY" = 1 -a -n "$NIX_STORE" ]; then params=("${rest[@]}") fi +if test -n "@libcxx@"; then + NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem@libcxx@/include/c++/v1" + if [[ "@prog@" = *++ ]]; then + NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -stdlib=libc++" + if test -z "$NIX_SKIP_CXX"; then + NIX_CFLAGS_LINK="$NIX_CFLAGS_LINK -L@libcxx@/lib -stdlib=libc++" + fi + if test -z "$NIX_SKIP_CXXABI" && echo "$@" | grep -qvw -- -nostdlib; then + NIX_CFLAGS_LINK="$NIX_CFLAGS_LINK -L@libcxxabi@/lib -lc++abi" + fi + fi +fi # Add the flags for the C compiler proper. extraAfter=($NIX_CFLAGS_COMPILE) diff --git a/pkgs/build-support/gcc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix similarity index 64% rename from pkgs/build-support/gcc-wrapper/default.nix rename to pkgs/build-support/cc-wrapper/default.nix index aed1ab817aad..abbba31641b3 100644 --- a/pkgs/build-support/gcc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -1,4 +1,4 @@ -# The Nixpkgs GCC is not directly usable, since it doesn't know where +# The Nixpkgs CC is not directly usable, since it doesn't know where # the C library and standard header files are. Therefore the compiler # produced by that package cannot be installed directly in a user # environment and used from the command line. So we use a wrapper @@ -6,34 +6,35 @@ # compiler and the linker just "work". { name ? "", stdenv, nativeTools, nativeLibc, nativePrefix ? "" -, gcc ? null, libc ? null, binutils ? null, coreutils ? null, shell ? stdenv.shell +, cc ? null, libc ? null, binutils ? null, coreutils ? null, shell ? stdenv.shell , zlib ? null, extraPackages ? [] +, libcxx ? null, libcxxabi ? null }: with stdenv.lib; assert nativeTools -> nativePrefix != ""; -assert !nativeTools -> gcc != null && binutils != null && coreutils != null; +assert !nativeTools -> cc != null && binutils != null && coreutils != null; assert !nativeLibc -> libc != null; # For ghdl (the vhdl language provider to gcc) we need zlib in the wrapper. -assert gcc.langVhdl or false -> zlib != null; +assert cc.langVhdl or false -> zlib != null; let - gccVersion = (builtins.parseDrvName gcc.name).version; - gccName = (builtins.parseDrvName gcc.name).name; + ccVersion = (builtins.parseDrvName cc.name).version; + ccName = (builtins.parseDrvName cc.name).name; in stdenv.mkDerivation { name = - (if name != "" then name else gccName + "-wrapper") + - (if gcc != null && gccVersion != "" then "-" + gccVersion else ""); + (if name != "" then name else ccName + "-wrapper") + + (if cc != null && ccVersion != "" then "-" + ccVersion else ""); preferLocalBuild = true; - inherit gcc shell; + inherit cc shell libcxx libcxxabi; libc = if nativeLibc then null else libc; binutils = if nativeTools then null else binutils; # The wrapper scripts use 'cat', so we may need coreutils. @@ -73,7 +74,7 @@ stdenv.mkDerivation { # compile, because it uses "#include_next " to find the # limits.h file in ../includes-fixed. To remedy the problem, # another -idirafter is necessary to add that directory again. - echo "-B$libc/lib/ -idirafter $libc/include -idirafter $gcc/lib/gcc/*/*/include-fixed" > $out/nix-support/libc-cflags + echo "-B$libc/lib/ -idirafter $libc/include -idirafter $cc/lib/gcc/*/*/include-fixed" > $out/nix-support/libc-cflags echo "-L$libc/lib" > $out/nix-support/libc-ldflags @@ -86,43 +87,50 @@ stdenv.mkDerivation { '' + (if nativeTools then '' - gccPath="${nativePrefix}/bin" + ccPath="${nativePrefix}/bin" ldPath="${nativePrefix}/bin" '' else '' - echo $gcc > $out/nix-support/orig-gcc + echo $cc > $out/nix-support/orig-cc - # GCC shows $gcc/lib in `gcc -print-search-dirs', but not - # $gcc/lib64 (even though it does actually search there...).. + # GCC shows $cc/lib in `gcc -print-search-dirs', but not + # $cc/lib64 (even though it does actually search there...).. # This confuses libtool. So add it to the compiler tool search # path explicitly. - if [ -e "$gcc/lib64" -a ! -L "$gcc/lib64" ]; then - gccLDFlags+=" -L$gcc/lib64" - gccCFlags+=" -B$gcc/lib64" + if [ -e "$cc/lib64" -a ! -L "$cc/lib64" ]; then + ccLDFlags+=" -L$cc/lib64" + ccCFlags+=" -B$cc/lib64" fi - gccLDFlags+=" -L$gcc/lib" + ccLDFlags+=" -L$cc/lib" - ${optionalString gcc.langVhdl or false '' - gccLDFlags+=" -L${zlib}/lib" + ${optionalString cc.langVhdl or false '' + ccLDFlags+=" -L${zlib}/lib" ''} # Find the gcc libraries path (may work only without multilib). - ${optionalString gcc.langAda or false '' - basePath=`echo $gcc/lib/*/*/*` - gccCFlags+=" -B$basePath -I$basePath/adainclude" + ${optionalString cc.langAda or false '' + basePath=`echo $cc/lib/*/*/*` + ccCFlags+=" -B$basePath -I$basePath/adainclude" gnatCFlags="-aI$basePath/adainclude -aO$basePath/adalib" echo "$gnatCFlags" > $out/nix-support/gnat-cflags ''} - echo "$gccLDFlags" > $out/nix-support/gcc-ldflags - echo "$gccCFlags" > $out/nix-support/gcc-cflags + if [ -e $ccPath/clang ]; then + # Need files like crtbegin.o from gcc + # It's unclear if these will ever be provided by an LLVM project + ccCFlags="$ccCFlags -B$basePath" + ccCFlags="$ccCFlags -isystem$cc/lib/clang/$ccVersion/include" + fi - gccPath="$gcc/bin" + echo "$ccLDFlags" > $out/nix-support/cc-ldflags + echo "$ccCFlags" > $out/nix-support/cc-cflags + + ccPath="$cc/bin" ldPath="$binutils/bin" - # Propagate the wrapped gcc so that if you install the wrapper, + # Propagate the wrapped cc so that if you install the wrapper, # you get tools like gcov, the manpages, etc. as well (including # for binutils and Glibc). - echo $gcc $binutils $libc > $out/nix-support/propagated-user-env-packages + echo $cc $binutils $libc > $out/nix-support/propagated-user-env-packages echo ${toString extraPackages} > $out/nix-support/propagated-native-build-inputs '' @@ -136,7 +144,7 @@ stdenv.mkDerivation { + '' # Create a symlink to as (the assembler). This is useful when a - # gcc-wrapper is installed in a user environment, as it ensures that + # cc-wrapper is installed in a user environment, as it ensures that # the right assembler is called. if [ -e $ldPath/as ]; then ln -s $ldPath/as $out/bin/as @@ -152,64 +160,56 @@ stdenv.mkDerivation { wrap ld.bfd ${./ld-wrapper.sh} $binutils/bin/ld.bfd fi - if [ -e $gccPath/gcc ]; then - wrap gcc ${./gcc-wrapper.sh} $gccPath/gcc + if [ -e $ccPath/gcc ]; then + wrap gcc ${./cc-wrapper.sh} $ccPath/gcc ln -s gcc $out/bin/cc - elif [ -e $gccPath/clang ]; then - wrap clang ${./gcc-wrapper.sh} $gccPath/clang + elif [ -e $ccPath/clang ]; then + wrap clang ${./cc-wrapper.sh} $ccPath/clang ln -s clang $out/bin/cc fi - if [ -e $gccPath/g++ ]; then - wrap g++ ${./gcc-wrapper.sh} $gccPath/g++ + if [ -e $ccPath/g++ ]; then + wrap g++ ${./cc-wrapper.sh} $ccPath/g++ ln -s g++ $out/bin/c++ - elif [ -e $gccPath/clang++ ]; then - wrap clang++ ${./gcc-wrapper.sh} $gccPath/clang++ + elif [ -e $ccPath/clang++ ]; then + wrap clang++ ${./cc-wrapper.sh} $ccPath/clang++ ln -s clang++ $out/bin/c++ fi - if [ -e $gccPath/cpp ]; then - wrap cpp ${./gcc-wrapper.sh} $gccPath/cpp + if [ -e $ccPath/cpp ]; then + wrap cpp ${./cc-wrapper.sh} $ccPath/cpp fi '' - + optionalString gcc.langFortran or false '' - wrap gfortran ${./gcc-wrapper.sh} $gccPath/gfortran + + optionalString cc.langFortran or false '' + wrap gfortran ${./cc-wrapper.sh} $ccPath/gfortran ln -sv gfortran $out/bin/g77 ln -sv gfortran $out/bin/f77 '' - + optionalString gcc.langJava or false '' - wrap gcj ${./gcc-wrapper.sh} $gccPath/gcj + + optionalString cc.langJava or false '' + wrap gcj ${./cc-wrapper.sh} $ccPath/gcj '' - + optionalString gcc.langGo or false '' - wrap gccgo ${./gcc-wrapper.sh} $gccPath/gccgo + + optionalString cc.langGo or false '' + wrap ccgo ${./cc-wrapper.sh} $ccPath/gccgo '' - + optionalString gcc.langAda or false '' - wrap gnatgcc ${./gcc-wrapper.sh} $gccPath/gnatgcc - wrap gnatmake ${./gnat-wrapper.sh} $gccPath/gnatmake - wrap gnatbind ${./gnat-wrapper.sh} $gccPath/gnatbind - wrap gnatlink ${./gnatlink-wrapper.sh} $gccPath/gnatlink + + optionalString cc.langAda or false '' + wrap gnatgcc ${./cc-wrapper.sh} $ccPath/gnatgcc + wrap gnatmake ${./gnat-wrapper.sh} $ccPath/gnatmake + wrap gnatbind ${./gnat-wrapper.sh} $ccPath/gnatbind + wrap gnatlink ${./gnatlink-wrapper.sh} $ccPath/gnatlink '' - + optionalString gcc.langVhdl or false '' - ln -s $gccPath/ghdl $out/bin/ghdl + + optionalString cc.langVhdl or false '' + ln -s $ccPath/ghdl $out/bin/ghdl '' + '' substituteAll ${./setup-hook.sh} $out/nix-support/setup-hook substituteAll ${./add-flags} $out/nix-support/add-flags.sh cp -p ${./utils.sh} $out/nix-support/utils.sh - - if [ -e $out/bin/clang ]; then - echo 'export CC; : ''${CC:=clang}' >> $out/nix-support/setup-hook - fi - - if [ -e $out/bin/clang++ ]; then - echo 'export CXX; : ''${CXX:=clang++}' >> $out/nix-support/setup-hook - fi ''; # The dynamic linker has different names on different Linux platforms. @@ -229,7 +229,7 @@ stdenv.mkDerivation { libc = stdenv.ccCross.libc; coreutils = coreutils.crossDrv; binutils = binutils.crossDrv; - gcc = gcc.crossDrv; + cc = cc.crossDrv; # # This is not the best way to do this. I think the reference should be # the style in the gcc-cross-wrapper, but to keep a stable stdenv now I @@ -242,10 +242,10 @@ stdenv.mkDerivation { }; meta = - let gcc_ = if gcc != null then gcc else {}; in - (if gcc_ ? meta then removeAttrs gcc.meta ["priority"] else {}) // + let cc_ = if cc != null then cc else {}; in + (if cc_ ? meta then removeAttrs cc.meta ["priority"] else {}) // { description = - stdenv.lib.attrByPath ["meta" "description"] "System C compiler" gcc_ + stdenv.lib.attrByPath ["meta" "description"] "System C compiler" cc_ + " (wrapper script)"; }; } diff --git a/pkgs/build-support/gcc-wrapper/gnat-wrapper.sh b/pkgs/build-support/cc-wrapper/gnat-wrapper.sh similarity index 100% rename from pkgs/build-support/gcc-wrapper/gnat-wrapper.sh rename to pkgs/build-support/cc-wrapper/gnat-wrapper.sh diff --git a/pkgs/build-support/gcc-wrapper/gnatlink-wrapper.sh b/pkgs/build-support/cc-wrapper/gnatlink-wrapper.sh similarity index 100% rename from pkgs/build-support/gcc-wrapper/gnatlink-wrapper.sh rename to pkgs/build-support/cc-wrapper/gnatlink-wrapper.sh diff --git a/pkgs/build-support/gcc-wrapper/ld-solaris-wrapper.sh b/pkgs/build-support/cc-wrapper/ld-solaris-wrapper.sh similarity index 100% rename from pkgs/build-support/gcc-wrapper/ld-solaris-wrapper.sh rename to pkgs/build-support/cc-wrapper/ld-solaris-wrapper.sh diff --git a/pkgs/build-support/gcc-wrapper/ld-wrapper.sh b/pkgs/build-support/cc-wrapper/ld-wrapper.sh similarity index 100% rename from pkgs/build-support/gcc-wrapper/ld-wrapper.sh rename to pkgs/build-support/cc-wrapper/ld-wrapper.sh diff --git a/pkgs/build-support/gcc-wrapper/setup-hook.sh b/pkgs/build-support/cc-wrapper/setup-hook.sh similarity index 91% rename from pkgs/build-support/gcc-wrapper/setup-hook.sh rename to pkgs/build-support/cc-wrapper/setup-hook.sh index f0034fee1bed..218899e9d8fc 100644 --- a/pkgs/build-support/gcc-wrapper/setup-hook.sh +++ b/pkgs/build-support/cc-wrapper/setup-hook.sh @@ -18,8 +18,8 @@ envHooks+=(addCVars) # Note: these come *after* $out in the PATH (see setup.sh). -if [ -n "@gcc@" ]; then - addToSearchPath PATH @gcc@/bin +if [ -n "@cc@" ]; then + addToSearchPath PATH @cc@/bin fi if [ -n "@binutils@" ]; then diff --git a/pkgs/build-support/gcc-wrapper/utils.sh b/pkgs/build-support/cc-wrapper/utils.sh similarity index 100% rename from pkgs/build-support/gcc-wrapper/utils.sh rename to pkgs/build-support/cc-wrapper/utils.sh diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix index 6d8ca55a0fcd..282d59d590a6 100644 --- a/pkgs/stdenv/adapters.nix +++ b/pkgs/stdenv/adapters.nix @@ -8,7 +8,7 @@ rec { # Override the compiler in stdenv for specific packages. - overrideGCC = stdenv: gcc: stdenv.override { allowedRequisites = null; cc = gcc; }; + overrideCC = stdenv: cc: stdenv.override { allowedRequisites = null; cc = cc; }; # Add some arbitrary packages to buildInputs for specific packages. diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index e7ee53178c77..15895956fd0f 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -18,13 +18,13 @@ import ../generic rec { system = stdenv.system; - cc = import ../../build-support/gcc-wrapper { + cc = import ../../build-support/cc-wrapper { nativeTools = false; nativeLibc = true; inherit stdenv; extraPackages = stdenv.lib.optional haveLibCxx pkgs.libcxx; binutils = import ../../build-support/native-darwin-cctools-wrapper {inherit stdenv;}; - gcc = if useClang33 then pkgs.clang_33.gcc else pkgs.clang.gcc; + cc = if useClang33 then pkgs.clang_33.cc else pkgs.clang.cc; coreutils = pkgs.coreutils; shell = pkgs.bash + "/bin/sh"; }; diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index 6f35d5fc0c80..63b4c802c892 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -85,10 +85,10 @@ rec { cc = if isNull gccPlain then "/no-such-path" - else lib.makeOverridable (import ../../build-support/gcc-wrapper) { + else lib.makeOverridable (import ../../build-support/cc-wrapper) { nativeTools = false; nativeLibc = false; - gcc = gccPlain; + cc = gccPlain; libc = glibc; inherit binutils coreutils; name = name; @@ -209,7 +209,7 @@ rec { mpc = pkgs.mpc.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; }; isl = pkgs.isl.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; }; cloog = pkgs.cloog.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; }; - gccPlain = pkgs.gcc.gcc; + gccPlain = pkgs.gcc.cc; }; extraBuildInputs = [ stage2.pkgs.patchelf stage2.pkgs.paxctl ]; }; @@ -229,10 +229,10 @@ rec { # other purposes (binutils and top-level pkgs) too. inherit (stage3.pkgs) gettext gnum4 gmp perl glibc zlib linuxHeaders; - gcc = lib.makeOverridable (import ../../build-support/gcc-wrapper) { + gcc = lib.makeOverridable (import ../../build-support/cc-wrapper) { nativeTools = false; nativeLibc = false; - gcc = stage4.stdenv.cc.gcc; + cc = stage4.stdenv.cc.cc; libc = stage4.pkgs.glibc; inherit (stage4.pkgs) binutils coreutils; name = ""; diff --git a/pkgs/stdenv/native/default.nix b/pkgs/stdenv/native/default.nix index 45c8ebb70213..925b90c964f2 100644 --- a/pkgs/stdenv/native/default.nix +++ b/pkgs/stdenv/native/default.nix @@ -98,8 +98,8 @@ rec { }; - cc = import ../../build-support/gcc-wrapper { - name = "gcc-native"; + cc = import ../../build-support/cc-wrapper { + name = "cc-native"; nativeTools = true; nativeLibc = true; nativePrefix = if system == "i686-solaris" then "/usr/gnu" else if system == "x86_64-solaris" then "/opt/local/gcc47" else "/usr"; diff --git a/pkgs/stdenv/nix/default.nix b/pkgs/stdenv/nix/default.nix index 476e0eae3970..79c9fb3a1378 100644 --- a/pkgs/stdenv/nix/default.nix +++ b/pkgs/stdenv/nix/default.nix @@ -13,13 +13,13 @@ import ../generic rec { system = stdenv.system; - gcc = import ../../build-support/gcc-wrapper { + cc = import ../../build-support/cc-wrapper { nativeTools = false; nativePrefix = stdenv.lib.optionalString stdenv.isSunOS "/usr"; nativeLibc = true; inherit stdenv; binutils = pkgs.binutils; - gcc = pkgs.gcc.gcc; + cc = pkgs.gcc.cc; coreutils = pkgs.coreutils; shell = pkgs.bash + "/bin/sh"; }; @@ -29,8 +29,8 @@ import ../generic rec { fetchurlBoot = stdenv.fetchurlBoot; overrides = pkgs_: { - inherit gcc; - inherit (gcc) binutils; + inherit cc; + inherit (cc) binutils; inherit (pkgs) gzip bzip2 xz bash coreutils diffutils findutils gawk gnumake gnused gnutar gnugrep gnupatch perl; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d0cb0c8901ca..78f7e0bbabef 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -239,7 +239,7 @@ let # just the plain stdenv. stdenv_32bit = lowPrio ( if system == "x86_64-linux" then - overrideGCC stdenv gcc48_multi + overrideCC stdenv gcc48_multi else stdenv); @@ -2624,7 +2624,7 @@ let torbutton = callPackage ../tools/security/torbutton { }; torbrowser = callPackage ../tools/security/tor/torbrowser.nix { - stdenv = overrideGCC stdenv gcc49; + stdenv = overrideCC stdenv gcc49; }; torsocks = callPackage ../tools/security/tor/torsocks.nix { }; @@ -3046,10 +3046,10 @@ let ccl = callPackage ../development/compilers/ccl { }; - clang = wrapGCC llvmPackages.clang; + clang = wrapCC llvmPackages.clang; - clang_34 = wrapGCC llvmPackages_34.clang; - clang_33 = wrapGCC (clangUnwrapped llvm_33 ../development/compilers/llvm/3.3/clang.nix); + clang_34 = wrapCC llvmPackages_34.clang; + clang_33 = wrapCC (clangUnwrapped llvm_33 ../development/compilers/llvm/3.3/clang.nix); clangAnalyzer = callPackage ../development/tools/analysis/clang-analyzer { clang = clang_34; @@ -3062,8 +3062,8 @@ let clangSelf = clangWrapSelf llvmPackagesSelf.clang; - clangWrapSelf = build: (import ../build-support/gcc-wrapper) { - gcc = build; + clangWrapSelf = build: (import ../build-support/cc-wrapper) { + cc = build; stdenv = clangStdenv; libc = glibc; binutils = binutils; @@ -3074,8 +3074,8 @@ let }; #Use this instead of stdenv to build with clang - clangStdenv = if stdenv.isDarwin then stdenv else lowPrio (stdenvAdapters.overrideGCC stdenv clang); - libcxxStdenv = stdenvAdapters.overrideGCC stdenv (clangWrapSelf llvmPackages.clang); + clangStdenv = if stdenv.isDarwin then stdenv else lowPrio (stdenvAdapters.overrideCC stdenv clang); + libcxxStdenv = stdenvAdapters.overrideCC stdenv (clangWrapSelf llvmPackages.clang); clean = callPackage ../development/compilers/clean { }; @@ -3115,7 +3115,7 @@ let gccApple = throw "gccApple is no longer supported"; - gcc34 = wrapGCC (import ../development/compilers/gcc/3.4 { + gcc34 = wrapCC (import ../development/compilers/gcc/3.4 { inherit fetchurl stdenv noSysDirs; }); @@ -3177,14 +3177,14 @@ let cross = assert crossSystem != null; crossSystem; }; - gcc44 = lowPrio (wrapGCC (makeOverridable (import ../development/compilers/gcc/4.4) { + gcc44 = lowPrio (wrapCC (makeOverridable (import ../development/compilers/gcc/4.4) { inherit fetchurl stdenv gmp mpfr /* ppl cloogppl */ gettext which noSysDirs; texinfo = texinfo4; profiledCompiler = true; })); - gcc45 = lowPrio (wrapGCC (callPackage ../development/compilers/gcc/4.5 { + gcc45 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/4.5 { inherit fetchurl stdenv gmp mpfr mpc libelf zlib perl gettext which noSysDirs; texinfo = texinfo4; @@ -3207,7 +3207,7 @@ let else null; })); - gcc46 = lowPrio (wrapGCC (callPackage ../development/compilers/gcc/4.6 { + gcc46 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/4.6 { inherit noSysDirs; ppl = null; @@ -3229,7 +3229,7 @@ let texinfo = texinfo413; })); - gcc48 = lowPrio (wrapGCC (callPackage ../development/compilers/gcc/4.8 { + gcc48 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/4.8 { inherit noSysDirs; # PGO seems to speed up compilation by gcc by ~10%, see #445 discussion @@ -3248,14 +3248,14 @@ let gcc48_multi = if system == "x86_64-linux" then lowPrio ( - wrapGCCWith (import ../build-support/gcc-wrapper) glibc_multi (gcc48.gcc.override { - stdenv = overrideGCC stdenv (wrapGCCWith (import ../build-support/gcc-wrapper) glibc_multi gcc.gcc); + wrapCCWith (import ../build-support/cc-wrapper) glibc_multi (gcc48.gcc.override { + stdenv = overrideCC stdenv (wrapCCWith (import ../build-support/cc-wrapper) glibc_multi gcc.gcc); profiledCompiler = false; enableMultilib = true; })) else throw "Multilib gcc not supported on ‘${system}’"; - gcc48_debug = lowPrio (wrapGCC (callPackage ../development/compilers/gcc/4.8 { + gcc48_debug = lowPrio (wrapCC (callPackage ../development/compilers/gcc/4.8 { stripped = false; inherit noSysDirs; @@ -3264,7 +3264,7 @@ let binutilsCross = null; })); - gcc49 = lowPrio (wrapGCC (callPackage ../development/compilers/gcc/4.9 { + gcc49 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/4.9 { inherit noSysDirs; # PGO seems to speed up compilation by gcc by ~10%, see #445 discussion @@ -3283,7 +3283,7 @@ let gfortran = gfortran48; - gfortran48 = wrapGCC (gcc48.gcc.override { + gfortran48 = wrapCC (gcc48.cc.override { name = "gfortran"; langFortran = true; langCC = false; @@ -3293,7 +3293,7 @@ let gcj = gcj48; - gcj48 = wrapGCC (gcc48.gcc.override { + gcj48 = wrapCC (gcc48.cc.override { name = "gcj"; langJava = true; langFortran = false; @@ -3309,7 +3309,7 @@ let gnat = gnat45; # failed to make 4.6 or 4.8 build - gnat45 = wrapGCC (gcc45.gcc.override { + gnat45 = wrapCC (gcc45.cc.override { name = "gnat"; langCC = false; langC = true; @@ -3328,14 +3328,14 @@ let gccgo = gccgo48; - gccgo48 = wrapGCC (gcc48.gcc.override { + gccgo48 = wrapCC (gcc48.cc.override { name = "gccgo"; langCC = true; #required for go. langC = true; langGo = true; }); - ghdl = wrapGCC (import ../development/compilers/gcc/4.3 { + ghdl = wrapCC (import ../development/compilers/gcc/4.3 { inherit stdenv fetchurl gmp mpfr noSysDirs gnat; texinfo = texinfo4; name = "ghdl"; @@ -4020,7 +4020,18 @@ let win32hello = callPackage ../development/compilers/visual-c++/test { }; - wrapGCCWith = gccWrapper: glibc: baseGCC: gccWrapper { + wrapCCWith = ccWrapper: libc: baseCC: ccWrapper { + nativeTools = stdenv.cc.nativeTools or false; + nativeLibc = stdenv.cc.nativeLibc or false; + nativePrefix = stdenv.cc.nativePrefix or ""; + cc = baseCC; + libc = libc; + inherit stdenv binutils coreutils zlib; + }; + + wrapCC = wrapCCWith (makeOverridable (import ../build-support/cc-wrapper)) glibc; + # legacy version, used for gnat bootstrapping + wrapGCC-old = baseGCC: (makeOverridable (import ../build-support/gcc-wrapper-old)) { nativeTools = stdenv.cc.nativeTools or false; nativeLibc = stdenv.cc.nativeLibc or false; nativePrefix = stdenv.cc.nativePrefix or ""; @@ -4029,10 +4040,6 @@ let inherit stdenv binutils coreutils zlib; }; - wrapGCC = wrapGCCWith (makeOverridable (import ../build-support/gcc-wrapper)) glibc; - # legacy version, used for gnat bootstrapping - wrapGCC-old = wrapGCCWith (makeOverridable (import ../build-support/gcc-wrapper-old)) glibc; - wrapGCCCross = {gcc, libc, binutils, cross, shell ? "", name ? "gcc-cross-wrapper"}: @@ -4361,7 +4368,7 @@ let avrgcclibc = callPackage ../development/misc/avr-gcc-with-avr-libc { gcc = gcc46; - stdenv = overrideGCC stdenv gcc46; + stdenv = overrideCC stdenv gcc46; }; avr8burnomat = callPackage ../development/misc/avr8-burn-omat { }; @@ -4517,8 +4524,8 @@ let # }; # ccacheWrapper = makeOverridable ({ extraConfig ? "" }: - wrapGCC (ccache.links extraConfig)) {}; - ccacheStdenv = lowPrio (overrideGCC stdenv ccacheWrapper); + wrapCC (ccache.links extraConfig)) {}; + ccacheStdenv = lowPrio (overrideCC stdenv ccacheWrapper); cccc = callPackage ../development/tools/analysis/cccc { }; @@ -4600,8 +4607,8 @@ let # }; # distccWrapper = makeOverridable ({ extraConfig ? "" }: - wrapGCC (distcc.links extraConfig)) {}; - distccStdenv = lowPrio (overrideGCC stdenv distccWrapper); + wrapCC (distcc.links extraConfig)) {}; + distccStdenv = lowPrio (overrideCC stdenv distccWrapper); distccMasquerade = if stdenv.isDarwin then null @@ -4772,7 +4779,7 @@ let phantomjs = callPackage ../development/tools/phantomjs { stdenv = if stdenv.isDarwin - then overrideGCC stdenv gccApple + then overrideCC stdenv gccApple else stdenv; }; @@ -4925,7 +4932,7 @@ let # On Darwin, Valgrind 3.7.0 expects Apple's GCC (for # `__private_extern'.) if stdenv.isDarwin - then overrideGCC stdenv gccApple + then overrideCC stdenv gccApple else stdenv; }; @@ -5243,7 +5250,7 @@ let vpxSupport = !stdenv.isMips; stdenv = if stdenv.isDarwin - then overrideGCC stdenv gccApple + then overrideCC stdenv gccApple else stdenv; }; @@ -6141,7 +6148,7 @@ let libmikmod = callPackage ../development/libraries/libmikmod { # resolve the "stray '@' in program" errors stdenv = if stdenv.isDarwin - then overrideGCC stdenv gccApple + then overrideCC stdenv gccApple else stdenv; }; @@ -6250,7 +6257,7 @@ let libproxy = callPackage ../development/libraries/libproxy { stdenv = if stdenv.isDarwin - then overrideGCC stdenv gcc + then overrideCC stdenv gcc else stdenv; }; @@ -7072,7 +7079,7 @@ let stfl = callPackage ../development/libraries/stfl { stdenv = if stdenv.isDarwin - then overrideGCC stdenv gccApple + then overrideCC stdenv gccApple else stdenv; }; @@ -10213,7 +10220,7 @@ let irssi = callPackage ../applications/networking/irc/irssi { # compile with gccApple on darwin to support the -no-cpp-precompile flag stdenv = if stdenv.isDarwin - then stdenvAdapters.overrideGCC stdenv gccApple + then stdenvAdapters.overrideCC stdenv gccApple else stdenv; }; @@ -11542,7 +11549,7 @@ let xdotool = callPackage ../tools/X11/xdotool { }; xen = callPackage ../applications/virtualization/xen { - stdenv = overrideGCC stdenv gcc45; + stdenv = overrideCC stdenv gcc45; }; xfe = callPackage ../applications/misc/xfe { @@ -11661,7 +11668,7 @@ let (let callPackage = newScope pkgs.zathuraCollection; in import ../applications/misc/zathura { inherit callPackage pkgs fetchurl; - stdenv = overrideGCC stdenv gcc49; + stdenv = overrideCC stdenv gcc49; useMupdf = config.zathura.useMupdf or false; }); @@ -11673,7 +11680,7 @@ let girara = callPackage ../applications/misc/girara { gtk = gtk3; - stdenv = overrideGCC stdenv gcc49; + stdenv = overrideCC stdenv gcc49; }; girara-light = callPackage ../applications/misc/girara { From 16fe4be790f541d68c01897640fda11f9673b8e9 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Tue, 13 Jan 2015 10:00:42 -0500 Subject: [PATCH 16/29] Add isGNU attribute to gccs --- pkgs/development/compilers/gcc/4.8/default.nix | 2 +- pkgs/development/libraries/glibc/default.nix | 2 +- pkgs/stdenv/linux/default.nix | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index a0845b88681b..0fff83fca31f 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -487,7 +487,7 @@ stdenv.mkDerivation ({ else null; passthru = - { inherit langC langCC langObjC langObjCpp langAda langFortran langVhdl langGo version; }; + { inherit langC langCC langObjC langObjCpp langAda langFortran langVhdl langGo version; isGNU = true; }; inherit enableParallelBuilding enableMultilib; diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index 3273b89c84ea..dcd7acf9b854 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -8,7 +8,7 @@ , withGd ? false, gd ? null, libpng ? null }: -assert stdenv.cc ? gcc; +assert stdenv.cc.cc.isGNU or false; let build = import ./common.nix; diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index 63b4c802c892..529593bc059a 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -55,6 +55,7 @@ rec { # Needed by the GCC wrapper. langC = true; langCC = true; + isGNU = true; }; From f3c6827373be102caae5dcbadd31e73ed60fa17f Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Wed, 14 Jan 2015 20:25:26 -0800 Subject: [PATCH 17/29] rename all occurrences of stdenv.cc.gcc to stdenv.cc.cc --- .../audio/google-musicmanager/default.nix | 2 +- pkgs/applications/audio/spotify/default.nix | 4 ++-- pkgs/applications/editors/atom/default.nix | 2 +- pkgs/applications/editors/idea/default.nix | 6 +++--- .../editors/lighttable/default.nix | 4 ++-- pkgs/applications/editors/sublime/default.nix | 2 +- .../applications/editors/sublime3/default.nix | 4 ++-- .../misc/adobe-reader/default.nix | 2 +- .../applications/misc/googleearth/default.nix | 2 +- .../networking/browsers/chromium/plugins.nix | 2 +- .../browsers/firefox-bin/default.nix | 4 ++-- .../google-talk-plugin/default.nix | 8 ++++---- .../networking/browsers/opera/default.nix | 4 ++-- .../instant-messengers/baresip/default.nix | 2 +- .../instant-messengers/fuze/default.nix | 2 +- .../instant-messengers/hipchat/default.nix | 2 +- .../instant-messengers/skype/default.nix | 2 +- .../mailreaders/thunderbird-bin/default.nix | 4 ++-- .../networking/remote/teamviewer/8.nix | 4 ++-- .../networking/remote/teamviewer/9.nix | 4 ++-- .../networking/remote/teamviewer/default.nix | 2 +- .../office/zotero/firefox-bin/default.nix | 4 ++-- .../science/electronics/eagle/default.nix | 2 +- .../science/logic/verifast/default.nix | 4 ++-- pkgs/applications/video/makemkv/default.nix | 4 ++-- .../virtualbox/guest-additions/default.nix | 2 +- pkgs/development/compilers/cryptol/1.8.x.nix | 4 ++-- .../development/compilers/cudatoolkit/5.5.nix | 2 +- .../development/compilers/cudatoolkit/6.0.nix | 2 +- pkgs/development/compilers/gcl/default.nix | 5 ++--- pkgs/development/compilers/julia/0.2.1.nix | 2 +- pkgs/development/compilers/julia/0.3.5.nix | 2 +- pkgs/development/compilers/llvm/3.3/clang.nix | 4 ++-- pkgs/development/compilers/llvm/3.4/clang.nix | 4 ++-- pkgs/development/compilers/mozart/binary.nix | 2 +- .../compilers/oraclejdk/jdk-linux-base.nix | 2 +- pkgs/development/compilers/rustc/0.12.nix | 2 +- pkgs/development/compilers/rustc/head.nix | 2 +- .../guile-modules/guile-lib/default.nix | 4 ++-- .../development/interpreters/dart/default.nix | 4 ++-- pkgs/development/libraries/fmod/default.nix | 2 +- pkgs/development/libraries/glib/default.nix | 2 +- pkgs/development/libraries/glibc/default.nix | 4 ++-- pkgs/development/libraries/libre/default.nix | 2 +- pkgs/development/libraries/librem/default.nix | 2 +- pkgs/development/libraries/v8/default.nix | 4 ++-- pkgs/development/libraries/wtk/default.nix | 2 +- pkgs/development/misc/amdapp-sdk/default.nix | 2 +- .../mobile/androidenv/androidsdk.nix | 6 +++--- pkgs/development/tools/atom-shell/default.nix | 2 +- .../tools/build-managers/cargo/snapshot.nix | 2 +- .../tools/misc/saleae-logic/default.nix | 2 +- .../development/tools/node-webkit/default.nix | 2 +- pkgs/development/tools/phantomjs/default.nix | 2 +- pkgs/games/adom/default.nix | 2 +- pkgs/games/andyetitmoves/default.nix | 2 +- pkgs/games/dwarf-fortress/default.nix | 2 +- pkgs/games/gsb/default.nix | 4 ++-- pkgs/games/megaglest/default.nix | 2 +- pkgs/games/oilrush/default.nix | 20 +++++++++---------- pkgs/games/planetaryannihilation/default.nix | 6 +++--- pkgs/games/quake3/wrapper/default.nix | 2 +- pkgs/games/sdlmame/default.nix | 2 +- pkgs/games/spring/default.nix | 2 +- pkgs/games/tibia/default.nix | 2 +- pkgs/games/ue4demos/default.nix | 2 +- pkgs/games/ultrastardx/default.nix | 2 +- pkgs/games/vessel/default.nix | 2 +- pkgs/games/worldofgoo/default.nix | 4 ++-- pkgs/misc/drivers/gutenprint/bin.nix | 2 +- pkgs/misc/emulators/wine/stable.nix | 6 +++--- pkgs/misc/emulators/wine/unstable.nix | 6 +++--- .../os-specific/linux/ati-drivers/default.nix | 2 +- pkgs/os-specific/linux/nvidia-x11/default.nix | 4 ++-- .../linux/nvidia-x11/legacy173.nix | 2 +- .../linux/nvidia-x11/legacy304.nix | 2 +- .../linux/nvidia-x11/legacy340.nix | 4 ++-- .../os-specific/linux/ocz-toolbox/default.nix | 2 +- .../linux/opengl/xorg-sys/default.nix | 2 +- pkgs/os-specific/linux/prl-tools/default.nix | 2 +- pkgs/os-specific/linux/systemd/default.nix | 2 +- pkgs/servers/nosql/influxdb/default.nix | 2 +- pkgs/servers/restund/default.nix | 2 +- pkgs/tools/admin/tightvnc/default.nix | 2 +- .../tools/filesystems/yandex-disk/default.nix | 4 ++-- pkgs/tools/graphics/cuneiform/default.nix | 2 +- pkgs/tools/misc/megacli/default.nix | 4 ++-- pkgs/tools/networking/atftp/default.nix | 4 ++-- pkgs/tools/security/tor/torbrowser.nix | 2 +- 89 files changed, 137 insertions(+), 138 deletions(-) diff --git a/pkgs/applications/audio/google-musicmanager/default.nix b/pkgs/applications/audio/google-musicmanager/default.nix index f50d294f6761..8668b0e4f9de 100644 --- a/pkgs/applications/audio/google-musicmanager/default.nix +++ b/pkgs/applications/audio/google-musicmanager/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { buildPhase = '' patchelf \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "$out/opt/google/musicmanager:${readline}/lib:${ncurses}/lib:${stdenv.cc.libc}/lib:${qt48}/lib:${stdenv.cc.gcc}/lib:${libidn}/lib:${expat}/lib:${flac}/lib:${libvorbis}/lib" opt/google/musicmanager/MusicManager + --set-rpath "$out/opt/google/musicmanager:${readline}/lib:${ncurses}/lib:${stdenv.cc.libc}/lib:${qt48}/lib:${stdenv.cc.cc}/lib:${libidn}/lib:${expat}/lib:${flac}/lib:${libvorbis}/lib" opt/google/musicmanager/MusicManager ''; dontPatchELF = true; diff --git a/pkgs/applications/audio/spotify/default.nix b/pkgs/applications/audio/spotify/default.nix index 08ce9093dd54..9d3e61395e74 100644 --- a/pkgs/applications/audio/spotify/default.nix +++ b/pkgs/applications/audio/spotify/default.nix @@ -45,7 +45,7 @@ let pango qt4 sqlite - stdenv.cc.gcc + stdenv.cc.cc xlibs.libX11 xlibs.libXcomposite xlibs.libXdamage @@ -113,7 +113,7 @@ stdenv.mkDerivation { mkdir -p $out/bin - rpath="$out/spotify-client/Data:$out/lib:$out/spotify-client:${stdenv.cc.gcc}/lib64" + rpath="$out/spotify-client/Data:$out/lib:$out/spotify-client:${stdenv.cc.cc}/lib64" ln -s $out/spotify-client/spotify $out/bin/spotify diff --git a/pkgs/applications/editors/atom/default.nix b/pkgs/applications/editors/atom/default.nix index f441d65aef91..0c0ddc3158ab 100644 --- a/pkgs/applications/editors/atom/default.nix +++ b/pkgs/applications/editors/atom/default.nix @@ -7,7 +7,7 @@ let atomEnv = buildEnv { name = "env-atom"; paths = [ - stdenv.cc.gcc zlib glib dbus gtk atk pango freetype libgnome_keyring3 + stdenv.cc.cc zlib glib dbus gtk atk pango freetype libgnome_keyring3 fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gconf nss xlibs.libXrender xlibs.libX11 xlibs.libXext xlibs.libXdamage xlibs.libXtst xlibs.libXcomposite xlibs.libXi xlibs.libXfixes xlibs.libXrandr diff --git a/pkgs/applications/editors/idea/default.nix b/pkgs/applications/editors/idea/default.nix index e53292451d32..935de30b81ce 100644 --- a/pkgs/applications/editors/idea/default.nix +++ b/pkgs/applications/editors/idea/default.nix @@ -56,9 +56,9 @@ let snappyPath="lib/snappy-java-1.0.5" 7z x -o"$snappyPath" "$snappyPath.jar" if [ "${stdenv.system}" == "x86_64-linux" ]; then - patchelf --set-rpath ${stdenv.cc.gcc}/lib64 "$snappyPath/org/xerial/snappy/native/Linux/amd64/libsnappyjava.so" + patchelf --set-rpath ${stdenv.cc.cc}/lib64 "$snappyPath/org/xerial/snappy/native/Linux/amd64/libsnappyjava.so" else - patchelf --set-rpath ${stdenv.cc.gcc}/lib "$snappyPath/org/xerial/snappy/native/Linux/i386/libsnappyjava.so" + patchelf --set-rpath ${stdenv.cc.cc}/lib "$snappyPath/org/xerial/snappy/native/Linux/i386/libsnappyjava.so" fi 7z a -tzip "$snappyPath.jar" ./"$snappyPath"/* rm -vr "$snappyPath" @@ -74,7 +74,7 @@ let makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${loName}" \ --prefix PATH : "${jdk}/bin:${coreutils}/bin:${gnugrep}/bin:${which}/bin:${git}/bin" \ - --prefix LD_RUN_PATH : "${stdenv.cc.gcc}/lib/" \ + --prefix LD_RUN_PATH : "${stdenv.cc.cc}/lib/" \ --prefix JDK_HOME : "$jdk" \ --prefix ${hiName}_JDK : "$jdk" diff --git a/pkgs/applications/editors/lighttable/default.nix b/pkgs/applications/editors/lighttable/default.nix index f66540abaa69..852af584e901 100644 --- a/pkgs/applications/editors/lighttable/default.nix +++ b/pkgs/applications/editors/lighttable/default.nix @@ -5,7 +5,7 @@ let libPath = stdenv.lib.makeLibraryPath [ - stdenv.cc.gcc zlib glib dbus gtk atk pango freetype libgnome_keyring3 nss + stdenv.cc.cc zlib glib dbus gtk atk pango freetype libgnome_keyring3 nss fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gnome3.gconf xlibs.libXrender xlibs.libX11 xlibs.libXext xlibs.libXdamage xlibs.libXtst xlibs.libXcomposite xlibs.libXi xlibs.libXfixes @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { patchelf \ --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath ${libPath}:${stdenv.cc.gcc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \ + --set-rpath ${libPath}:${stdenv.cc.cc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \ $out/LightTable/ltbin ln -s ${udev}/lib/libudev.so.1 $out/LightTable/libudev.so.0 diff --git a/pkgs/applications/editors/sublime/default.nix b/pkgs/applications/editors/sublime/default.nix index d51562b0213a..ffa1c4eed34b 100644 --- a/pkgs/applications/editors/sublime/default.nix +++ b/pkgs/applications/editors/sublime/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { echo ${libPath} patchelf \ --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath ${libPath}:${stdenv.cc.gcc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \ + --set-rpath ${libPath}:${stdenv.cc.cc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \ $out/sublime/sublime_text ''; diff --git a/pkgs/applications/editors/sublime3/default.nix b/pkgs/applications/editors/sublime3/default.nix index 3864f48738ac..dbfb98b087f9 100644 --- a/pkgs/applications/editors/sublime3/default.nix +++ b/pkgs/applications/editors/sublime3/default.nix @@ -32,7 +32,7 @@ in let for i in sublime_text plugin_host crash_reporter; do patchelf \ --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath ${libPath}:${stdenv.cc.gcc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \ + --set-rpath ${libPath}:${stdenv.cc.cc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \ $i done ''; @@ -41,7 +41,7 @@ in let mkdir -p $out cp -prvd * $out/ # Without this, plugin_host crashes, even though it has the rpath - wrapProgram $out/plugin_host --prefix LD_PRELOAD : ${stdenv.cc.gcc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"}/libgcc_s.so.1:${openssl}/lib/libssl.so:${bzip2}/lib/libbz2.so + wrapProgram $out/plugin_host --prefix LD_PRELOAD : ${stdenv.cc.cc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"}/libgcc_s.so.1:${openssl}/lib/libssl.so:${bzip2}/lib/libbz2.so ''; }; in stdenv.mkDerivation { diff --git a/pkgs/applications/misc/adobe-reader/default.nix b/pkgs/applications/misc/adobe-reader/default.nix index 07f8ba1d6273..6bb16a02402c 100644 --- a/pkgs/applications/misc/adobe-reader/default.nix +++ b/pkgs/applications/misc/adobe-reader/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation { # versions. libPath = stdenv.lib.makeLibraryPath - [ stdenv.cc.gcc libX11 zlib libxml2 cups pango atk gtk glib gdk_pixbuf ]; + [ stdenv.cc.cc libX11 zlib libxml2 cups pango atk gtk glib gdk_pixbuf ]; meta = { description = "Adobe Reader, a viewer for PDF documents"; diff --git a/pkgs/applications/misc/googleearth/default.nix b/pkgs/applications/misc/googleearth/default.nix index 48db5eb07b22..1e6caa93b2d3 100644 --- a/pkgs/applications/misc/googleearth/default.nix +++ b/pkgs/applications/misc/googleearth/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ glibc glib - stdenv.cc.gcc + stdenv.cc.cc libSM libICE libXi diff --git a/pkgs/applications/networking/browsers/chromium/plugins.nix b/pkgs/applications/networking/browsers/chromium/plugins.nix index 8e2dd2a48869..30fa4c39a4e6 100644 --- a/pkgs/applications/networking/browsers/chromium/plugins.nix +++ b/pkgs/applications/networking/browsers/chromium/plugins.nix @@ -35,7 +35,7 @@ let ''; patchPhase = let - rpaths = [ stdenv.cc.gcc ]; + rpaths = [ stdenv.cc.cc ]; mkrpath = p: "${makeSearchPath "lib64" p}:${makeSearchPath "lib" p}"; in '' for sofile in PepperFlash/libpepflashplayer.so \ diff --git a/pkgs/applications/networking/browsers/firefox-bin/default.nix b/pkgs/applications/networking/browsers/firefox-bin/default.nix index c9956497b109..0018f00a3662 100644 --- a/pkgs/applications/networking/browsers/firefox-bin/default.nix +++ b/pkgs/applications/networking/browsers/firefox-bin/default.nix @@ -70,7 +70,7 @@ stdenv.mkDerivation { phases = "unpackPhase installPhase"; libPath = stdenv.lib.makeLibraryPath - [ stdenv.cc.gcc + [ stdenv.cc.cc alsaLib atk cairo @@ -106,7 +106,7 @@ stdenv.mkDerivation { pulseaudio systemd ] + ":" + stdenv.lib.makeSearchPath "lib64" [ - stdenv.cc.gcc + stdenv.cc.cc ]; # "strip" after "patchelf" may break binaries. diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix index 826f35fa839d..bdccb932e1c3 100644 --- a/pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix +++ b/pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix @@ -32,7 +32,7 @@ let xorg.libXfixes xorg.libXrender xorg.libXrandr - stdenv.cc.gcc + stdenv.cc.cc alsaLib pulseaudio dbus_glib @@ -76,11 +76,11 @@ stdenv.mkDerivation rec { cp opt/google/talkplugin/*.so $plugins for i in libnpgoogletalk.so libppgoogletalk.so libppo1d.so; do - patchelf --set-rpath "${makeLibraryPath [ stdenv.cc.gcc xorg.libX11 ]}:${stdenv.cc.gcc}/lib64" $plugins/$i + patchelf --set-rpath "${makeLibraryPath [ stdenv.cc.cc xorg.libX11 ]}:${stdenv.cc.cc}/lib64" $plugins/$i done for i in libgoogletalkremoting.so libnpo1d.so; do - patchelf --set-rpath "$out/libexec/google/talkplugin/lib:${rpathPlugin}:${stdenv.cc.gcc}/lib64" $plugins/$i + patchelf --set-rpath "$out/libexec/google/talkplugin/lib:${rpathPlugin}:${stdenv.cc.cc}/lib64" $plugins/$i done mkdir -p $out/libexec/google/talkplugin @@ -88,7 +88,7 @@ stdenv.mkDerivation rec { patchelf \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "${rpathProgram}:${stdenv.cc.gcc}/lib64" \ + --set-rpath "${rpathProgram}:${stdenv.cc.cc}/lib64" \ $out/libexec/google/talkplugin/GoogleTalkPlugin # Generate an LD_PRELOAD wrapper to redirect execvp() calls to diff --git a/pkgs/applications/networking/browsers/opera/default.nix b/pkgs/applications/networking/browsers/opera/default.nix index eefae9d5dae8..bcd86a2fb30d 100644 --- a/pkgs/applications/networking/browsers/opera/default.nix +++ b/pkgs/applications/networking/browsers/opera/default.nix @@ -6,7 +6,7 @@ , kdeSupport ? false, qt4, kdelibs }: -assert stdenv.isLinux && stdenv.cc.gcc != null && stdenv.cc.libc != null; +assert stdenv.isLinux && stdenv.cc.cc.isGNU or false && stdenv.cc.libc != null; let mirror = http://get.geo.opera.com/pub/opera; @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { ''; buildInputs = - [ stdenv.cc.gcc stdenv.cc.libc zlib libX11 libXt libXext libSM libICE + [ stdenv.cc.cc stdenv.cc.libc zlib libX11 libXt libXext libSM libICE libXft freetype fontconfig libXrender libuuid expat gstreamer libxml2 gst_plugins_base ] diff --git a/pkgs/applications/networking/instant-messengers/baresip/default.nix b/pkgs/applications/networking/instant-messengers/baresip/default.nix index e759b3f88060..db24670d9699 100644 --- a/pkgs/applications/networking/instant-messengers/baresip/default.nix +++ b/pkgs/applications/networking/instant-messengers/baresip/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { "USE_BV32=" "USE_COREAUDIO=" "USE_G711=" "USE_G722=" "USE_G722_1=" "USE_ILBC=" "USE_OPUS=" "USE_SILK=" ] - ++ stdenv.lib.optional (stdenv.cc.gcc != null) "SYSROOT_ALT=${stdenv.cc.gcc}" + ++ stdenv.lib.optional (stdenv.cc.cc != null) "SYSROOT_ALT=${stdenv.cc.cc}" ++ stdenv.lib.optional (stdenv.cc.libc != null) "SYSROOT=${stdenv.cc.libc}" ; NIX_CFLAGS_COMPILE='' -I${librem}/include/rem -I${gsm}/include/gsm ''; diff --git a/pkgs/applications/networking/instant-messengers/fuze/default.nix b/pkgs/applications/networking/instant-messengers/fuze/default.nix index 083299b3dc52..bc9246d8845c 100644 --- a/pkgs/applications/networking/instant-messengers/fuze/default.nix +++ b/pkgs/applications/networking/instant-messengers/fuze/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation { libPath = stdenv.lib.makeLibraryPath [ openssl alsaLib libXext libXfixes libXrandr libjpeg curl_custom - libX11 libXmu libXv qt4 libXtst mesa stdenv.cc.gcc zlib + libX11 libXmu libXv qt4 libXtst mesa stdenv.cc.cc zlib gnome.GConf libidn rtmpdump c-ares openldap ]; buildCommand = '' diff --git a/pkgs/applications/networking/instant-messengers/hipchat/default.nix b/pkgs/applications/networking/instant-messengers/hipchat/default.nix index c2c69b0e2fbe..b9f9667ad3b6 100644 --- a/pkgs/applications/networking/instant-messengers/hipchat/default.nix +++ b/pkgs/applications/networking/instant-messengers/hipchat/default.nix @@ -41,7 +41,7 @@ let xz libcanberra xcbutilkeysyms - ] + ":${stdenv.cc.gcc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"}"; + ] + ":${stdenv.cc.cc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"}"; src = if stdenv.system == "x86_64-linux" then diff --git a/pkgs/applications/networking/instant-messengers/skype/default.nix b/pkgs/applications/networking/instant-messengers/skype/default.nix index a1ec302a3481..218e7303807b 100644 --- a/pkgs/applications/networking/instant-messengers/skype/default.nix +++ b/pkgs/applications/networking/instant-messengers/skype/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { buildInputs = [ stdenv.glibc - stdenv.cc.gcc + stdenv.cc.cc libXv libXext libX11 diff --git a/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix b/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix index e2dbb6dbc2f8..be276a4cfa28 100644 --- a/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix +++ b/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix @@ -67,7 +67,7 @@ stdenv.mkDerivation { phases = "unpackPhase installPhase"; libPath = stdenv.lib.makeLibraryPath - [ stdenv.cc.gcc + [ stdenv.cc.cc gconf alsaLib at_spi2_atk @@ -100,7 +100,7 @@ stdenv.mkDerivation { nss pango ] + ":" + stdenv.lib.makeSearchPath "lib64" [ - stdenv.cc.gcc + stdenv.cc.cc ]; installPhase = diff --git a/pkgs/applications/networking/remote/teamviewer/8.nix b/pkgs/applications/networking/remote/teamviewer/8.nix index ba5cc85e5a4e..28b272045b7d 100644 --- a/pkgs/applications/networking/remote/teamviewer/8.nix +++ b/pkgs/applications/networking/remote/teamviewer/8.nix @@ -5,7 +5,7 @@ let topath = "${wineUnstable}/bin"; toldpath = stdenv.lib.concatStringsSep ":" (map (x: "${x}/lib") - [ stdenv.cc.gcc libX11 libXtst libXext libXdamage libXfixes wineUnstable ]); + [ stdenv.cc.cc libX11 libXtst libXext libXdamage libXfixes wineUnstable ]); in stdenv.mkDerivation { name = "teamviewer-8.0.17147"; @@ -34,7 +34,7 @@ stdenv.mkDerivation { EOF chmod +x $out/bin/teamviewer - patchelf --set-rpath "${stdenv.cc.gcc}/lib64:${stdenv.cc.gcc}/lib:${libX11}/lib:${libXext}/lib:${libXau}/lib:${libXdamage}/lib:${libXfixes}/lib" $out/share/teamviewer8/tv_bin/teamviewerd + patchelf --set-rpath "${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib:${libX11}/lib:${libXext}/lib:${libXau}/lib:${libXdamage}/lib:${libXfixes}/lib" $out/share/teamviewer8/tv_bin/teamviewerd patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/teamviewer8/tv_bin/teamviewerd ln -s $out/share/teamviewer8/tv_bin/teamviewerd $out/bin/ ''; diff --git a/pkgs/applications/networking/remote/teamviewer/9.nix b/pkgs/applications/networking/remote/teamviewer/9.nix index 4b449497dcc0..9b272a618b53 100644 --- a/pkgs/applications/networking/remote/teamviewer/9.nix +++ b/pkgs/applications/networking/remote/teamviewer/9.nix @@ -5,7 +5,7 @@ let topath = "${wineUnstable}/bin"; toldpath = stdenv.lib.concatStringsSep ":" (map (x: "${x}/lib") - [ stdenv.cc.gcc libX11 libXtst libXext libXdamage libXfixes wineUnstable ]); + [ stdenv.cc.cc libX11 libXtst libXext libXdamage libXfixes wineUnstable ]); in stdenv.mkDerivation { name = "teamviewer-9.0.32150"; @@ -34,7 +34,7 @@ stdenv.mkDerivation { EOF chmod +x $out/bin/teamviewer - patchelf --set-rpath "${stdenv.cc.gcc}/lib64:${stdenv.cc.gcc}/lib:${libX11}/lib:${libXext}/lib:${libXau}/lib:${libXdamage}/lib:${libXfixes}/lib" $out/share/teamviewer9/tv_bin/teamviewerd + patchelf --set-rpath "${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib:${libX11}/lib:${libXext}/lib:${libXau}/lib:${libXdamage}/lib:${libXfixes}/lib" $out/share/teamviewer9/tv_bin/teamviewerd patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/teamviewer9/tv_bin/teamviewerd ln -s $out/share/teamviewer9/tv_bin/teamviewerd $out/bin/ ''; diff --git a/pkgs/applications/networking/remote/teamviewer/default.nix b/pkgs/applications/networking/remote/teamviewer/default.nix index 8e42e8004c54..55a5beb5093f 100644 --- a/pkgs/applications/networking/remote/teamviewer/default.nix +++ b/pkgs/applications/networking/remote/teamviewer/default.nix @@ -6,7 +6,7 @@ let topath = "${wine}/bin"; toldpath = stdenv.lib.concatStringsSep ":" (map (x: "${x}/lib") - [ stdenv.cc.gcc libX11 libXtst libXext libXdamage libXfixes wine ]); + [ stdenv.cc.cc libX11 libXtst libXext libXdamage libXfixes wine ]); in stdenv.mkDerivation { name = "teamviewer-7.0.9377"; diff --git a/pkgs/applications/office/zotero/firefox-bin/default.nix b/pkgs/applications/office/zotero/firefox-bin/default.nix index c9956497b109..0018f00a3662 100644 --- a/pkgs/applications/office/zotero/firefox-bin/default.nix +++ b/pkgs/applications/office/zotero/firefox-bin/default.nix @@ -70,7 +70,7 @@ stdenv.mkDerivation { phases = "unpackPhase installPhase"; libPath = stdenv.lib.makeLibraryPath - [ stdenv.cc.gcc + [ stdenv.cc.cc alsaLib atk cairo @@ -106,7 +106,7 @@ stdenv.mkDerivation { pulseaudio systemd ] + ":" + stdenv.lib.makeSearchPath "lib64" [ - stdenv.cc.gcc + stdenv.cc.cc ]; # "strip" after "patchelf" may break binaries. diff --git a/pkgs/applications/science/electronics/eagle/default.nix b/pkgs/applications/science/electronics/eagle/default.nix index dd8863b1c4ed..e4cb4685f16e 100644 --- a/pkgs/applications/science/electronics/eagle/default.nix +++ b/pkgs/applications/science/electronics/eagle/default.nix @@ -63,7 +63,7 @@ stdenv.mkDerivation rec { mkdir -p "$out"/bin cat > "$out"/bin/eagle << EOF #!${stdenv.shell} - export LD_LIBRARY_PATH="${stdenv.cc.gcc}/lib:${libPath}" + export LD_LIBRARY_PATH="${stdenv.cc.cc}/lib:${libPath}" export LD_PRELOAD="$out/lib/eagle_fixer.so" exec "$dynlinker" "$out/eagle-${version}/bin/eagle" "\$@" EOF diff --git a/pkgs/applications/science/logic/verifast/default.nix b/pkgs/applications/science/logic/verifast/default.nix index 797333d5bd86..c0619ab5f49a 100644 --- a/pkgs/applications/science/logic/verifast/default.nix +++ b/pkgs/applications/science/logic/verifast/default.nix @@ -5,9 +5,9 @@ assert stdenv.isLinux; let libPath = stdenv.lib.makeLibraryPath - [ stdenv.cc.libc stdenv.cc.gcc gtk gdk_pixbuf atk pango glib cairo + [ stdenv.cc.libc stdenv.cc.cc gtk gdk_pixbuf atk pango glib cairo freetype fontconfig libxml2 gnome2.gtksourceview - ] + ":${stdenv.cc.gcc}/lib64"; + ] + ":${stdenv.cc.cc}/lib64"; patchExe = x: '' patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ diff --git a/pkgs/applications/video/makemkv/default.nix b/pkgs/applications/video/makemkv/default.nix index 83fe8c704740..1eef680b7d1d 100644 --- a/pkgs/applications/video/makemkv/default.nix +++ b/pkgs/applications/video/makemkv/default.nix @@ -19,8 +19,8 @@ stdenv.mkDerivation rec { buildInputs = [openssl qt4 mesa zlib pkgconfig libav]; - libPath = stdenv.lib.makeLibraryPath [stdenv.cc.gcc openssl mesa qt4 zlib ] - + ":" + stdenv.cc.gcc + "/lib64"; + libPath = stdenv.lib.makeLibraryPath [stdenv.cc.cc openssl mesa qt4 zlib ] + + ":" + stdenv.cc.cc + "/lib64"; meta = with stdenv.lib; { description = "convert blu-ray and dvd to mkv"; diff --git a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix index 34d51aff9f52..ba8fb4cd460a 100644 --- a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix +++ b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix @@ -70,7 +70,7 @@ stdenv.mkDerivation { '' else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions") } - patchelf --set-rpath ${stdenv.cc.gcc}/lib:${dbus}/lib:${libX11}/lib:${libXt}/lib:${libXext}/lib:${libXmu}/lib:${libXfixes}/lib:${libXrandr}/lib:${libXcursor}/lib $i + patchelf --set-rpath ${stdenv.cc.cc}/lib:${dbus}/lib:${libX11}/lib:${libXt}/lib:${libXext}/lib:${libXmu}/lib:${libXfixes}/lib:${libXrandr}/lib:${libXcursor}/lib $i done for i in lib/VBoxOGL*.so diff --git a/pkgs/development/compilers/cryptol/1.8.x.nix b/pkgs/development/compilers/cryptol/1.8.x.nix index e6f04249f53a..b9a92d9a96fd 100644 --- a/pkgs/development/compilers/cryptol/1.8.x.nix +++ b/pkgs/development/compilers/cryptol/1.8.x.nix @@ -11,11 +11,11 @@ let libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.libc - stdenv.cc.gcc + stdenv.cc.cc gmp4 ncurses zlib - ] + ":${stdenv.cc.gcc}/lib64"; + ] + ":${stdenv.cc.cc}/lib64"; cryptol-bin = if stdenv.system == "i686-linux" diff --git a/pkgs/development/compilers/cudatoolkit/5.5.nix b/pkgs/development/compilers/cudatoolkit/5.5.nix index a16a252b4a56..e1d8ab13a513 100644 --- a/pkgs/development/compilers/cudatoolkit/5.5.nix +++ b/pkgs/development/compilers/cudatoolkit/5.5.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { gtk2 glib fontconfig freetype unixODBC alsaLib ]; - rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.gcc}/lib64"; + rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.cc}/lib64"; unpackPhase = '' sh $src --keep --noexec diff --git a/pkgs/development/compilers/cudatoolkit/6.0.nix b/pkgs/development/compilers/cudatoolkit/6.0.nix index d6fdb6c6bdb0..f8b4506ee426 100644 --- a/pkgs/development/compilers/cudatoolkit/6.0.nix +++ b/pkgs/development/compilers/cudatoolkit/6.0.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { gtk2 glib fontconfig freetype unixODBC alsaLib ]; - rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.gcc}/lib64"; + rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.cc}/lib64"; unpackPhase = '' sh $src --keep --noexec diff --git a/pkgs/development/compilers/gcl/default.nix b/pkgs/development/compilers/gcl/default.nix index 452f5c09bf5c..a31517afbeb1 100644 --- a/pkgs/development/compilers/gcl/default.nix +++ b/pkgs/development/compilers/gcl/default.nix @@ -10,9 +10,8 @@ in ( assert a.stdenv ? cc ; -assert a.stdenv.cc ? gcc ; +assert a.stdenv.cc.cc.isGNU or false ; assert a.stdenv.cc ? libc ; -assert a.stdenv.cc.gcc != null ; assert a.stdenv.cc.libc != null ; rec { @@ -37,7 +36,7 @@ rec { preBuild = a.fullDepEntry ('' sed -re "s@/bin/cat@$(which cat)@g" -i configure */configure sed -re "s@if test -d /proc/self @if false @" -i configure - sed -re 's^([ \t])cpp ^\1cpp -I${a.stdenv.cc.gcc}/include -I${a.stdenv.cc.libc}/include ^g' -i makefile + sed -re 's^([ \t])cpp ^\1cpp -I${a.stdenv.cc.cc}/include -I${a.stdenv.cc.libc}/include ^g' -i makefile '') ["minInit" "doUnpack" "addInputs"]; /* doConfigure should be removed if not needed */ diff --git a/pkgs/development/compilers/julia/0.2.1.nix b/pkgs/development/compilers/julia/0.2.1.nix index 78407f6b6c64..cc1be3db8a5b 100644 --- a/pkgs/development/compilers/julia/0.2.1.nix +++ b/pkgs/development/compilers/julia/0.2.1.nix @@ -4,7 +4,7 @@ , tcl, tk, xproto, libX11, git, mpfr } : let - realGcc = stdenv.cc.gcc; + realGcc = stdenv.cc.cc; in stdenv.mkDerivation rec { pname = "julia"; diff --git a/pkgs/development/compilers/julia/0.3.5.nix b/pkgs/development/compilers/julia/0.3.5.nix index 36639bd0e5ee..62fe9844c695 100644 --- a/pkgs/development/compilers/julia/0.3.5.nix +++ b/pkgs/development/compilers/julia/0.3.5.nix @@ -7,7 +7,7 @@ assert stdenv.isLinux; let - realGcc = stdenv.cc.gcc; + realGcc = stdenv.cc.cc; in stdenv.mkDerivation rec { pname = "julia"; diff --git a/pkgs/development/compilers/llvm/3.3/clang.nix b/pkgs/development/compilers/llvm/3.3/clang.nix index 3282542ba3c2..aeaa476df12b 100644 --- a/pkgs/development/compilers/llvm/3.3/clang.nix +++ b/pkgs/development/compilers/llvm/3.3/clang.nix @@ -2,7 +2,7 @@ let version = "3.3"; - gccReal = if (stdenv.cc.gcc or null) == null then stdenv.cc else stdenv.cc.gcc; + gccReal = if (stdenv.cc.cc or null) == null then stdenv.cc else stdenv.cc.cc; in stdenv.mkDerivation { @@ -29,7 +29,7 @@ stdenv.mkDerivation { sha256 = "15mrvw43s4frk1j49qr4v5viq68h8qlf10qs6ghd6mrsmgj5vddi"; }; - passthru = { gcc = stdenv.cc.gcc; }; + passthru = { cc = stdenv.cc.cc; }; meta = { homepage = http://clang.llvm.org/; diff --git a/pkgs/development/compilers/llvm/3.4/clang.nix b/pkgs/development/compilers/llvm/3.4/clang.nix index a2358a6f0b77..612e63eafd49 100644 --- a/pkgs/development/compilers/llvm/3.4/clang.nix +++ b/pkgs/development/compilers/llvm/3.4/clang.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation { "-DCLANG_PATH_TO_LLVM_BUILD=${llvm}" ] ++ (stdenv.lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.cc.libc}/include") ++ - (stdenv.lib.optional (stdenv.cc.gcc != null) "-DGCC_INSTALL_PREFIX=${stdenv.cc.gcc}"); + (stdenv.lib.optional (stdenv.cc.cc != null) "-DGCC_INSTALL_PREFIX=${stdenv.cc.cc}"); # Clang expects to find LLVMgold in its own prefix # Clang expects to find sanitizer libraries in its own prefix @@ -34,7 +34,7 @@ stdenv.mkDerivation { ln -sv ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/ ''; - passthru.gcc = stdenv.cc.gcc; + passthru.cc = stdenv.cc.cc; enableParallelBuilding = true; diff --git a/pkgs/development/compilers/mozart/binary.nix b/pkgs/development/compilers/mozart/binary.nix index 9868e8d92c35..a420ef9c292c 100644 --- a/pkgs/development/compilers/mozart/binary.nix +++ b/pkgs/development/compilers/mozart/binary.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation { }; libPath = stdenv.lib.makeLibraryPath - [stdenv.cc.gcc emacs tk tcl boost gmp]; + [stdenv.cc.cc emacs tk tcl boost gmp]; builder = ./builder.sh; diff --git a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix index f51107a2b29e..35ee1a04a268 100644 --- a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix +++ b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix @@ -174,7 +174,7 @@ let result = stdenv.mkDerivation rec { */ libraries = [stdenv.cc.libc glib libxml2 libav_0_8 ffmpeg libxslt mesa_noglu xlibs.libXxf86vm alsaLib fontconfig freetype gnome.pango gnome.gtk cairo gdk_pixbuf atk] ++ - (if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi xlibs.libXp xlibs.libXt xlibs.libXrender stdenv.cc.gcc] else []); + (if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi xlibs.libXp xlibs.libXt xlibs.libXrender stdenv.cc.cc] else []); passthru.mozillaPlugin = if installjdk then "/jre/lib/${architecture}/plugins" else "/lib/${architecture}/plugins"; diff --git a/pkgs/development/compilers/rustc/0.12.nix b/pkgs/development/compilers/rustc/0.12.nix index 9cbe3fec2c40..dda9be1f1285 100644 --- a/pkgs/development/compilers/rustc/0.12.nix +++ b/pkgs/development/compilers/rustc/0.12.nix @@ -54,7 +54,7 @@ in stdenv.mkDerivation { cp -r bin "$out/bin" '' + (if stdenv.isLinux then '' patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \ - --set-rpath "${stdenv.cc.gcc}/lib/:${stdenv.cc.gcc}/lib64/" \ + --set-rpath "${stdenv.cc.cc}/lib/:${stdenv.cc.cc}/lib64/" \ "$out/bin/rustc" '' else ""); }; diff --git a/pkgs/development/compilers/rustc/head.nix b/pkgs/development/compilers/rustc/head.nix index 5aad9bfa5fff..760fcdd851a6 100644 --- a/pkgs/development/compilers/rustc/head.nix +++ b/pkgs/development/compilers/rustc/head.nix @@ -67,7 +67,7 @@ stdenv.mkDerivation { cp -r bin "$out/bin" '' + (if stdenv.isLinux then '' patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \ - --set-rpath "${stdenv.cc.gcc}/lib/:${stdenv.cc.gcc}/lib64/" \ + --set-rpath "${stdenv.cc.cc}/lib/:${stdenv.cc.cc}/lib64/" \ "$out/bin/rustc" '' else ""); }; diff --git a/pkgs/development/guile-modules/guile-lib/default.nix b/pkgs/development/guile-modules/guile-lib/default.nix index 258fe1e497e3..10d98dbf7c3d 100644 --- a/pkgs/development/guile-modules/guile-lib/default.nix +++ b/pkgs/development/guile-modules/guile-lib/default.nix @@ -1,6 +1,6 @@ {stdenv, fetchurl, guile, texinfo}: -assert stdenv ? cc && stdenv.cc ? gcc && stdenv.cc.gcc != null; +assert stdenv ? cc && stdenv.cc.cc.isGNU or false; stdenv.mkDerivation rec { name = "guile-lib-0.2.2"; @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { preCheck = # Make `libgcc_s.so' visible for `pthread_cancel'. - '' export LD_LIBRARY_PATH="$(dirname $(echo ${stdenv.cc.gcc}/lib*/libgcc_s.so)):$LD_LIBRARY_PATH" + '' export LD_LIBRARY_PATH="$(dirname $(echo ${stdenv.cc.cc}/lib*/libgcc_s.so)):$LD_LIBRARY_PATH" ''; meta = { diff --git a/pkgs/development/interpreters/dart/default.nix b/pkgs/development/interpreters/dart/default.nix index f51ac1cdddf1..dd0d0e94482c 100644 --- a/pkgs/development/interpreters/dart/default.nix +++ b/pkgs/development/interpreters/dart/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation { sha256 = "00935c4vxfj2h3x354g75qdazswwissbwc7kj5k05l1m3lizikf6"; }; - libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.gcc ]; + libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc ]; dontStrip = true; -} \ No newline at end of file +} diff --git a/pkgs/development/libraries/fmod/default.nix b/pkgs/development/libraries/fmod/default.nix index 5473f2eb9b6a..f014c4cecb6a 100644 --- a/pkgs/development/libraries/fmod/default.nix +++ b/pkgs/development/libraries/fmod/default.nix @@ -5,7 +5,7 @@ let bits = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") "64"; libPath = stdenv.lib.makeLibraryPath - [ stdenv.cc.libc stdenv.cc.gcc ] + ":${stdenv.cc.gcc}/lib64"; + [ stdenv.cc.libc stdenv.cc.cc ] + ":${stdenv.cc.cc}/lib64"; patchLib = x: "patchelf --set-rpath ${libPath} ${x}"; in stdenv.mkDerivation rec { diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index 2868e1de4f7e..714b8073ee04 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -7,7 +7,7 @@ with stdenv.lib; -assert !stdenv.isDarwin -> stdenv.cc ? gcc; +assert !stdenv.isDarwin -> stdenv.cc.cc.isGNU or false; # TODO: # * Add gio-module-fam diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index dcd7acf9b854..b6aad5782045 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -33,9 +33,9 @@ in # libgcc_s will not be at {gcc}/lib, and gcc's libgcc will be found without # any special hack. preInstall = '' - if [ -f ${stdenv.cc.gcc}/lib/libgcc_s.so.1 ]; then + if [ -f ${stdenv.cc.cc}/lib/libgcc_s.so.1 ]; then mkdir -p $out/lib - cp ${stdenv.cc.gcc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1 + cp ${stdenv.cc.cc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1 fi ''; diff --git a/pkgs/development/libraries/libre/default.nix b/pkgs/development/libraries/libre/default.nix index 4e007c1b2efb..4a8e68da0b81 100644 --- a/pkgs/development/libraries/libre/default.nix +++ b/pkgs/development/libraries/libre/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { "USE_ZLIB=1" "USE_OPENSSL=1" ''PREFIX=$(out)'' ] - ++ stdenv.lib.optional (stdenv.cc.gcc != null) "SYSROOT_ALT=${stdenv.cc.gcc}" + ++ stdenv.lib.optional (stdenv.cc.cc != null) "SYSROOT_ALT=${stdenv.cc.cc}" ++ stdenv.lib.optional (stdenv.cc.libc != null) "SYSROOT=${stdenv.cc.libc}" ; meta = { diff --git a/pkgs/development/libraries/librem/default.nix b/pkgs/development/libraries/librem/default.nix index b28a8cfd9a98..165e16a88238 100644 --- a/pkgs/development/libraries/librem/default.nix +++ b/pkgs/development/libraries/librem/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { "LIBRE_INC=${libre}/include/re" ''PREFIX=$(out)'' ] - ++ stdenv.lib.optional (stdenv.cc.gcc != null) "SYSROOT_ALT=${stdenv.cc.gcc}" + ++ stdenv.lib.optional (stdenv.cc.cc != null) "SYSROOT_ALT=${stdenv.cc.cc}" ++ stdenv.lib.optional (stdenv.cc.libc != null) "SYSROOT=${stdenv.cc.libc}" ; meta = { diff --git a/pkgs/development/libraries/v8/default.nix b/pkgs/development/libraries/v8/default.nix index 86dbcd1ec567..7eded3e4c5f2 100644 --- a/pkgs/development/libraries/v8/default.nix +++ b/pkgs/development/libraries/v8/default.nix @@ -57,8 +57,8 @@ stdenv.mkDerivation rec { ''; postFixup = if stdenv.isDarwin then '' - install_name_tool -change /usr/local/lib/libv8.dylib $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.cc.gcc}/lib/libgcc_s.1.dylib $out/bin/d8 - install_name_tool -id $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.cc.gcc}/lib/libgcc_s.1.dylib $out/lib/libv8.dylib + install_name_tool -change /usr/local/lib/libv8.dylib $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.cc.cc}/lib/libgcc_s.1.dylib $out/bin/d8 + install_name_tool -id $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.cc.cc}/lib/libgcc_s.1.dylib $out/lib/libv8.dylib '' else null; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/wtk/default.nix b/pkgs/development/libraries/wtk/default.nix index 8544513e5809..bde3f6e4efb9 100644 --- a/pkgs/development/libraries/wtk/default.nix +++ b/pkgs/development/libraries/wtk/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { buildInputs = [ unzip ]; - libraries = [ xlibs.libXpm xlibs.libXt xlibs.libX11 xlibs.libICE xlibs.libSM stdenv.cc.gcc ]; + libraries = [ xlibs.libXpm xlibs.libXt xlibs.libX11 xlibs.libICE xlibs.libSM stdenv.cc.cc ]; meta = { homepage = http://java.sun.com/products/sjwtoolkit/download.html; diff --git a/pkgs/development/misc/amdapp-sdk/default.nix b/pkgs/development/misc/amdapp-sdk/default.nix index 02cf9b03bd77..81b40bc78ac6 100644 --- a/pkgs/development/misc/amdapp-sdk/default.nix +++ b/pkgs/development/misc/amdapp-sdk/default.nix @@ -87,7 +87,7 @@ in stdenv.mkDerivation rec { # Create wrappers patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/bin/clinfo - patchelf --set-rpath ${stdenv.cc.gcc}/lib64:${stdenv.cc.gcc}/lib $out/bin/clinfo + patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib $out/bin/clinfo # Fix modes find "$out/" -type f -exec chmod 644 {} \; diff --git a/pkgs/development/mobile/androidenv/androidsdk.nix b/pkgs/development/mobile/androidenv/androidsdk.nix index 1e0df06de27f..c969ca14332b 100644 --- a/pkgs/development/mobile/androidenv/androidsdk.nix +++ b/pkgs/development/mobile/androidenv/androidsdk.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { for i in emulator64-arm emulator64-mips emulator64-x86 do patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 $i - patchelf --set-rpath ${stdenv.cc.gcc}/lib64 $i + patchelf --set-rpath ${stdenv.cc.cc}/lib64 $i done ''} @@ -84,7 +84,7 @@ stdenv.mkDerivation rec { patchelf --set-rpath ${libX11}/lib:${libXext}/lib:${libXrender}/lib:${freetype}/lib:${fontconfig}/lib libcairo-swt.so wrapProgram `pwd`/monitor \ - --prefix LD_LIBRARY_PATH : ${gtk}/lib:${atk}/lib:${stdenv.cc.gcc}/lib + --prefix LD_LIBRARY_PATH : ${gtk}/lib:${atk}/lib:${stdenv.cc.cc}/lib cd ../.. '' @@ -97,7 +97,7 @@ stdenv.mkDerivation rec { patchelf --set-rpath ${libX11}/lib:${libXext}/lib:${libXrender}/lib:${freetype}/lib:${fontconfig}/lib libcairo-swt.so wrapProgram `pwd`/monitor \ - --prefix LD_LIBRARY_PATH : ${gtk}/lib:${atk}/lib:${stdenv.cc.gcc}/lib + --prefix LD_LIBRARY_PATH : ${gtk}/lib:${atk}/lib:${stdenv.cc.cc}/lib cd ../.. '' diff --git a/pkgs/development/tools/atom-shell/default.nix b/pkgs/development/tools/atom-shell/default.nix index 872fc43a2571..983c5c451d0a 100644 --- a/pkgs/development/tools/atom-shell/default.nix +++ b/pkgs/development/tools/atom-shell/default.nix @@ -6,7 +6,7 @@ let atomEnv = buildEnv { name = "env-atom"; paths = [ - stdenv.cc.gcc zlib glib dbus gtk atk pango freetype libgnome_keyring3 + stdenv.cc.cc zlib glib dbus gtk atk pango freetype libgnome_keyring3 fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gconf nss xlibs.libXrender xlibs.libX11 xlibs.libXext xlibs.libXdamage xlibs.libXtst xlibs.libXcomposite xlibs.libXi xlibs.libXfixes xlibs.libXrandr diff --git a/pkgs/development/tools/build-managers/cargo/snapshot.nix b/pkgs/development/tools/build-managers/cargo/snapshot.nix index b873aee62f9e..f7475a70e7f2 100644 --- a/pkgs/development/tools/build-managers/cargo/snapshot.nix +++ b/pkgs/development/tools/build-managers/cargo/snapshot.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation { cp -r bin "$out/bin" '' + (if stdenv.isLinux then '' patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \ - --set-rpath "${stdenv.cc.gcc}/lib/:${stdenv.cc.gcc}/lib64/:${zlib}/lib" \ + --set-rpath "${stdenv.cc.cc}/lib/:${stdenv.cc.cc}/lib64/:${zlib}/lib" \ "$out/bin/cargo" '' else ""); } diff --git a/pkgs/development/tools/misc/saleae-logic/default.nix b/pkgs/development/tools/misc/saleae-logic/default.nix index 1e8d11fe622b..8e8909ee7d07 100644 --- a/pkgs/development/tools/misc/saleae-logic/default.nix +++ b/pkgs/development/tools/misc/saleae-logic/default.nix @@ -63,7 +63,7 @@ stdenv.mkDerivation rec { # Patch it patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/Logic" - patchelf --set-rpath "${stdenv.cc.gcc}/lib:${stdenv.cc.gcc}/lib64:${libPath}:\$ORIGIN/Analyzers:\$ORIGIN" "$out/Logic" + patchelf --set-rpath "${stdenv.cc.cc}/lib:${stdenv.cc.cc}/lib64:${libPath}:\$ORIGIN/Analyzers:\$ORIGIN" "$out/Logic" # Build the LD_PRELOAD library that makes Logic work from a read-only directory mkdir -p "$out/lib" diff --git a/pkgs/development/tools/node-webkit/default.nix b/pkgs/development/tools/node-webkit/default.nix index 7c7e7c8eb28d..97399e5268ce 100644 --- a/pkgs/development/tools/node-webkit/default.nix +++ b/pkgs/development/tools/node-webkit/default.nix @@ -10,7 +10,7 @@ let paths = [ xlibs.libX11 xlibs.libXrender glib gtk atk pango cairo gdk_pixbuf freetype fontconfig xlibs.libXcomposite alsaLib xlibs.libXdamage - xlibs.libXext xlibs.libXfixes nss nspr gconf expat dbus stdenv.cc.gcc + xlibs.libXext xlibs.libXfixes nss nspr gconf expat dbus stdenv.cc.cc xlibs.libXtst xlibs.libXi ]; }; diff --git a/pkgs/development/tools/phantomjs/default.nix b/pkgs/development/tools/phantomjs/default.nix index f6acfab73830..77bc1e5a885f 100644 --- a/pkgs/development/tools/phantomjs/default.nix +++ b/pkgs/development/tools/phantomjs/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { buildPhase = if stdenv.isDarwin then "" else '' patchelf \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "${freetype}/lib:${fontconfig}/lib:${stdenv.cc.gcc}/lib64:${stdenv.cc.gcc}/lib:${openssl}/lib" \ + --set-rpath "${freetype}/lib:${fontconfig}/lib:${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib:${openssl}/lib" \ bin/phantomjs ''; diff --git a/pkgs/games/adom/default.nix b/pkgs/games/adom/default.nix index 623572086770..25524528c5c8 100644 --- a/pkgs/games/adom/default.nix +++ b/pkgs/games/adom/default.nix @@ -7,7 +7,7 @@ let inherit (xlibs) libXext libX11; - lpath = "${stdenv.cc.gcc}/lib64:" + stdenv.lib.makeSearchPath "lib" [ + lpath = "${stdenv.cc.cc}/lib64:" + stdenv.lib.makeSearchPath "lib" [ zlib libmad libpng12 libcaca libXext libX11 mesa alsaLib pulseaudio]; in diff --git a/pkgs/games/andyetitmoves/default.nix b/pkgs/games/andyetitmoves/default.nix index de363df2630f..897e4202b807 100644 --- a/pkgs/games/andyetitmoves/default.nix +++ b/pkgs/games/andyetitmoves/default.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { mkdir -p $out/{opt/andyetitmoves,bin} cp -r * $out/opt/andyetitmoves/ - fullPath=${stdenv.cc.gcc}/lib64 + fullPath=${stdenv.cc.cc}/lib64 for i in $nativeBuildInputs; do fullPath=$fullPath''${fullPath:+:}$i/lib done diff --git a/pkgs/games/dwarf-fortress/default.nix b/pkgs/games/dwarf-fortress/default.nix index f4f35f6ad8c9..015ca2fca9d2 100644 --- a/pkgs/games/dwarf-fortress/default.nix +++ b/pkgs/games/dwarf-fortress/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { # Store the original hash for dwarf-therapist echo $(md5sum $out/share/df_linux/libs/Dwarf_Fortress | cut -c1-8) > $out/share/df_linux/hash.md5.orig # Fix rpath - patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ stdenv.cc.gcc stdenv.glibc ]}:$out/share/df_linux/libs" $out/share/df_linux/libs/Dwarf_Fortress + patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc stdenv.glibc ]}:$out/share/df_linux/libs" $out/share/df_linux/libs/Dwarf_Fortress cp -f ./${srcs.df_unfuck.name}/build/libgraphics.so $out/share/df_linux/libs/libgraphics.so cp $permission $out/share/df_linux/nix_permission diff --git a/pkgs/games/gsb/default.nix b/pkgs/games/gsb/default.nix index cfdc729f5d30..642a86ac4de2 100644 --- a/pkgs/games/gsb/default.nix +++ b/pkgs/games/gsb/default.nix @@ -25,11 +25,11 @@ stdenv.mkDerivation rec { phases = "unpackPhase installPhase"; # XXX: stdenv.lib.makeLibraryPath doesn't pick up /lib64 - libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.gcc stdenv.cc.libc ] + libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc stdenv.cc.libc ] + ":" + stdenv.lib.makeLibraryPath [ SDL SDL_image libjpeg62 libpng12 mesa ] + ":" + stdenv.lib.makeLibraryPath [ curl3 openal libvorbis libogg ] + ":" + stdenv.lib.makeLibraryPath [ libX11 libXext libXft fontconfig zlib ] - + ":" + stdenv.cc.gcc + "/lib64"; + + ":" + stdenv.cc.cc + "/lib64"; installPhase = '' mkdir -p $out/libexec/positech/GSB/ diff --git a/pkgs/games/megaglest/default.nix b/pkgs/games/megaglest/default.nix index 6d884f082c98..2de42fd86eed 100644 --- a/pkgs/games/megaglest/default.nix +++ b/pkgs/games/megaglest/default.nix @@ -8,7 +8,7 @@ let name = "megaglest-lib-env"; paths = [ SDL xlibs.libSM xlibs.libICE xlibs.libX11 xlibs.libXext xercesc openal libvorbis lua libjpeg libpng curl fontconfig ftgl freetype - stdenv.cc.gcc glew mesa_glu mesa_drivers wxGTK ]; + stdenv.cc.cc glew mesa_glu mesa_drivers wxGTK ]; }; path-env = buildEnv { name = "megaglest-path-env"; diff --git a/pkgs/games/oilrush/default.nix b/pkgs/games/oilrush/default.nix index 18c955f1cc14..d75f02c5e941 100644 --- a/pkgs/games/oilrush/default.nix +++ b/pkgs/games/oilrush/default.nix @@ -25,25 +25,25 @@ stdenv.mkDerivation { do patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $f done - patchelf --set-rpath ${stdenv.cc.gcc}/lib64:${stdenv.cc.gcc}/lib:${libX11}/lib:${libXext}/lib:${libXrender}/lib:${fontconfig}/lib:${freetype}/lib\ + patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib:${libX11}/lib:${libXext}/lib:${libXrender}/lib:${fontconfig}/lib:${freetype}/lib\ launcher_$arch - patchelf --set-rpath ${stdenv.cc.gcc}/lib64:${stdenv.cc.gcc}/lib\ + patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib\ libNetwork_$arch.so - patchelf --set-rpath ${stdenv.cc.gcc}/lib64:${stdenv.cc.gcc}/lib\ + patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib\ libQtCoreUnigine_$arch.so.4 - patchelf --set-rpath ${stdenv.cc.gcc}/lib64:${stdenv.cc.gcc}/lib:${libX11}/lib:${libXext}/lib:${libXrender}/lib:${fontconfig}/lib:${freetype}/lib\ + patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib:${libX11}/lib:${libXext}/lib:${libXrender}/lib:${fontconfig}/lib:${freetype}/lib\ libQtGuiUnigine_$arch.so.4 - patchelf --set-rpath ${stdenv.cc.gcc}/lib64:${stdenv.cc.gcc}/lib\ + patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib\ libQtNetworkUnigine_$arch.so.4 - patchelf --set-rpath ${stdenv.cc.gcc}/lib64:${stdenv.cc.gcc}/lib:${libX11}/lib:${libXext}/lib:${libXrender}/lib:${fontconfig}/lib:${freetype}/lib\ + patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib:${libX11}/lib:${libXext}/lib:${libXrender}/lib:${fontconfig}/lib:${freetype}/lib\ libQtWebKitUnigine_$arch.so.4 - patchelf --set-rpath ${stdenv.cc.gcc}/lib64:${stdenv.cc.gcc}/lib\ + patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib\ libQtXmlUnigine_$arch.so.4 - patchelf --set-rpath ${stdenv.cc.gcc}/lib64:${stdenv.cc.gcc}/lib\ + patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib\ libRakNet_$arch.so - patchelf --set-rpath ${stdenv.cc.gcc}/lib64:${stdenv.cc.gcc}/lib:${libX11}/lib:${libXext}/lib:${libXinerama}/lib:${libXrandr}/lib\ + patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib:${libX11}/lib:${libXext}/lib:${libXinerama}/lib:${libXrandr}/lib\ libUnigine_$arch.so - patchelf --set-rpath ${stdenv.cc.gcc}/lib64:${stdenv.cc.gcc}/lib:${libX11}/lib:${libXext}/lib:${libXinerama}/lib:${libXrandr}/lib\ + patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib:${libX11}/lib:${libXext}/lib:${libXinerama}/lib:${libXrandr}/lib\ OilRush_$arch ''; installPhase = '' diff --git a/pkgs/games/planetaryannihilation/default.nix b/pkgs/games/planetaryannihilation/default.nix index b018aa94d9ff..bbf12065cc71 100755 --- a/pkgs/games/planetaryannihilation/default.nix +++ b/pkgs/games/planetaryannihilation/default.nix @@ -35,12 +35,12 @@ stdenv.mkDerivation { ln -s ${systemd}/lib/libudev.so.1 $out/lib/libudev.so.0 patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/PA" - patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "${stdenv.lib.makeLibraryPath [ stdenv.cc.gcc xlibs.libXdamage xorg.libXfixes gtk glib stdenv.glibc "$out" xlibs.libXext pango udev xlibs.libX11 xlibs.libXcomposite alsaLib atk nspr fontconfig cairo pango nss freetype gnome3.gconf gdk_pixbuf xlibs.libXrender ]}:{stdenv.cc.gcc}/lib64:${stdenv.glibc}/lib64" "$out/host/CoherentUI_Host.bin" + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc xlibs.libXdamage xorg.libXfixes gtk glib stdenv.glibc "$out" xlibs.libXext pango udev xlibs.libX11 xlibs.libXcomposite alsaLib atk nspr fontconfig cairo pango nss freetype gnome3.gconf gdk_pixbuf xlibs.libXrender ]}:{stdenv.cc.cc}/lib64:${stdenv.glibc}/lib64" "$out/host/CoherentUI_Host.bin" - wrapProgram $out/PA --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ stdenv.cc.gcc stdenv.glibc xlibs.libX11 xlibs.libXcursor gtk glib curl "$out" ]}:${stdenv.cc.gcc}/lib64:${stdenv.glibc}/lib64" + wrapProgram $out/PA --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc stdenv.glibc xlibs.libX11 xlibs.libXcursor gtk glib curl "$out" ]}:${stdenv.cc.cc}/lib64:${stdenv.glibc}/lib64" for f in $out/lib/*; do - patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ stdenv.cc.gcc curl xlibs.libX11 stdenv.glibc xlibs.libXcursor "$out" ]}:${stdenv.cc.gcc}/lib64:${stdenv.glibc}/lib64" $f + patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc curl xlibs.libX11 stdenv.glibc xlibs.libXcursor "$out" ]}:${stdenv.cc.cc}/lib64:${stdenv.glibc}/lib64" $f done ''; diff --git a/pkgs/games/quake3/wrapper/default.nix b/pkgs/games/quake3/wrapper/default.nix index aa7e33f9cd07..f9e2e864f197 100644 --- a/pkgs/games/quake3/wrapper/default.nix +++ b/pkgs/games/quake3/wrapper/default.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation { inherit game paks mesa name; - gcc = stdenv.cc.gcc; + gcc = stdenv.cc.cc; meta = { inherit description; diff --git a/pkgs/games/sdlmame/default.nix b/pkgs/games/sdlmame/default.nix index 2b6b0bf76da2..6e063a34bc82 100644 --- a/pkgs/games/sdlmame/default.nix +++ b/pkgs/games/sdlmame/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { installPhase = '' patchelf \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "${alsaLib}/lib:${qt48}/lib:${SDL}/lib:${fontconfig}/lib:${freetype}/lib:${SDL_ttf}/lib:${xlibs.libX11}/lib:${xlibs.libXinerama}/lib:${stdenv.cc.gcc}/lib" \ + --set-rpath "${alsaLib}/lib:${qt48}/lib:${SDL}/lib:${fontconfig}/lib:${freetype}/lib:${SDL_ttf}/lib:${xlibs.libX11}/lib:${xlibs.libXinerama}/lib:${stdenv.cc.cc}/lib" \ share/sdlmame/sdlmame mkdir -p "$out/bin" diff --git a/pkgs/games/spring/default.nix b/pkgs/games/spring/default.nix index 4b4fdc662bba..aabd3656505b 100644 --- a/pkgs/games/spring/default.nix +++ b/pkgs/games/spring/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { postInstall = '' wrapProgram "$out/bin/spring" \ - --prefix LD_LIBRARY_PATH : "${stdenv.cc.gcc}/lib::${systemd}/lib" + --prefix LD_LIBRARY_PATH : "${stdenv.cc.cc}/lib::${systemd}/lib" ''; meta = with stdenv.lib; { diff --git a/pkgs/games/tibia/default.nix b/pkgs/games/tibia/default.nix index 1bda08b6aa8f..1eb60fc3b564 100644 --- a/pkgs/games/tibia/default.nix +++ b/pkgs/games/tibia/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation { cp -r * $out/res patchelf --set-interpreter ${glibc}/lib/ld-linux.so.2 \ - --set-rpath ${stdenv.cc.gcc}/lib:${libX11}/lib:${mesa}/lib \ + --set-rpath ${stdenv.cc.cc}/lib:${libX11}/lib:${mesa}/lib \ "$out/res/Tibia" # We've patchelf'd the files. The main ‘Tibia’ binary is a bit diff --git a/pkgs/games/ue4demos/default.nix b/pkgs/games/ue4demos/default.nix index 501c9431e716..a0e583e1075f 100644 --- a/pkgs/games/ue4demos/default.nix +++ b/pkgs/games/ue4demos/default.nix @@ -12,7 +12,7 @@ let rtdeps = stdenv.lib.makeLibraryPath [ xlibs.libXxf86vm xlibs.libXext openal ] - + ":" + stdenv.lib.makeSearchPath "lib64" [ stdenv.cc.gcc ]; + + ":" + stdenv.lib.makeSearchPath "lib64" [ stdenv.cc.cc ]; buildCommand = '' diff --git a/pkgs/games/ultrastardx/default.nix b/pkgs/games/ultrastardx/default.nix index 96f7b8a52fca..3eabaa090bb0 100644 --- a/pkgs/games/ultrastardx/default.nix +++ b/pkgs/games/ultrastardx/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { # The fpc is not properly wrapped to add -rpath. I add this manually. # I even do a trick on lib/lib64 for libgcc, that I expect it will work. preBuild = '' - export NIX_LDFLAGS="$NIX_LDFLAGS -rpath ${SDL}/lib -rpath ${SDL_image}/lib -rpath ${libpng}/lib -rpath ${freetype}/lib -rpath ${portaudio}/lib -rpath ${ffmpeg}/lib -rpath ${zlib}/lib -rpath ${sqlite}/lib -rpath ${libX11}/lib -rpath ${pcre}/lib -rpath ${lua}/lib -rpath ${stdenv.cc.gcc}/lib64 -rpath ${stdenv.cc.gcc}/lib" + export NIX_LDFLAGS="$NIX_LDFLAGS -rpath ${SDL}/lib -rpath ${SDL_image}/lib -rpath ${libpng}/lib -rpath ${freetype}/lib -rpath ${portaudio}/lib -rpath ${ffmpeg}/lib -rpath ${zlib}/lib -rpath ${sqlite}/lib -rpath ${libX11}/lib -rpath ${pcre}/lib -rpath ${lua}/lib -rpath ${stdenv.cc.cc}/lib64 -rpath ${stdenv.cc.cc}/lib" sed -i 414,424d Makefile ''; diff --git a/pkgs/games/vessel/default.nix b/pkgs/games/vessel/default.nix index 8eec6ecb23c2..cab6a269f93a 100644 --- a/pkgs/games/vessel/default.nix +++ b/pkgs/games/vessel/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { phases = "installPhase"; ld_preload = ./isatty.c; - libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.gcc stdenv.cc.libc ] + libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc stdenv.cc.libc ] + ":" + stdenv.lib.makeLibraryPath [ SDL pulseaudio alsaLib ] ; installPhase = '' diff --git a/pkgs/games/worldofgoo/default.nix b/pkgs/games/worldofgoo/default.nix index 1deda8e1ba48..8df3ef1e8403 100644 --- a/pkgs/games/worldofgoo/default.nix +++ b/pkgs/games/worldofgoo/default.nix @@ -45,9 +45,9 @@ stdenv.mkDerivation rec { phases = "unpackPhase installPhase"; # XXX: stdenv.lib.makeLibraryPath doesn't pick up /lib64 - libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.gcc stdenv.cc.libc ] + libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc stdenv.cc.libc ] + ":" + stdenv.lib.makeLibraryPath [libX11 libXext libXau libxcb libXdmcp SDL SDL_mixer libvorbis mesa ] - + ":" + stdenv.cc.gcc + "/lib64"; + + ":" + stdenv.cc.cc + "/lib64"; installPhase = '' mkdir -p $out/libexec/2dboy/WorldOfGoo/ diff --git a/pkgs/misc/drivers/gutenprint/bin.nix b/pkgs/misc/drivers/gutenprint/bin.nix index 828fbb8884b6..b5ab61edb959 100644 --- a/pkgs/misc/drivers/gutenprint/bin.nix +++ b/pkgs/misc/drivers/gutenprint/bin.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation { phases = "buildPhase"; - libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.gcc zlib ]; + libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc zlib ]; buildPhase = '' ar -x $src data.tar.gz diff --git a/pkgs/misc/emulators/wine/stable.nix b/pkgs/misc/emulators/wine/stable.nix index 49591a3f38ff..bdf696f541f9 100644 --- a/pkgs/misc/emulators/wine/stable.nix +++ b/pkgs/misc/emulators/wine/stable.nix @@ -4,7 +4,7 @@ }: assert stdenv.isLinux; -assert stdenv.cc.gcc != null; +assert stdenv.cc.cc.isGNU or false; let version = "1.6.2"; @@ -46,7 +46,7 @@ in stdenv.mkDerivation rec { # them to the RPATH so that the user doesn't have to set them in # LD_LIBRARY_PATH. NIX_LDFLAGS = map (path: "-rpath ${path}/lib ") [ - freetype fontconfig stdenv.cc.gcc mesa mesa_noglu.osmesa libdrm + freetype fontconfig stdenv.cc.cc mesa mesa_noglu.osmesa libdrm xlibs.libXinerama xlibs.libXrender xlibs.libXrandr xlibs.libXcursor xlibs.libXcomposite libpng libjpeg openssl gnutls cups @@ -65,7 +65,7 @@ in stdenv.mkDerivation rec { paxmark psmr $out/bin/wine{,-preloader} - wrapProgram $out/bin/wine --prefix LD_LIBRARY_PATH : ${stdenv.cc.gcc}/lib + wrapProgram $out/bin/wine --prefix LD_LIBRARY_PATH : ${stdenv.cc.cc}/lib ''; enableParallelBuilding = true; diff --git a/pkgs/misc/emulators/wine/unstable.nix b/pkgs/misc/emulators/wine/unstable.nix index edeb2bdb9908..bc941fc3ffc4 100644 --- a/pkgs/misc/emulators/wine/unstable.nix +++ b/pkgs/misc/emulators/wine/unstable.nix @@ -4,7 +4,7 @@ }: assert stdenv.isLinux; -assert stdenv.cc.gcc != null; +assert stdenv.cc.cc.isGNU or false; let version = "1.7.34"; @@ -46,7 +46,7 @@ in stdenv.mkDerivation rec { # them to the RPATH so that the user doesn't have to set them in # LD_LIBRARY_PATH. NIX_LDFLAGS = map (path: "-rpath ${path}/lib ") [ - freetype fontconfig stdenv.cc.gcc mesa mesa_noglu.osmesa libdrm + freetype fontconfig stdenv.cc.cc mesa mesa_noglu.osmesa libdrm xlibs.libXinerama xlibs.libXrender xlibs.libXrandr xlibs.libXcursor xlibs.libXcomposite libpng libjpeg openssl gnutls cups ncurses @@ -62,7 +62,7 @@ in stdenv.mkDerivation rec { install -D ${gecko} $out/share/wine/gecko/${gecko64.name} '' + '' install -D ${mono} $out/share/wine/mono/${mono.name} - wrapProgram $out/bin/wine --prefix LD_LIBRARY_PATH : ${stdenv.cc.gcc}/lib + wrapProgram $out/bin/wine --prefix LD_LIBRARY_PATH : ${stdenv.cc.cc}/lib ''; enableParallelBuilding = true; diff --git a/pkgs/os-specific/linux/ati-drivers/default.nix b/pkgs/os-specific/linux/ati-drivers/default.nix index 4f64b1358324..179166bbc79a 100644 --- a/pkgs/os-specific/linux/ati-drivers/default.nix +++ b/pkgs/os-specific/linux/ati-drivers/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation { builder = ./builder.sh; inherit libXxf86vm xf86vidmodeproto; - gcc = stdenv.cc.gcc; + gcc = stdenv.cc.cc; src = fetchurl { url = http://www2.ati.com/drivers/linux/amd-catalyst-omega-14.12-linux-run-installers.zip; diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix index 0d27c89eac2c..63cb33a52a28 100644 --- a/pkgs/os-specific/linux/nvidia-x11/default.nix +++ b/pkgs/os-specific/linux/nvidia-x11/default.nix @@ -42,9 +42,9 @@ stdenv.mkDerivation { dontStrip = true; glPath = makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr]; - cudaPath = makeLibraryPath [zlib stdenv.cc.gcc]; + cudaPath = makeLibraryPath [zlib stdenv.cc.cc]; openclPath = makeLibraryPath [zlib]; - allLibPath = makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr zlib stdenv.cc.gcc]; + allLibPath = makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr zlib stdenv.cc.cc]; programPath = optionalString (!libsOnly) (makeLibraryPath [ gtk atk pango glib gdk_pixbuf xlibs.libXv ] ); diff --git a/pkgs/os-specific/linux/nvidia-x11/legacy173.nix b/pkgs/os-specific/linux/nvidia-x11/legacy173.nix index 79d8adfb2e17..432a756b6f6b 100644 --- a/pkgs/os-specific/linux/nvidia-x11/legacy173.nix +++ b/pkgs/os-specific/linux/nvidia-x11/legacy173.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation { glPath = stdenv.lib.makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr]; - cudaPath = stdenv.lib.makeLibraryPath [zlib stdenv.cc.gcc]; + cudaPath = stdenv.lib.makeLibraryPath [zlib stdenv.cc.cc]; programPath = stdenv.lib.makeLibraryPath [ gtk atk pango glib gdk_pixbuf xlibs.libXv ]; diff --git a/pkgs/os-specific/linux/nvidia-x11/legacy304.nix b/pkgs/os-specific/linux/nvidia-x11/legacy304.nix index e37b4354408b..d5e350a0302a 100644 --- a/pkgs/os-specific/linux/nvidia-x11/legacy304.nix +++ b/pkgs/os-specific/linux/nvidia-x11/legacy304.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation { glPath = stdenv.lib.makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr]; - cudaPath = stdenv.lib.makeLibraryPath [zlib stdenv.cc.gcc]; + cudaPath = stdenv.lib.makeLibraryPath [zlib stdenv.cc.cc]; programPath = optionalString (!libsOnly) (stdenv.lib.makeLibraryPath [ gtk atk pango glib gdk_pixbuf xlibs.libXv ] ); diff --git a/pkgs/os-specific/linux/nvidia-x11/legacy340.nix b/pkgs/os-specific/linux/nvidia-x11/legacy340.nix index 7af7e63c388d..e0fd15fad3b1 100644 --- a/pkgs/os-specific/linux/nvidia-x11/legacy340.nix +++ b/pkgs/os-specific/linux/nvidia-x11/legacy340.nix @@ -45,9 +45,9 @@ stdenv.mkDerivation { dontStrip = true; glPath = makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr]; - cudaPath = makeLibraryPath [zlib stdenv.cc.gcc]; + cudaPath = makeLibraryPath [zlib stdenv.cc.cc]; openclPath = makeLibraryPath [zlib]; - allLibPath = makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr zlib stdenv.cc.gcc]; + allLibPath = makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr zlib stdenv.cc.cc]; programPath = optionalString (!libsOnly) (makeLibraryPath [ gtk atk pango glib gdk_pixbuf xlibs.libXv ] ); diff --git a/pkgs/os-specific/linux/ocz-toolbox/default.nix b/pkgs/os-specific/linux/ocz-toolbox/default.nix index 65d4fa0f07a5..4537cdac3e99 100644 --- a/pkgs/os-specific/linux/ocz-toolbox/default.nix +++ b/pkgs/os-specific/linux/ocz-toolbox/default.nix @@ -16,7 +16,7 @@ in stdenv.mkDerivation rec { cd linux${arch} ''; - libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.gcc libXrender fontconfig freetype libXext libX11 ]; + libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc libXrender fontconfig freetype libXext libX11 ]; installPhase = '' install -Dm755 OCZToolbox $out/bin/OCZToolbox diff --git a/pkgs/os-specific/linux/opengl/xorg-sys/default.nix b/pkgs/os-specific/linux/opengl/xorg-sys/default.nix index acd1499a36cd..2cebb8d9dcc2 100644 --- a/pkgs/os-specific/linux/opengl/xorg-sys/default.nix +++ b/pkgs/os-specific/linux/opengl/xorg-sys/default.nix @@ -11,6 +11,6 @@ stdenv.mkDerivation { name = "xorg-sys-opengl-3"; builder = ./builder.sh; - neededLibs = [xlibs.libXxf86vm xlibs.libXext expat libdrm stdenv.cc.gcc]; + neededLibs = [xlibs.libXxf86vm xlibs.libXext expat libdrm stdenv.cc.cc]; } diff --git a/pkgs/os-specific/linux/prl-tools/default.nix b/pkgs/os-specific/linux/prl-tools/default.nix index f76d409fcfbe..0dac7c4358d7 100644 --- a/pkgs/os-specific/linux/prl-tools/default.nix +++ b/pkgs/os-specific/linux/prl-tools/default.nix @@ -83,7 +83,7 @@ stdenv.mkDerivation rec { ''; libPath = with xorg; - stdenv.lib.makeLibraryPath ([ stdenv.cc.gcc libXrandr libXext libX11 libXcomposite libXinerama ] + stdenv.lib.makeLibraryPath ([ stdenv.cc.cc libXrandr libXext libX11 libXcomposite libXinerama ] ++ lib.optionals (!libsOnly) [ libXi glib dbus_glib zlib ]); desktops = map (x: substituteAll ({ diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index e1b8f9ea92c0..a55d71a3c08c 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -86,7 +86,7 @@ stdenv.mkDerivation rec { # This is needed because systemd uses the gold linker, which doesn't # yet have the wrapper script to add rpath flags automatically. - NIX_LDFLAGS = "-rpath ${pam}/lib -rpath ${libcap}/lib -rpath ${acl}/lib -rpath ${stdenv.cc.gcc}/lib"; + NIX_LDFLAGS = "-rpath ${pam}/lib -rpath ${libcap}/lib -rpath ${acl}/lib -rpath ${stdenv.cc.cc}/lib"; PYTHON_BINARY = "${coreutils}/bin/env python"; # don't want a build time dependency on Python diff --git a/pkgs/servers/nosql/influxdb/default.nix b/pkgs/servers/nosql/influxdb/default.nix index 343360952146..03a3a9cd43af 100644 --- a/pkgs/servers/nosql/influxdb/default.nix +++ b/pkgs/servers/nosql/influxdb/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { install -D influxdb $out/bin/influxdb patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/bin/influxdb wrapProgram "$out/bin/influxdb" \ - --prefix LD_LIBRARY_PATH : "${stdenv.cc.gcc}/lib:${stdenv.cc.gcc}/lib64:${zlib}/lib:${bzip2}/lib" + --prefix LD_LIBRARY_PATH : "${stdenv.cc.cc}/lib:${stdenv.cc.cc}/lib64:${zlib}/lib:${bzip2}/lib" mkdir -p $out/share/influxdb cp -R admin scripts config.toml $out/share/influxdb diff --git a/pkgs/servers/restund/default.nix b/pkgs/servers/restund/default.nix index b6fd650086f9..65e957852fbf 100644 --- a/pkgs/servers/restund/default.nix +++ b/pkgs/servers/restund/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { ''PREFIX=$(out)'' "USE_MYSQL=1" ] - ++ stdenv.lib.optional (stdenv.cc.gcc != null) "SYSROOT_ALT=${stdenv.cc.gcc}" + ++ stdenv.lib.optional (stdenv.cc.cc != null) "SYSROOT_ALT=${stdenv.cc.cc}" ++ stdenv.lib.optional (stdenv.cc.libc != null) "SYSROOT=${stdenv.cc.libc}" ; NIX_LDFLAGS='' -L${mysql}/lib/mysql ''; diff --git a/pkgs/tools/admin/tightvnc/default.nix b/pkgs/tools/admin/tightvnc/default.nix index 396b3bb88abe..6feff044f06d 100644 --- a/pkgs/tools/admin/tightvnc/default.nix +++ b/pkgs/tools/admin/tightvnc/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation { # for the builder script inherit xauth fontDirectories perl; - gcc = stdenv.cc.gcc; + gcc = stdenv.cc.cc; buildInputs = [x11 zlib libjpeg imake gccmakedep libXmu libXaw libXpm libXp xauth]; builder = ./builder.sh; diff --git a/pkgs/tools/filesystems/yandex-disk/default.nix b/pkgs/tools/filesystems/yandex-disk/default.nix index 2397a53c1934..984f644c28df 100644 --- a/pkgs/tools/filesystems/yandex-disk/default.nix +++ b/pkgs/tools/filesystems/yandex-disk/default.nix @@ -5,12 +5,12 @@ assert stdenv.isLinux; let p = if stdenv.is64bit then { arch = "x86_64"; - gcclib = "${stdenv.cc.gcc}/lib64"; + gcclib = "${stdenv.cc.cc}/lib64"; sha256 = "09kw7f0qsvx3vx1c1zb117yf3yk7kkz66agspz5xx9b0zh6i82jw"; } else { arch = "i386"; - gcclib = "${stdenv.cc.gcc}/lib"; + gcclib = "${stdenv.cc.cc}/lib"; sha256 = "0f2230c91120f05159281b39c620ab6bad6559ce8a17a0874d0a82350ebba426"; }; in diff --git a/pkgs/tools/graphics/cuneiform/default.nix b/pkgs/tools/graphics/cuneiform/default.nix index 38d5df22fd7a..c5d9475850e3 100644 --- a/pkgs/tools/graphics/cuneiform/default.nix +++ b/pkgs/tools/graphics/cuneiform/default.nix @@ -31,7 +31,7 @@ rec { needLib64 = a.stdenv.system == "x86_64-linux"; postInstall = a.fullDepEntry('' - patchelf --set-rpath $out/lib${if needLib64 then "64" else ""}${if a.stdenv.cc.gcc != null then ":${a.stdenv.cc.gcc}/lib" else ""}${if a.stdenv.cc.gcc != null && needLib64 then ":${a.stdenv.cc.gcc}/lib64" else ""}:${a.imagemagick}/lib $out/bin/cuneiform + patchelf --set-rpath $out/lib${if needLib64 then "64" else ""}${if a.stdenv.cc.cc != null then ":${a.stdenv.cc.cc}/lib" else ""}${if a.stdenv.cc.cc != null && needLib64 then ":${a.stdenv.cc.cc}/lib64" else ""}:${a.imagemagick}/lib $out/bin/cuneiform '') ["minInit" "addInputs" "doMakeInstall"]; name = "cuneiform-" + version; diff --git a/pkgs/tools/misc/megacli/default.nix b/pkgs/tools/misc/megacli/default.nix index d34c66bd587a..1f57b290cdd7 100644 --- a/pkgs/tools/misc/megacli/default.nix +++ b/pkgs/tools/misc/megacli/default.nix @@ -15,14 +15,14 @@ stdenv.mkDerivation rec { buildInputs = [rpmextract ncurses unzip makeWrapper]; libPath = stdenv.lib.makeLibraryPath - [ stdenv.cc.gcc stdenv.cc.libc ncurses ]; + [ stdenv.cc.cc stdenv.cc.libc ncurses ]; buildCommand = '' mkdir -p $out/bin cd $out unzip ${src} rpmextract linux/MegaCli-8.07.07-1.noarch.rpm - ${patchelf}/bin/patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath ${libPath}:$out/opt/lsi/3rdpartylibs/x86_64:$out/opt/lsi/3rdpartylibs:${stdenv.cc.gcc}/lib64:${stdenv.cc.gcc}/lib opt/MegaRAID/MegaCli/MegaCli64 + ${patchelf}/bin/patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath ${libPath}:$out/opt/lsi/3rdpartylibs/x86_64:$out/opt/lsi/3rdpartylibs:${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib opt/MegaRAID/MegaCli/MegaCli64 wrapProgram $out/opt/MegaRAID/MegaCli/MegaCli64 --set LD_LIBRARY_PATH $out/opt/lsi/3rdpartylibs/x86_64 ln -s $out/opt/MegaRAID/MegaCli/MegaCli64 $out/bin/MegaCli64 eval fixupPhase diff --git a/pkgs/tools/networking/atftp/default.nix b/pkgs/tools/networking/atftp/default.nix index 28568183db79..930d9f4968b6 100644 --- a/pkgs/tools/networking/atftp/default.nix +++ b/pkgs/tools/networking/atftp/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchurl, readline, tcp_wrappers, pcre, makeWrapper }: assert stdenv.isLinux; -assert stdenv.cc.gcc != null; +assert stdenv.cc.cc.isGNU or false; let version = "0.7"; debianPatch = fetchurl { @@ -18,7 +18,7 @@ stdenv.mkDerivation { buildInputs = [ readline tcp_wrappers pcre makeWrapper ]; patches = [ debianPatch ]; postInstall = '' - wrapProgram $out/sbin/atftpd --prefix LD_LIBRARY_PATH : ${stdenv.cc.gcc}/lib${if stdenv.system == "x86_64-linux" then "64" else ""} + wrapProgram $out/sbin/atftpd --prefix LD_LIBRARY_PATH : ${stdenv.cc.cc}/lib${if stdenv.system == "x86_64-linux" then "64" else ""} ''; meta = { description = "Advanced tftp tools"; diff --git a/pkgs/tools/security/tor/torbrowser.nix b/pkgs/tools/security/tor/torbrowser.nix index b0209757c06f..ab543b541ab9 100644 --- a/pkgs/tools/security/tor/torbrowser.nix +++ b/pkgs/tools/security/tor/torbrowser.nix @@ -9,7 +9,7 @@ let torEnv = buildEnv { name = "tor-env"; paths = [ - stdenv.cc.gcc zlib glib alsaLib dbus dbus_glib gtk atk pango freetype + stdenv.cc.cc zlib glib alsaLib dbus dbus_glib gtk atk pango freetype fontconfig gdk_pixbuf cairo xlibs.libXrender xlibs.libX11 xlibs.libXext xlibs.libXt ]; From 88eae464551f0efadccc8f64dd456679801b7939 Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Wed, 14 Jan 2015 20:44:00 -0800 Subject: [PATCH 18/29] rename occurrences of gcc.gcc to gcc.cc --- .../services/networking/dnscrypt-proxy.nix | 2 +- nixos/modules/system/boot/stage-1.nix | 2 +- pkgs/applications/misc/xca/default.nix | 2 +- .../applications/networking/copy-com/default.nix | 2 +- pkgs/applications/networking/dropbox/default.nix | 2 +- pkgs/applications/networking/ike/default.nix | 2 +- pkgs/applications/science/math/mathematica/9.nix | 2 +- .../science/math/mathematica/default.nix | 2 +- pkgs/desktops/kde-4.14/kdesdk/kde-dev-utils.nix | 2 +- pkgs/development/compilers/ghcjs/default.nix | 2 +- pkgs/development/tools/misc/ccache/default.nix | 8 ++++---- pkgs/development/tools/misc/distcc/default.nix | 4 ++-- .../tools/selenium/server/default.nix | 2 +- pkgs/stdenv/linux/default.nix | 2 +- .../linux/make-bootstrap-tools-crosspi.nix | 16 ++++++++-------- pkgs/stdenv/linux/make-bootstrap-tools.nix | 16 ++++++++-------- pkgs/top-level/all-packages.nix | 8 ++++---- 17 files changed, 38 insertions(+), 38 deletions(-) diff --git a/nixos/modules/services/networking/dnscrypt-proxy.nix b/nixos/modules/services/networking/dnscrypt-proxy.nix index 26549bfe6f14..d1b5fbedfa6f 100644 --- a/nixos/modules/services/networking/dnscrypt-proxy.nix +++ b/nixos/modules/services/networking/dnscrypt-proxy.nix @@ -103,7 +103,7 @@ in ${pkgs.tzdata}/share/zoneinfo/** r, ${dnscrypt-proxy}/share/dnscrypt-proxy/** r, - ${pkgs.gcc.gcc}/lib/libssp.so.* mr, + ${pkgs.gcc.cc}/lib/libssp.so.* mr, ${pkgs.libsodium}/lib/libsodium.so.* mr, } '') diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index f0d8b04d0875..16bebe03740a 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -46,7 +46,7 @@ let cp -pv ${pkgs.glibc}/lib/libpthread.so.* $out/lib cp -pv ${pkgs.glibc}/lib/librt.so.* $out/lib cp -pv ${pkgs.glibc}/lib/libdl.so.* $out/lib - cp -pv ${pkgs.gcc.gcc}/lib*/libgcc_s.so.* $out/lib + cp -pv ${pkgs.gcc.cc}/lib*/libgcc_s.so.* $out/lib # Copy BusyBox. cp -pvd ${pkgs.busybox}/bin/* ${pkgs.busybox}/sbin/* $out/bin/ diff --git a/pkgs/applications/misc/xca/default.nix b/pkgs/applications/misc/xca/default.nix index 0bc2170340c8..be99439c6178 100644 --- a/pkgs/applications/misc/xca/default.nix +++ b/pkgs/applications/misc/xca/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { postInstall = '' wrapProgram "$out/bin/xca" \ - --prefix LD_LIBRARY_PATH : "${qt4}/lib:${gcc.gcc}/lib:${gcc.gcc}/lib64:${openssl}/lib:${libtool}/lib" + --prefix LD_LIBRARY_PATH : "${qt4}/lib:${gcc.cc}/lib:${gcc.cc}/lib64:${openssl}/lib:${libtool}/lib" ''; buildInputs = [ openssl qt4 libtool gcc makeWrapper ]; diff --git a/pkgs/applications/networking/copy-com/default.nix b/pkgs/applications/networking/copy-com/default.nix index 0b0fc359a6be..9ef8caafa98d 100644 --- a/pkgs/applications/networking/copy-com/default.nix +++ b/pkgs/applications/networking/copy-com/default.nix @@ -37,7 +37,7 @@ in stdenv.mkDerivation { patchelf --set-interpreter ${stdenv.glibc}/lib/${interpreter} \ "$out/${appdir}/CopyConsole" - RPATH=${gcc.gcc}/lib:$out/${appdir} + RPATH=${gcc.cc}/lib:$out/${appdir} echo "updating rpaths to: $RPATH" find "$out/${appdir}" -type f -a -perm +0100 \ -print -exec patchelf --force-rpath --set-rpath "$RPATH" {} \; diff --git a/pkgs/applications/networking/dropbox/default.nix b/pkgs/applications/networking/dropbox/default.nix index d55e2b18162b..d49162d07232 100644 --- a/pkgs/applications/networking/dropbox/default.nix +++ b/pkgs/applications/networking/dropbox/default.nix @@ -76,7 +76,7 @@ in stdenv.mkDerivation { patchelf --set-interpreter ${stdenv.glibc}/lib/${interpreter} \ "$out/${appdir}/dropbox" - RPATH=${ldpath}:${gcc.gcc}/lib:$out/${appdir} + RPATH=${ldpath}:${gcc.cc}/lib:$out/${appdir} echo "updating rpaths to: $RPATH" find "$out/${appdir}" -type f -a -perm +0100 \ -print -exec patchelf --force-rpath --set-rpath "$RPATH" {} \; diff --git a/pkgs/applications/networking/ike/default.nix b/pkgs/applications/networking/ike/default.nix index 48f277ad4c98..56341b64d6ce 100644 --- a/pkgs/applications/networking/ike/default.nix +++ b/pkgs/applications/networking/ike/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { installPhase = '' make install for file in "$out"/bin/* "$out"/sbin/*; do - wrapProgram $file --prefix LD_LIBRARY_PATH ":" "$out/lib:${openssl}/lib:${gcc.gcc}/lib:${stdenv.glibc}/lib::${gcc.gcc}/lib64:${stdenv.glibc}/lib64:${libedit}/lib:${qt4}/lib" + wrapProgram $file --prefix LD_LIBRARY_PATH ":" "$out/lib:${openssl}/lib:${gcc.cc}/lib:${stdenv.glibc}/lib::${gcc.cc}/lib64:${stdenv.glibc}/lib64:${libedit}/lib:${qt4}/lib" done ''; diff --git a/pkgs/applications/science/math/mathematica/9.nix b/pkgs/applications/science/math/mathematica/9.nix index 64ebfb34636d..c9357d7352f0 100644 --- a/pkgs/applications/science/math/mathematica/9.nix +++ b/pkgs/applications/science/math/mathematica/9.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { coreutils fontconfig freetype - gcc.gcc + gcc.cc gcc.libc glib ncurses diff --git a/pkgs/applications/science/math/mathematica/default.nix b/pkgs/applications/science/math/mathematica/default.nix index 587321f09ec3..56e994258a6b 100644 --- a/pkgs/applications/science/math/mathematica/default.nix +++ b/pkgs/applications/science/math/mathematica/default.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { coreutils fontconfig freetype - gcc.gcc + gcc.cc gcc.libc glib ncurses diff --git a/pkgs/desktops/kde-4.14/kdesdk/kde-dev-utils.nix b/pkgs/desktops/kde-4.14/kdesdk/kde-dev-utils.nix index 215c0a3c613a..5c357cede8e9 100644 --- a/pkgs/desktops/kde-4.14/kdesdk/kde-dev-utils.nix +++ b/pkgs/desktops/kde-4.14/kdesdk/kde-dev-utils.nix @@ -3,7 +3,7 @@ kde { buildInputs = [ kdelibs libtool ]; - preConfigure = "export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:${gcc}:${gcc.gcc}"; + preConfigure = "export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:${gcc}:${gcc.cc}"; meta = { description = "various KDE development utilities"; diff --git a/pkgs/development/compilers/ghcjs/default.nix b/pkgs/development/compilers/ghcjs/default.nix index 069a249af2b2..e6798be78f8b 100644 --- a/pkgs/development/compilers/ghcjs/default.nix +++ b/pkgs/development/compilers/ghcjs/default.nix @@ -71,7 +71,7 @@ in cabal.mkDerivation (self: rec { chmod -R u+w $topDir/shims ''; postInstall = '' - PATH=$out/bin:${Cabal}/bin:$PATH LD_LIBRARY_PATH=${gmp}/lib:${gcc.gcc}/lib64:$LD_LIBRARY_PATH \ + PATH=$out/bin:${Cabal}/bin:$PATH LD_LIBRARY_PATH=${gmp}/lib:${gcc.cc}/lib64:$LD_LIBRARY_PATH \ env -u GHC_PACKAGE_PATH $out/bin/ghcjs-boot \ --dev \ --with-cabal ${cabalInstall}/bin/cabal \ diff --git a/pkgs/development/tools/misc/ccache/default.nix b/pkgs/development/tools/misc/ccache/default.nix index 4bccbaff3145..1bfbfcd92d46 100644 --- a/pkgs/development/tools/misc/ccache/default.nix +++ b/pkgs/development/tools/misc/ccache/default.nix @@ -17,19 +17,19 @@ stdenv.mkDerivation { links = extraConfig : (runCommand "ccache-links" { } '' mkdir -p $out/bin - if [ -x "${gcc.gcc}/bin/gcc" ]; then + if [ -x "${gcc.cc}/bin/gcc" ]; then cat > $out/bin/gcc << EOF #!/bin/sh ${extraConfig} - exec ${ccache}/bin/ccache ${gcc.gcc}/bin/gcc "\$@" + exec ${ccache}/bin/ccache ${gcc.cc}/bin/gcc "\$@" EOF chmod +x $out/bin/gcc fi - if [ -x "${gcc.gcc}/bin/g++" ]; then + if [ -x "${gcc.cc}/bin/g++" ]; then cat > $out/bin/g++ << EOF #!/bin/sh ${extraConfig} - exec ${ccache}/bin/ccache ${gcc.gcc}/bin/g++ "\$@" + exec ${ccache}/bin/ccache ${gcc.cc}/bin/g++ "\$@" EOF chmod +x $out/bin/g++ fi diff --git a/pkgs/development/tools/misc/distcc/default.nix b/pkgs/development/tools/misc/distcc/default.nix index 300e15f1317b..f73f47ab87b1 100644 --- a/pkgs/development/tools/misc/distcc/default.nix +++ b/pkgs/development/tools/misc/distcc/default.nix @@ -44,7 +44,7 @@ let links = extraConfig : (runCommand "distcc-links" { } '' mkdir -p $out/bin - if [ -x "${gcc.gcc}/bin/gcc" ]; then + if [ -x "${gcc.cc}/bin/gcc" ]; then cat > $out/bin/gcc << EOF #!/bin/sh ${extraConfig} @@ -52,7 +52,7 @@ let EOF chmod +x $out/bin/gcc fi - if [ -x "${gcc.gcc}/bin/g++" ]; then + if [ -x "${gcc.cc}/bin/g++" ]; then cat > $out/bin/g++ << EOF #!/bin/sh ${extraConfig} diff --git a/pkgs/development/tools/selenium/server/default.nix b/pkgs/development/tools/selenium/server/default.nix index 65c9f42ad14b..6a009f5af09d 100644 --- a/pkgs/development/tools/selenium/server/default.nix +++ b/pkgs/development/tools/selenium/server/default.nix @@ -29,7 +29,7 @@ in stdenv.mkDerivation rec { ${jdk}/bin/jar xf $src launchers/launcher-linux-amd64 patchelf \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "${gcc.gcc}/lib/:${gcc.gcc}/lib64:${xlibs.libX11}/lib" \ + --set-rpath "${gcc.cc}/lib/:${gcc.cc}/lib64:${xlibs.libX11}/lib" \ launchers/launcher-linux-${arch} ${jdk}/bin/jar uf $src launchers/launcher-linux-${arch} ''; diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index 529593bc059a..f1b5ae0dd1e0 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -283,7 +283,7 @@ rec { allowedRequisites = with stage4.pkgs; [ gzip bzip2 xz bash binutils coreutils diffutils findutils gawk glibc gnumake gnused gnutar gnugrep gnupatch patchelf attr acl - paxctl zlib pcre linuxHeaders ed gcc gcc.gcc libsigsegv + paxctl zlib pcre linuxHeaders ed gcc gcc.cc libsigsegv ]; overrides = pkgs: { diff --git a/pkgs/stdenv/linux/make-bootstrap-tools-crosspi.nix b/pkgs/stdenv/linux/make-bootstrap-tools-crosspi.nix index 3abffc469269..90f89cc0c784 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools-crosspi.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools-crosspi.nix @@ -162,12 +162,12 @@ rec { cp -d ${gnugrep.pcre.crossDrv}/lib/libpcre*.so* $out/lib # needed by grep # Copy what we need of GCC. - cp -d ${gcc.gcc.crossDrv}/bin/gcc $out/bin - cp -d ${gcc.gcc.crossDrv}/bin/cpp $out/bin - cp -d ${gcc.gcc.crossDrv}/bin/g++ $out/bin - cp -d ${gcc.gcc.crossDrv}/lib*/libgcc_s.so* $out/lib - cp -d ${gcc.gcc.crossDrv}/lib*/libstdc++.so* $out/lib - cp -rd ${gcc.gcc.crossDrv}/lib/gcc $out/lib + cp -d ${gcc.cc.crossDrv}/bin/gcc $out/bin + cp -d ${gcc.cc.crossDrv}/bin/cpp $out/bin + cp -d ${gcc.cc.crossDrv}/bin/g++ $out/bin + cp -d ${gcc.cc.crossDrv}/lib*/libgcc_s.so* $out/lib + cp -d ${gcc.cc.crossDrv}/lib*/libstdc++.so* $out/lib + cp -rd ${gcc.cc.crossDrv}/lib/gcc $out/lib chmod -R u+w $out/lib rm -f $out/lib/gcc/*/*/include*/linux rm -f $out/lib/gcc/*/*/include*/sound @@ -175,9 +175,9 @@ rec { rm -f $out/lib/gcc/*/*/include-fixed/asm rm -rf $out/lib/gcc/*/*/plugin #rm -f $out/lib/gcc/*/*/*.a - cp -rd ${gcc.gcc.crossDrv}/libexec/* $out/libexec + cp -rd ${gcc.cc.crossDrv}/libexec/* $out/libexec mkdir $out/include - cp -rd ${gcc.gcc.crossDrv}/include/c++ $out/include + cp -rd ${gcc.cc.crossDrv}/include/c++ $out/include chmod -R u+w $out/include rm -rf $out/include/c++/*/ext/pb_ds rm -rf $out/include/c++/*/ext/parallel diff --git a/pkgs/stdenv/linux/make-bootstrap-tools.nix b/pkgs/stdenv/linux/make-bootstrap-tools.nix index 767b1f288c0f..16a1d513afe3 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools.nix @@ -89,12 +89,12 @@ rec { cp -d ${gnugrep.pcre}/lib/libpcre*.so* $out/lib # needed by grep # Copy what we need of GCC. - cp -d ${gcc.gcc}/bin/gcc $out/bin - cp -d ${gcc.gcc}/bin/cpp $out/bin - cp -d ${gcc.gcc}/bin/g++ $out/bin - cp -d ${gcc.gcc}/lib*/libgcc_s.so* $out/lib - cp -d ${gcc.gcc}/lib*/libstdc++.so* $out/lib - cp -rd ${gcc.gcc}/lib/gcc $out/lib + cp -d ${gcc.cc}/bin/gcc $out/bin + cp -d ${gcc.cc}/bin/cpp $out/bin + cp -d ${gcc.cc}/bin/g++ $out/bin + cp -d ${gcc.cc}/lib*/libgcc_s.so* $out/lib + cp -d ${gcc.cc}/lib*/libstdc++.so* $out/lib + cp -rd ${gcc.cc}/lib/gcc $out/lib chmod -R u+w $out/lib rm -f $out/lib/gcc/*/*/include*/linux rm -f $out/lib/gcc/*/*/include*/sound @@ -102,11 +102,11 @@ rec { rm -f $out/lib/gcc/*/*/include-fixed/asm rm -rf $out/lib/gcc/*/*/plugin #rm -f $out/lib/gcc/*/*/*.a - cp -rd ${gcc.gcc}/libexec/* $out/libexec + cp -rd ${gcc.cc}/libexec/* $out/libexec chmod -R u+w $out/libexec rm -rf $out/libexec/gcc/*/*/plugin mkdir $out/include - cp -rd ${gcc.gcc}/include/c++ $out/include + cp -rd ${gcc.cc}/include/c++ $out/include chmod -R u+w $out/include rm -rf $out/include/c++/*/ext/pb_ds rm -rf $out/include/c++/*/ext/parallel diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 78f7e0bbabef..9f58047ad369 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3248,8 +3248,8 @@ let gcc48_multi = if system == "x86_64-linux" then lowPrio ( - wrapCCWith (import ../build-support/cc-wrapper) glibc_multi (gcc48.gcc.override { - stdenv = overrideCC stdenv (wrapCCWith (import ../build-support/cc-wrapper) glibc_multi gcc.gcc); + wrapCCWith (import ../build-support/cc-wrapper) glibc_multi (gcc48.cc.override { + stdenv = overrideCC stdenv (wrapCCWith (import ../build-support/cc-wrapper) glibc_multi gcc.cc); profiledCompiler = false; enableMultilib = true; })) @@ -4613,7 +4613,7 @@ let distccMasquerade = if stdenv.isDarwin then null else callPackage ../development/tools/misc/distcc/masq.nix { - gccRaw = gcc.gcc; + gccRaw = gcc.cc; binutils = binutils; }; @@ -13163,7 +13163,7 @@ let # this is to circumvent the bug with libgcc_s.so.1 which is # not found when using thread extraCmds = '' - LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${gcc.gcc}/lib + LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${gcc.cc}/lib export LD_LIBRARY_PATH ''; }; From b070eacfcdc6be36b2d4aca7c8764cba34e7af58 Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Wed, 14 Jan 2015 20:51:58 -0800 Subject: [PATCH 19/29] rename occurrences of cc.gcc to cc.cc --- maintainers/scripts/patchelf-hints.sh | 2 +- pkgs/build-support/build-fhs-chrootenv/default.nix | 4 ++-- pkgs/development/mobile/androidenv/androidsdk.nix | 2 +- pkgs/development/mobile/androidenv/build-tools.nix | 8 ++++---- pkgs/development/mobile/androidenv/platform-tools.nix | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/maintainers/scripts/patchelf-hints.sh b/maintainers/scripts/patchelf-hints.sh index e6b3eeafafc6..5fdfc15dc232 100755 --- a/maintainers/scripts/patchelf-hints.sh +++ b/maintainers/scripts/patchelf-hints.sh @@ -62,7 +62,7 @@ for bin in $(find $binaryDist -executable -type f) :; do ) if test "$names" = "glibc"; then names="stdenv.glibc"; fi - if echo $names | grep -c "gcc" &> /dev/null; then names="stdenv.cc.gcc"; fi + if echo $names | grep -c "gcc" &> /dev/null; then names="stdenv.cc.cc"; fi if test $lib != $libPath; then interpreter="--interpreter \${$names}/lib/$lib" diff --git a/pkgs/build-support/build-fhs-chrootenv/default.nix b/pkgs/build-support/build-fhs-chrootenv/default.nix index 89dd2faf3ba4..a4ba456d7a53 100644 --- a/pkgs/build-support/build-fhs-chrootenv/default.nix +++ b/pkgs/build-support/build-fhs-chrootenv/default.nix @@ -165,8 +165,8 @@ let cp -rsf ${staticUsrProfileTarget}/lib64/* lib64/ # copy gcc libs (and may overwrite exitsting wrongly placed libs) - cp -rsf ${choosenGcc.gcc}/lib/* lib/ - cp -rsf ${choosenGcc.gcc}/lib64/* lib64/ + cp -rsf ${choosenGcc.cc}/lib/* lib/ + cp -rsf ${choosenGcc.cc}/lib64/* lib64/ ''; in stdenv.mkDerivation { diff --git a/pkgs/development/mobile/androidenv/androidsdk.nix b/pkgs/development/mobile/androidenv/androidsdk.nix index c969ca14332b..7c854d052d6c 100644 --- a/pkgs/development/mobile/androidenv/androidsdk.nix +++ b/pkgs/development/mobile/androidenv/androidsdk.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { for i in emulator emulator-arm emulator-mips emulator-x86 mksdcard do patchelf --set-interpreter ${stdenv_32bit.cc.libc}/lib/ld-linux.so.2 $i - patchelf --set-rpath ${stdenv_32bit.cc.gcc}/lib $i + patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib $i done ${stdenv.lib.optionalString (stdenv.system == "x86_64-linux") '' diff --git a/pkgs/development/mobile/androidenv/build-tools.nix b/pkgs/development/mobile/androidenv/build-tools.nix index 0f736b8c383e..158d886a5e7d 100644 --- a/pkgs/development/mobile/androidenv/build-tools.nix +++ b/pkgs/development/mobile/androidenv/build-tools.nix @@ -31,26 +31,26 @@ stdenv.mkDerivation { # These binaries need to find libstdc++ and libgcc_s for i in aidl libLLVM.so do - patchelf --set-rpath ${stdenv_32bit.cc.gcc}/lib $i + patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib $i done # These binaries need to find libstdc++, libgcc_s and libraries in the current folder for i in libbcc.so libbcinfo.so libclang.so llvm-rs-cc do - patchelf --set-rpath ${stdenv_32bit.cc.gcc}/lib:`pwd` $i + patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib:`pwd` $i done # These binaries also need zlib in addition to libstdc++ for i in zipalign do patchelf --set-interpreter ${stdenv_32bit.cc.libc}/lib/ld-linux.so.2 $i - patchelf --set-rpath ${stdenv_32bit.cc.gcc}/lib:${zlib_32bit}/lib $i + patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib:${zlib_32bit}/lib $i done # These binaries need to find libstdc++, libgcc_s, and zlib for i in aapt dexdump do - patchelf --set-rpath ${stdenv_32bit.cc.gcc}/lib:${zlib_32bit}/lib $i + patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib:${zlib_32bit}/lib $i done ''} diff --git a/pkgs/development/mobile/androidenv/platform-tools.nix b/pkgs/development/mobile/androidenv/platform-tools.nix index c4724dd41dae..ab64ad589db8 100644 --- a/pkgs/development/mobile/androidenv/platform-tools.nix +++ b/pkgs/development/mobile/androidenv/platform-tools.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation { for i in adb fastboot do patchelf --set-interpreter ${stdenv_32bit.cc.libc}/lib/ld-linux.so.2 $i - patchelf --set-rpath ${stdenv_32bit.cc.gcc}/lib $i + patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib $i done ''} ''; From f27273039986dc634333b125aa975d3a7f812a3d Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Wed, 14 Jan 2015 20:59:10 -0800 Subject: [PATCH 20/29] rename .gcc to .cc --- pkgs/applications/graphics/freecad/default.nix | 2 +- pkgs/applications/inferno/default.nix | 4 ++-- pkgs/applications/science/math/R/default.nix | 2 +- pkgs/tools/typesetting/pdftk/default.nix | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/graphics/freecad/default.nix b/pkgs/applications/graphics/freecad/default.nix index a7665177046b..57dd49f7eb7c 100644 --- a/pkgs/applications/graphics/freecad/default.nix +++ b/pkgs/applications/graphics/freecad/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { # This should work on both x86_64, and i686 linux preBuild = '' - export NIX_LDFLAGS="-L${gfortran.gcc}/lib64 -L${gfortran.gcc}/lib $NIX_LDFLAGS"; + export NIX_LDFLAGS="-L${gfortran.cc}/lib64 -L${gfortran.cc}/lib $NIX_LDFLAGS"; ''; postInstall = '' diff --git a/pkgs/applications/inferno/default.nix b/pkgs/applications/inferno/default.nix index c5a40fcbf5b3..0d61d5635a51 100644 --- a/pkgs/applications/inferno/default.nix +++ b/pkgs/applications/inferno/default.nix @@ -46,10 +46,10 @@ stdenv.mkDerivation rec { mk install mkdir -p $out/bin makeWrapper $out/share/inferno/Linux/386/bin/emu $out/bin/emu \ - --suffix LD_LIBRARY_PATH ':' "${gcc46.gcc}/lib" \ + --suffix LD_LIBRARY_PATH ':' "${gcc46.cc}/lib" \ --suffix PATH ':' "$out/share/inferno/Linux/386/bin" makeWrapper $infernoWrapper $out/bin/inferno \ - --suffix LD_LIBRARY_PATH ':' "${gcc46.gcc}/lib" \ + --suffix LD_LIBRARY_PATH ':' "${gcc46.cc}/lib" \ --suffix PATH ':' "$out/share/inferno/Linux/386/bin" \ --set INFERNO_ROOT "$out/share/inferno" ''; diff --git a/pkgs/applications/science/math/R/default.nix b/pkgs/applications/science/math/R/default.nix index 8413eb14a35c..05f18334b991 100644 --- a/pkgs/applications/science/math/R/default.nix +++ b/pkgs/applications/science/math/R/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { CXX=$(type -p g++) FC="${gfortran}/bin/gfortran" F77="${gfortran}/bin/gfortran" JAVA_HOME="${jdk}" - LDFLAGS="-L${gfortran.gcc}/lib" + LDFLAGS="-L${gfortran.cc}/lib" RANLIB=$(type -p ranlib) R_SHELL="${stdenv.shell}" ) diff --git a/pkgs/tools/typesetting/pdftk/default.nix b/pkgs/tools/typesetting/pdftk/default.nix index a2ef7716cda2..84a853bb0df6 100644 --- a/pkgs/tools/typesetting/pdftk/default.nix +++ b/pkgs/tools/typesetting/pdftk/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation { sed -e 's@/usr/bin/@@g' -i Makefile.* NIX_ENFORCE_PURITY= \ make \ - LIBGCJ="${gcj.gcc}/share/java/libgcj-${gcj.gcc.version}.jar" \ + LIBGCJ="${gcj.cc}/share/java/libgcj-${gcj.cc.version}.jar" \ GCJ=gcj GCJH=gcjh GJAR=gjar \ -iC ../java all ''; From 7dc57a389e3d3eb5b5e8de3b02dfe469496fad1a Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Fri, 16 Jan 2015 10:50:53 -0500 Subject: [PATCH 21/29] cc-wrapper: Set CC/CXX more specifically if possible --- pkgs/build-support/cc-wrapper/default.nix | 6 ++++++ pkgs/build-support/cc-wrapper/setup-hook.sh | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index abbba31641b3..3f8c3de6a2f3 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -160,12 +160,18 @@ stdenv.mkDerivation { wrap ld.bfd ${./ld-wrapper.sh} $binutils/bin/ld.bfd fi + export real_cc=cc + export real_cxx=c++ if [ -e $ccPath/gcc ]; then wrap gcc ${./cc-wrapper.sh} $ccPath/gcc ln -s gcc $out/bin/cc + export real_cc=gcc + export real_cxx=g++ elif [ -e $ccPath/clang ]; then wrap clang ${./cc-wrapper.sh} $ccPath/clang ln -s clang $out/bin/cc + export real_cc=clang + export real_cxx=clang++ fi if [ -e $ccPath/g++ ]; then diff --git a/pkgs/build-support/cc-wrapper/setup-hook.sh b/pkgs/build-support/cc-wrapper/setup-hook.sh index 218899e9d8fc..cd98f57ee937 100644 --- a/pkgs/build-support/cc-wrapper/setup-hook.sh +++ b/pkgs/build-support/cc-wrapper/setup-hook.sh @@ -34,5 +34,5 @@ if [ -n "@coreutils@" ]; then addToSearchPath PATH @coreutils@/bin fi -export CC=cc -export CXX=c++ +export CC=@real_cc@ +export CXX=@real_cxx@ From f326b7995c6615e27e75b05dd3c2edff5b61d3b3 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Fri, 16 Jan 2015 11:30:51 -0500 Subject: [PATCH 22/29] Remove libc++ stuff from cc-wrapper This is now part of the libc++ setup hook --- pkgs/build-support/cc-wrapper/cc-wrapper.sh | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/pkgs/build-support/cc-wrapper/cc-wrapper.sh b/pkgs/build-support/cc-wrapper/cc-wrapper.sh index 3a7e24dfcafb..9284a62c643f 100644 --- a/pkgs/build-support/cc-wrapper/cc-wrapper.sh +++ b/pkgs/build-support/cc-wrapper/cc-wrapper.sh @@ -79,19 +79,6 @@ if [ "$NIX_ENFORCE_PURITY" = 1 -a -n "$NIX_STORE" ]; then params=("${rest[@]}") fi -if test -n "@libcxx@"; then - NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem@libcxx@/include/c++/v1" - if [[ "@prog@" = *++ ]]; then - NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -stdlib=libc++" - if test -z "$NIX_SKIP_CXX"; then - NIX_CFLAGS_LINK="$NIX_CFLAGS_LINK -L@libcxx@/lib -stdlib=libc++" - fi - if test -z "$NIX_SKIP_CXXABI" && echo "$@" | grep -qvw -- -nostdlib; then - NIX_CFLAGS_LINK="$NIX_CFLAGS_LINK -L@libcxxabi@/lib -lc++abi" - fi - fi -fi - # Add the flags for the C compiler proper. extraAfter=($NIX_CFLAGS_COMPILE) extraBefore=() From edcda996377719342ab9e335af570afc65058d26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sat, 17 Jan 2015 09:47:31 +0100 Subject: [PATCH 23/29] mpc: rename package name (close #2367) --- pkgs/development/libraries/mpc/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/mpc/default.nix b/pkgs/development/libraries/mpc/default.nix index 867a18fac54c..d5fd91712638 100644 --- a/pkgs/development/libraries/mpc/default.nix +++ b/pkgs/development/libraries/mpc/default.nix @@ -1,10 +1,12 @@ { fetchurl, stdenv, gmp, mpfr }: - +let + version = "1.0.1"; +in stdenv.mkDerivation rec { - name = "mpc-1.0.1"; + name = "libmpc-${version}"; # to avoid clash with the MPD client src = fetchurl { - url = "http://www.multiprecision.org/mpc/download/${name}.tar.gz"; + url = "http://www.multiprecision.org/mpc/download/mpc-${version}.tar.gz"; sha1 = "vxg0rkyn4cs40wr2cp6bbcyr1nnijzlc"; }; From a0bf07827bbf031d90ecb03f4e7345576208214a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sat, 17 Jan 2015 09:55:32 +0100 Subject: [PATCH 24/29] mpc: also rename the attribute to libmpc Attrnames and package names should be as close as possible to avoid confusion. I took care not to confuse the two mpc things during the mass-replace, so hopefully I suceeded (tarball still builds). --- pkgs/applications/audio/cmus/default.nix | 4 ++-- pkgs/applications/audio/moc/default.nix | 4 ++-- pkgs/development/compilers/gcc/4.5/default.nix | 6 +++--- pkgs/development/compilers/gcc/4.6/default.nix | 6 +++--- pkgs/development/compilers/gcc/4.8/default.nix | 6 +++--- pkgs/development/compilers/gcc/4.9/default.nix | 6 +++--- pkgs/development/compilers/llvm/3.4/dragonegg.nix | 4 ++-- pkgs/development/libraries/{mpc => libmpc}/default.nix | 0 pkgs/development/misc/avr-gcc-with-avr-libc/default.nix | 4 ++-- pkgs/stdenv/linux/default.nix | 2 +- pkgs/stdenv/linux/make-bootstrap-tools-crosspi.nix | 4 ++-- pkgs/stdenv/linux/make-bootstrap-tools.nix | 2 +- pkgs/top-level/all-packages.nix | 4 ++-- 13 files changed, 26 insertions(+), 26 deletions(-) rename pkgs/development/libraries/{mpc => libmpc}/default.nix (100%) diff --git a/pkgs/applications/audio/cmus/default.nix b/pkgs/applications/audio/cmus/default.nix index 7cabc98ebaa9..fd252754d660 100644 --- a/pkgs/applications/audio/cmus/default.nix +++ b/pkgs/applications/audio/cmus/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, ncurses, pkgconfig, alsaLib, flac, libmad, ffmpeg, libvorbis, mpc, mp4v2, libcue, pulseaudio}: +{ stdenv, fetchgit, ncurses, pkgconfig, alsaLib, flac, libmad, ffmpeg, libvorbis, libmpc, mp4v2, libcue, pulseaudio}: stdenv.mkDerivation rec { name = "cmus-${version}"; @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { configurePhase = "./configure prefix=$out"; - buildInputs = [ ncurses pkgconfig alsaLib flac libmad ffmpeg libvorbis mpc mp4v2 libcue pulseaudio ]; + buildInputs = [ ncurses pkgconfig alsaLib flac libmad ffmpeg libvorbis libmpc mp4v2 libcue pulseaudio ]; meta = { description = "Small, fast and powerful console music player for Linux and *BSD"; diff --git a/pkgs/applications/audio/moc/default.nix b/pkgs/applications/audio/moc/default.nix index ec9b1dd47ae2..a87e74dc87c2 100644 --- a/pkgs/applications/audio/moc/default.nix +++ b/pkgs/applications/audio/moc/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, ncurses, pkgconfig, alsaLib, flac, libmad, speex, ffmpeg -, libvorbis, mpc, libsndfile, jack2, db, libmodplug, timidity, libid3tag +, libvorbis, libmpc, libsndfile, jack2, db, libmodplug, timidity, libid3tag , libtool }: @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { buildInputs = [ ncurses pkgconfig alsaLib flac libmad speex ffmpeg libvorbis - mpc libsndfile jack2 db libmodplug timidity libid3tag libtool + libmpc libsndfile jack2 db libmodplug timidity libid3tag libtool ]; meta = with stdenv.lib; { diff --git a/pkgs/development/compilers/gcc/4.5/default.nix b/pkgs/development/compilers/gcc/4.5/default.nix index b438758e358d..931c5c413dee 100644 --- a/pkgs/development/compilers/gcc/4.5/default.nix +++ b/pkgs/development/compilers/gcc/4.5/default.nix @@ -8,7 +8,7 @@ , enableShared ? true , texinfo ? null , perl ? null # optional, for texi2pod (then pod2man); required for Java -, gmp, mpfr, mpc, gettext, which +, gmp, mpfr, libmpc, gettext, which , libelf # optional, for link-time optimizations (LTO) , ppl ? null, cloogppl ? null # optional, for the Graphite optimization framework , zlib ? null, boehmgc ? null @@ -208,7 +208,7 @@ stdenv.mkDerivation ({ nativeBuildInputs = [ texinfo which ] ++ optional (perl != null) perl; - buildInputs = [ gmp mpfr mpc libelf gettext ] + buildInputs = [ gmp mpfr libmpc libelf gettext ] ++ (optional (ppl != null) ppl) ++ (optional (cloogppl != null) cloogppl) ++ (optional (zlib != null) zlib) @@ -236,7 +236,7 @@ stdenv.mkDerivation ({ ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""} --with-gmp=${gmp} --with-mpfr=${mpfr} - --with-mpc=${mpc} + --with-mpc=${libmpc} ${if libelf != null then "--with-libelf=${libelf}" else ""} --disable-libstdcxx-pch --without-included-gettext diff --git a/pkgs/development/compilers/gcc/4.6/default.nix b/pkgs/development/compilers/gcc/4.6/default.nix index ef3e2c535c29..78666c8cdce3 100644 --- a/pkgs/development/compilers/gcc/4.6/default.nix +++ b/pkgs/development/compilers/gcc/4.6/default.nix @@ -9,7 +9,7 @@ , enableShared ? true , texinfo ? null , perl ? null # optional, for texi2pod (then pod2man); required for Java -, gmp, mpfr, mpc, gettext, which +, gmp, mpfr, libmpc, gettext, which , libelf # optional, for link-time optimizations (LTO) , ppl ? null, cloog ? null # optional, for the Graphite optimization framework. , zlib ? null, boehmgc ? null @@ -253,7 +253,7 @@ stdenv.mkDerivation ({ ++ (optional (perl != null) perl) ++ (optional javaAwtGtk pkgconfig); - buildInputs = [ gmp mpfr mpc libelf ] + buildInputs = [ gmp mpfr libmpc libelf ] ++ (optional (ppl != null) ppl) ++ (optional (cloog != null) cloog) ++ (optional (zlib != null) zlib) @@ -291,7 +291,7 @@ stdenv.mkDerivation ({ ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""} --with-gmp=${gmp} --with-mpfr=${mpfr} - --with-mpc=${mpc} + --with-mpc=${libmpc} ${if libelf != null then "--with-libelf=${libelf}" else ""} --disable-libstdcxx-pch --without-included-gettext diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index 0fff83fca31f..86d4aa30267f 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -11,7 +11,7 @@ , enableShared ? true , texinfo ? null , perl ? null # optional, for texi2pod (then pod2man); required for Java -, gmp, mpfr, mpc, gettext, which +, gmp, mpfr, libmpc, gettext, which , libelf # optional, for link-time optimizations (LTO) , cloog ? null, isl ? null # optional, for the Graphite optimization framework. , zlib ? null, boehmgc ? null @@ -275,7 +275,7 @@ stdenv.mkDerivation ({ ++ (optional (perl != null) perl) ++ (optional javaAwtGtk pkgconfig); - buildInputs = [ gmp mpfr mpc libelf ] + buildInputs = [ gmp mpfr libmpc libelf ] ++ (optional (cloog != null) cloog) ++ (optional (isl != null) isl) ++ (optional (zlib != null) zlib) @@ -333,7 +333,7 @@ stdenv.mkDerivation ({ ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""} --with-gmp=${gmp} --with-mpfr=${mpfr} - --with-mpc=${mpc} + --with-mpc=${libmpc} ${if libelf != null then "--with-libelf=${libelf}" else ""} --disable-libstdcxx-pch --without-included-gettext diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index eca8120a2088..02747d90567b 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -9,7 +9,7 @@ , enableShared ? true , texinfo ? null , perl ? null # optional, for texi2pod (then pod2man); required for Java -, gmp, mpfr, mpc, gettext, which +, gmp, mpfr, libmpc, gettext, which , libelf # optional, for link-time optimizations (LTO) , cloog ? null, isl ? null # optional, for the Graphite optimization framework. , zlib ? null, boehmgc ? null @@ -271,7 +271,7 @@ stdenv.mkDerivation ({ ++ (optional (perl != null) perl) ++ (optional javaAwtGtk pkgconfig); - buildInputs = [ gmp mpfr mpc libelf ] + buildInputs = [ gmp mpfr libmpc libelf ] ++ (optional (cloog != null) cloog) ++ (optional (isl != null) isl) ++ (optional (zlib != null) zlib) @@ -323,7 +323,7 @@ stdenv.mkDerivation ({ ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""} --with-gmp=${gmp} --with-mpfr=${mpfr} - --with-mpc=${mpc} + --with-mpc=${libmpc} ${if libelf != null then "--with-libelf=${libelf}" else ""} --disable-libstdcxx-pch --without-included-gettext diff --git a/pkgs/development/compilers/llvm/3.4/dragonegg.nix b/pkgs/development/compilers/llvm/3.4/dragonegg.nix index a34fa965f066..8704d9964244 100644 --- a/pkgs/development/compilers/llvm/3.4/dragonegg.nix +++ b/pkgs/development/compilers/llvm/3.4/dragonegg.nix @@ -1,4 +1,4 @@ -{stdenv, fetch, fetchpatch, llvm, gmp, mpfr, mpc, ncurses, zlib, version}: +{stdenv, fetch, fetchpatch, llvm, gmp, mpfr, libmpc, ncurses, zlib, version}: stdenv.mkDerivation rec { name = "dragonegg-${version}"; @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { # The gcc the plugin will be built for (the same used building dragonegg) GCC = "gcc"; - buildInputs = [ llvm gmp mpfr mpc ncurses zlib ]; + buildInputs = [ llvm gmp mpfr libmpc ncurses zlib ]; installPhase = '' mkdir -p $out/lib $out/share/doc/${name} diff --git a/pkgs/development/libraries/mpc/default.nix b/pkgs/development/libraries/libmpc/default.nix similarity index 100% rename from pkgs/development/libraries/mpc/default.nix rename to pkgs/development/libraries/libmpc/default.nix diff --git a/pkgs/development/misc/avr-gcc-with-avr-libc/default.nix b/pkgs/development/misc/avr-gcc-with-avr-libc/default.nix index 8c0854ef3de4..4b1dca9855a1 100644 --- a/pkgs/development/misc/avr-gcc-with-avr-libc/default.nix +++ b/pkgs/development/misc/avr-gcc-with-avr-libc/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, writeTextFile, coreutils, gnumake, gcc, gnutar, bzip2 , gnugrep, gnused, gawk, diffutils, patch - , gmp, mpfr, mpc }: + , gmp, mpfr, libmpc }: stdenv.mkDerivation { name = "avr-gcc-libc"; @@ -40,7 +40,7 @@ stdenv.mkDerivation { mkdir -p "$out" export > env-vars - for i in "${gmp}" "${mpfr}" "${mpc}"; do + for i in "${gmp}" "${mpfr}" "${libmpc}"; do export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$i/include " export NIX_LDFLAGS="$NIX_LDFLAGS -L$i/lib " done diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index f1b5ae0dd1e0..e82338450688 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -207,7 +207,7 @@ rec { # reduces the size of the stdenv closure. gmp = pkgs.gmp.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; }; mpfr = pkgs.mpfr.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; }; - mpc = pkgs.mpc.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; }; + libmpc = pkgs.libmpc.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; }; isl = pkgs.isl.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; }; cloog = pkgs.cloog.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; }; gccPlain = pkgs.gcc.cc; diff --git a/pkgs/stdenv/linux/make-bootstrap-tools-crosspi.nix b/pkgs/stdenv/linux/make-bootstrap-tools-crosspi.nix index 90f89cc0c784..1d2919919b1e 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools-crosspi.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools-crosspi.nix @@ -81,7 +81,7 @@ let cloog = pkgs.cloog.crossDrv; zlib = pkgs.zlib.crossDrv; isl = pkgs.isl.crossDrv; - mpc = pkgs.mpc.crossDrv; + libmpc = pkgs.libmpc.crossDrv; binutils = pkgs.binutils.crossDrv; klibc = pkgs.linuxPackages.klibc.crossDrv; @@ -188,7 +188,7 @@ rec { cp -d ${cloog}/lib/libcloog*.so* $out/lib cp -d ${ppl}/lib/libppl*.so* $out/lib cp -d ${isl}/lib/libisl*.so* $out/lib - cp -d ${mpc}/lib/libmpc*.so* $out/lib + cp -d ${libmpc}/lib/libmpc*.so* $out/lib cp -d ${zlib}/lib/libz.so* $out/lib # Copy binutils. diff --git a/pkgs/stdenv/linux/make-bootstrap-tools.nix b/pkgs/stdenv/linux/make-bootstrap-tools.nix index 16a1d513afe3..a836f6fdd378 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools.nix @@ -113,7 +113,7 @@ rec { cp -d ${gmpxx}/lib/libgmp*.so* $out/lib cp -d ${mpfr}/lib/libmpfr*.so* $out/lib - cp -d ${mpc}/lib/libmpc*.so* $out/lib + cp -d ${libmpc}/lib/libmpc*.so* $out/lib cp -d ${zlib}/lib/libz.so* $out/lib cp -d ${libelf}/lib/libelf.so* $out/lib diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c3d787fbff44..db155f185aed 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3185,7 +3185,7 @@ let })); gcc45 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/4.5 { - inherit fetchurl stdenv gmp mpfr mpc libelf zlib perl + inherit fetchurl stdenv gmp mpfr libmpc libelf zlib perl gettext which noSysDirs; texinfo = texinfo4; @@ -6583,7 +6583,7 @@ let mp4v2 = callPackage ../development/libraries/mp4v2 { }; - mpc = callPackage ../development/libraries/mpc { }; + libmpc = callPackage ../development/libraries/libmpc { }; mpich2 = callPackage ../development/libraries/mpich2 { }; From 365ce3ddba0554c1a8c0ac0abd343ac907d04e66 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 19 Jan 2015 23:24:47 +0100 Subject: [PATCH 25/29] openjdk-bootstrap: Don't depend on the length of the Glibc version Building the bootstrap OpenJDK failed if the Glibc version string is not 4 characters, e.g. "2.12.1" would cause a corrupt tarball. --- pkgs/development/compilers/openjdk/bootstrap.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/openjdk/bootstrap.nix b/pkgs/development/compilers/openjdk/bootstrap.nix index 222ab010c264..890064538cc0 100644 --- a/pkgs/development/compilers/openjdk/bootstrap.nix +++ b/pkgs/development/compilers/openjdk/bootstrap.nix @@ -16,9 +16,13 @@ let in runCommand "openjdk-bootstrap" {} '' - xz -dc ${src} | sed "s/e*-glibc-[^/]*/$(basename ${glibc})/g" | tar xv + tar xvf ${src} mv openjdk-bootstrap $out + for i in $out/bin/*; do + patchelf --set-interpreter ${glibc}/lib/ld-linux*.so.2 $i + done + # Temporarily, while NixOS's OpenJDK bootstrap tarball doesn't have PaX markings: exes=$(${file}/bin/file $out/bin/* 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//') for file in $exes; do From cd993d0e10b1bcc02d579843902398fbdb702e81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 20 Jan 2015 13:41:30 +0100 Subject: [PATCH 26/29] perl DB_file: fix build by not changing $out/lib/perl5 The package already installs into $oul/lib/perl5/site_perl by itself. Presumably it broke after d0bad145f5 due to removing perllocal.pod (because this compiles on master and not here). --- pkgs/development/perl-modules/DB_File/default.nix | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pkgs/development/perl-modules/DB_File/default.nix b/pkgs/development/perl-modules/DB_File/default.nix index 4195f8d613e7..7dd04463d18f 100644 --- a/pkgs/development/perl-modules/DB_File/default.nix +++ b/pkgs/development/perl-modules/DB_File/default.nix @@ -16,12 +16,4 @@ buildPerlPackage rec { INCLUDE = ${db}/include EOF ''; - - # I don't know about perl paths, but PERL5LIB env var is managed through - # lib/perl5/site_perl, and the *.pm should be inside lib/perl5/site_perl/... - # for other packages to get that in the PERL5LIB env var. - postInstall = '' - mkdir -p $out/lib/perl5/site_perl/ - cp -R $out/lib/perl5/5* $out/lib/perl5/site_perl - ''; } From 9bccb95a82de93d0419495acaf0ae0af581d4642 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Sun, 25 Jan 2015 23:29:06 -0500 Subject: [PATCH 27/29] cc-wrapper: Fix for cross-compiling Fixes #5949 Suggested by @ambrop72 --- pkgs/build-support/cc-wrapper/setup-hook.sh | 9 +++++++-- pkgs/build-support/gcc-cross-wrapper/setup-hook.sh | 3 +++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/cc-wrapper/setup-hook.sh b/pkgs/build-support/cc-wrapper/setup-hook.sh index cd98f57ee937..e23d7f4cf12b 100644 --- a/pkgs/build-support/cc-wrapper/setup-hook.sh +++ b/pkgs/build-support/cc-wrapper/setup-hook.sh @@ -34,5 +34,10 @@ if [ -n "@coreutils@" ]; then addToSearchPath PATH @coreutils@/bin fi -export CC=@real_cc@ -export CXX=@real_cxx@ +if [ -z "$crossConfig" ]; then + export CC=@real_cc@ + export CXX=@real_cxx@ +else + export BUILD_CC=@real_cc@ + export BUILD_CXX=@real_cxx@ +fi diff --git a/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh b/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh index ce5f6e56136e..599954bd127d 100644 --- a/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh +++ b/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh @@ -85,3 +85,6 @@ if test "$NIX_NO_SELF_RPATH" != "1"; then export NIX_CROSS_LDFLAGS="-rpath $out/lib64 -rpath-link $out/lib $NIX_CROSS_LDFLAGS" fi fi + +export CC=${crossConfig}-gcc +export CXX=${crossConfig}-g++ From a628d6ee188b2513f0c62d9349a3fa2997709c74 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 26 Jan 2015 23:42:36 +0100 Subject: [PATCH 28/29] bash: Update to 4.3-p30 --- pkgs/shells/bash/bash-4.3-patches.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/shells/bash/bash-4.3-patches.nix b/pkgs/shells/bash/bash-4.3-patches.nix index cd1fb578e62b..49360bd9a026 100644 --- a/pkgs/shells/bash/bash-4.3-patches.nix +++ b/pkgs/shells/bash/bash-4.3-patches.nix @@ -31,4 +31,7 @@ patch: [ (patch "028" "17a65c4fn4c5rgsiw9gqqnzhznh3gwnd2xzzv2dppyi48znxpc78") (patch "029" "14k27p28r5l2fz3r03kd0x72vvsq8bja8c6hjz5kxikbzsbs7i2c") (patch "030" "0nrqb0m7s89qsrbfaffpilc5gcf82bx9yvgzld4hr79p5y54yhw5") +(patch "031" "07d62bl3z7qa8v6kgk47vzzazw563mlk9zhrsr4xsbqgvmcrylnd") +(patch "032" "0jjgapfq4qhmndfrw8c3q3lva8xjdhlbd9cc631v41b0kb95g4w8") +(patch "033" "05ma5rlxiadnfh925p4y7s0vvk917kmsdb1mfdx05gizl63pfapv") ] From 0caae022fd5baa1c96bec716d18a3906b6776911 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 26 Jan 2015 23:48:56 +0100 Subject: [PATCH 29/29] xz: Update to 5.2.0 --- pkgs/tools/compression/xz/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/compression/xz/default.nix b/pkgs/tools/compression/xz/default.nix index 70c3f260e3c8..fbafe3301338 100644 --- a/pkgs/tools/compression/xz/default.nix +++ b/pkgs/tools/compression/xz/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl }: stdenv.mkDerivation rec { - name = "xz-5.0.7"; + name = "xz-5.2.0"; src = fetchurl { url = "http://tukaani.org/xz/${name}.tar.bz2"; - sha256 = "05nnxl19a49h15lxzpn3fd76izrycnr7qaf9qvd408yz973iv1g8"; + sha256 = "19f4kkydyjv240y78qnvi6vi6pfxf7d2386cnclh4rx1ams7sdgp"; }; doCheck = true; @@ -13,6 +13,8 @@ stdenv.mkDerivation rec { # In stdenv-linux, prevent a dependency on bootstrap-tools. preConfigure = "unset CONFIG_SHELL"; + postInstall = "rm -rf $out/share/doc"; + meta = { homepage = http://tukaani.org/xz/; description = "XZ, general-purpose data compression software, successor of LZMA";