summaryrefslogtreecommitdiffstats
path: root/pkgs/stdenv/darwin
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2017-08-26 11:43:30 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2017-09-01 11:44:56 -0400
commitdbf6d20d64af8572ae4a24850244befc475eea9e (patch)
treeda102645847225204b7c6e52e64ea6fb398b2a7a /pkgs/stdenv/darwin
parent3f30cffa559e105017a1f88a8f3667a11a416870 (diff)
binutils-wrapper: Import separately from cc-wrapper
Diffstat (limited to 'pkgs/stdenv/darwin')
-rw-r--r--pkgs/stdenv/darwin/default.nix55
1 files changed, 35 insertions, 20 deletions
diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix
index f4801d674e8a..d71cda7f8a96 100644
--- a/pkgs/stdenv/darwin/default.nix
+++ b/pkgs/stdenv/darwin/default.nix
@@ -63,10 +63,40 @@ in rec {
extraBuildInputs,
allowedRequisites ? null}:
let
+ buildPackages = lib.optionalAttrs (last ? stdenv) {
+ inherit (last) stdenv;
+ };
+
+ coreutils = { name = "coreutils-9.9.9"; outPath = bootstrapTools; };
+ gnugrep = { name = "gnugrep-9.9.9"; outPath = bootstrapTools; };
+
+ binutils = import ../../build-support/binutils-wrapper {
+ inherit shell;
+ inherit (last) stdenv;
+
+ nativeTools = false;
+ nativeLibc = false;
+ inherit buildPackages coreutils gnugrep;
+ libc = last.pkgs.darwin.Libsystem;
+ binutils = { name = "binutils-9.9.9"; outPath = bootstrapTools; };
+ };
+
+ cc = if isNull last then "/dev/null" else import ../../build-support/cc-wrapper {
+ inherit shell;
+ inherit (last) stdenv;
+
+ nativeTools = false;
+ nativeLibc = false;
+ inherit buildPackages coreutils gnugrep binutils;
+ libc = last.pkgs.darwin.Libsystem;
+ isClang = true;
+ cc = { name = "clang-9.9.9"; outPath = bootstrapTools; };
+ };
+
thisStdenv = import ../generic {
inherit config shell extraNativeBuildInputs extraBuildInputs;
allowedRequisites = if allowedRequisites == null then null else allowedRequisites ++ [
- thisStdenv.cc.expand-response-params
+ cc.expand-response-params cc.binutils
];
name = "stdenv-darwin-boot-${toString step}";
@@ -75,24 +105,9 @@ in rec {
hostPlatform = localSystem;
targetPlatform = localSystem;
- cc = if isNull last then "/dev/null" else import ../../build-support/cc-wrapper {
- inherit shell;
- inherit (last) stdenv;
-
- nativeTools = false;
- nativeLibc = false;
- buildPackages = lib.optionalAttrs (last ? stdenv) {
- inherit (last) stdenv;
- };
- libc = last.pkgs.darwin.Libsystem;
- isClang = true;
- cc = { name = "clang-9.9.9"; outPath = bootstrapTools; };
- binutils = { name = "binutils-9.9.9"; outPath = bootstrapTools; };
- coreutils = { name = "coreutils-9.9.9"; outPath = bootstrapTools; };
- gnugrep = { name = "gnugrep-9.9.9"; outPath = bootstrapTools; };
- };
+ inherit cc;
- preHook = stage0.stdenv.lib.optionalString (shell == "${bootstrapTools}/bin/bash") ''
+ preHook = lib.optionalString (shell == "${bootstrapTools}/bin/bash") ''
# Don't patch #!/interpreter because it leads to retained
# dependencies on the bootstrapTools in the final stdenv.
dontPatchShebangs=1
@@ -350,8 +365,8 @@ in rec {
xz.out xz.bin libcxx libcxxabi gmp.out gnumake findutils bzip2.out
bzip2.bin llvmPackages.llvm llvmPackages.llvm.lib zlib.out zlib.dev libffi.out coreutils ed diffutils gnutar
gzip ncurses.out ncurses.dev ncurses.man gnused bash gawk
- gnugrep llvmPackages.clang-unwrapped patch pcre.out binutils-raw.out
- binutils-raw.dev binutils gettext
+ gnugrep llvmPackages.clang-unwrapped patch pcre.out gettext
+ binutils-raw.binutils.out binutils-raw.binutils.dev binutils binutils.binutils
cc.expand-response-params
]) ++ (with pkgs.darwin; [
dyld Libsystem CF cctools ICU libiconv locale