summary refs log tree commit diff
path: root/pkgs/stdenv/generic/setup.sh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-02-28 01:13:15 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-02-28 01:13:15 +0100
commit2040a9ac574fffd36fe20130897ccec2d5928827 (patch)
tree1a76a57c422ee49c7f61c3804d4222600de08fdb /pkgs/stdenv/generic/setup.sh
parent559ecc92127873d2075dc1c24dad986bc1ff868a (diff)
downloadnixlib-2040a9ac574fffd36fe20130897ccec2d5928827.tar
nixlib-2040a9ac574fffd36fe20130897ccec2d5928827.tar.gz
nixlib-2040a9ac574fffd36fe20130897ccec2d5928827.tar.bz2
nixlib-2040a9ac574fffd36fe20130897ccec2d5928827.tar.lz
nixlib-2040a9ac574fffd36fe20130897ccec2d5928827.tar.xz
nixlib-2040a9ac574fffd36fe20130897ccec2d5928827.tar.zst
nixlib-2040a9ac574fffd36fe20130897ccec2d5928827.zip
stdenv-linux: Ensure binutils comes before bootstrapTools in $PATH
Otherwise, when building glibc and other packages, the "strip" from
bootstrapTools is used, which doesn't recognise some tags produced by
the newer "ld" from binutils.
Diffstat (limited to 'pkgs/stdenv/generic/setup.sh')
-rw-r--r--pkgs/stdenv/generic/setup.sh16
1 files changed, 4 insertions, 12 deletions
diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh
index b49846fa050c..97eb855d3594 100644
--- a/pkgs/stdenv/generic/setup.sh
+++ b/pkgs/stdenv/generic/setup.sh
@@ -214,7 +214,6 @@ PATH=
 for i in $initialPath; do
     if [ "$i" = / ]; then i=; fi
     addToSearchPath PATH $i/bin
-    addToSearchPath PATH $i/sbin
 done
 
 if [ "$NIX_DEBUG" = 1 ]; then
@@ -262,6 +261,10 @@ findInputs() {
         source "$pkg"
     fi
 
+    if [ -d $1/bin ]; then
+        addToSearchPath _PATH $1/bin
+    fi
+
     if [ -f "$pkg/nix-support/setup-hook" ]; then
         source "$pkg/nix-support/setup-hook"
     fi
@@ -289,10 +292,6 @@ done
 _addToNativeEnv() {
     local pkg=$1
 
-    if [ -d $1/bin ]; then
-        addToSearchPath _PATH $1/bin
-    fi
-
     # Run the package-specific hooks set by the setup-hook scripts.
     runHook envHook "$pkg"
 }
@@ -304,13 +303,6 @@ done
 _addToCrossEnv() {
     local pkg=$1
 
-    # Some programs put important build scripts (freetype-config and similar)
-    # into their crossDrv bin path. Intentionally these should go after
-    # the nativePkgs in PATH.
-    if [ -d $1/bin ]; then
-        addToSearchPath _PATH $1/bin
-    fi
-
     # Run the package-specific hooks set by the setup-hook scripts.
     runHook crossEnvHook "$pkg"
 }