summary refs log tree commit diff
path: root/pkgs/stdenv/darwin
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-03-23 18:11:42 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-03-23 18:15:16 +0100
commit7fc24dfd21e39a61faff949fcb73170d80dc09df (patch)
tree93f3b0df5dd3dd3aa6e30a81334eb184f5399be1 /pkgs/stdenv/darwin
parent9ed00ff086166b4ae7e0fe393942132da7525c75 (diff)
downloadnixpkgs-7fc24dfd21e39a61faff949fcb73170d80dc09df.tar
nixpkgs-7fc24dfd21e39a61faff949fcb73170d80dc09df.tar.gz
nixpkgs-7fc24dfd21e39a61faff949fcb73170d80dc09df.tar.bz2
nixpkgs-7fc24dfd21e39a61faff949fcb73170d80dc09df.tar.lz
nixpkgs-7fc24dfd21e39a61faff949fcb73170d80dc09df.tar.xz
nixpkgs-7fc24dfd21e39a61faff949fcb73170d80dc09df.tar.zst
nixpkgs-7fc24dfd21e39a61faff949fcb73170d80dc09df.zip
stdenv-darwin: Fix dependency on bootstrapTools
Commit 2040a9ac574fffd36fe20130897ccec2d5928827 changed the order of
$PATH elements, causing initialpath to appear after buildInputs. Thus
gnugrep ended up depending on bin/sh from bootstrapTools, rather than
from pkgs.bash. The fix is to provide pkgs.bash via buildInputs rather
than initialPath.

http://hydra.nixos.org/build/33276697
Diffstat (limited to 'pkgs/stdenv/darwin')
-rw-r--r--pkgs/stdenv/darwin/default.nix12
1 files changed, 7 insertions, 5 deletions
diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix
index fa6bb55009d..e73e3969253 100644
--- a/pkgs/stdenv/darwin/default.nix
+++ b/pkgs/stdenv/darwin/default.nix
@@ -55,8 +55,7 @@ in rec {
   stageFun = step: last: {shell             ? "${bootstrapTools}/bin/sh",
                           overrides         ? (pkgs: {}),
                           extraPreHook      ? "",
-                          extraBuildInputs  ? with last.pkgs; [ xz darwin.CF libcxx ],
-                          extraInitialPath  ? [],
+                          extraBuildInputs,
                           allowedRequisites ? null}:
     let
       thisStdenv = import ../generic {
@@ -85,7 +84,7 @@ in rec {
           ${commonPreHook}
           ${extraPreHook}
         '';
-        initialPath  = extraInitialPath ++ [ bootstrapTools ];
+        initialPath  = [ bootstrapTools ];
         fetchurlBoot = import ../../build-support/fetchurl {
           stdenv = stage0.stdenv;
           curl   = bootstrapTools;
@@ -174,6 +173,8 @@ in rec {
       export PATH_LOCALE=${pkgs.darwin.locale}/share/locale
     '';
 
+    extraBuildInputs = with pkgs; [ xz darwin.CF libcxx ];
+
     allowedRequisites =
       [ bootstrapTools ] ++
       (with pkgs; [ xz libcxx libcxxabi icu ]) ++
@@ -203,9 +204,10 @@ in rec {
     # enables patchShebangs above. Unfortunately, patchShebangs ignores our $SHELL setting
     # and instead goes by $PATH, which happens to contain bootstrapTools. So it goes and
     # patches our shebangs back to point at bootstrapTools. This makes sure bash comes first.
-    extraInitialPath = [ pkgs.bash ];
+    extraBuildInputs = with pkgs; [ xz darwin.CF libcxx pkgs.bash ];
 
     extraPreHook = ''
+      export PATH=${pkgs.bash}/bin:$PATH
       export PATH_LOCALE=${pkgs.darwin.locale}/share/locale
     '';
 
@@ -236,7 +238,7 @@ in rec {
 
   stage4 = with stage3; stageFun 4 stage3 {
     shell = "${pkgs.bash}/bin/bash";
-    extraInitialPath = [ pkgs.bash ];
+    extraBuildInputs = with pkgs; [ xz darwin.CF libcxx pkgs.bash ];
     extraPreHook = ''
       export PATH_LOCALE=${pkgs.darwin.locale}/share/locale
     '';