diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 6739ce3f5c8..f4801d674e8 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -79,15 +79,17 @@ in rec { inherit shell; inherit (last) stdenv; - nativeTools = true; - nativePrefix = bootstrapTools; + 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; }; + 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; }; }; preHook = stage0.stdenv.lib.optionalString (shell == "${bootstrapTools}/bin/bash") '' @@ -267,7 +269,16 @@ in rec { extraPreHook = '' export PATH_LOCALE=${pkgs.darwin.locale}/share/locale ''; - overrides = persistent; + overrides = self: super: (persistent self super) // { + # Hack to make sure we don't link ncurses in bootstrap tools. The proper + # solution is to avoid passing -L/nix-store/...-bootstrap-tools/lib, + # quite a sledgehammer just to get the C runtime. + gettext = super.gettext.overrideAttrs (old: { + configureFlags = old.configureFlags ++ [ + "--disable-curses" + ]; + }); + }; }; stdenvDarwin = prevStage: let