d349f9a340
cc-wrapper may wrap a cc-compiler, but it doesn't need one to build itself. (c.f. expand-response-params is a separate derivation.) This helps avoid cycles on the cross stuff, in addition to removing a useless dependency edge. I could have been super careful with overrides in the stdenv to avoid the mass rebuild, but I don't think it's worth it.
49 lines
1.2 KiB
Nix
49 lines
1.2 KiB
Nix
{ lib
|
|
, crossSystem, config, overlays
|
|
, bootStages
|
|
, ...
|
|
}:
|
|
|
|
assert crossSystem == null;
|
|
|
|
bootStages ++ [
|
|
(prevStage: {
|
|
inherit config overlays;
|
|
|
|
stdenv = import ../generic rec {
|
|
inherit config;
|
|
|
|
inherit (prevStage.stdenv) buildPlatform hostPlatform targetPlatform;
|
|
|
|
preHook = ''
|
|
export NIX_ENFORCE_PURITY="''${NIX_ENFORCE_PURITY-1}"
|
|
export NIX_ENFORCE_NO_NATIVE="''${NIX_ENFORCE_NO_NATIVE-1}"
|
|
export NIX_IGNORE_LD_THROUGH_GCC=1
|
|
'';
|
|
|
|
initialPath = (import ../common-path.nix) { pkgs = prevStage; };
|
|
|
|
cc = import ../../build-support/cc-wrapper {
|
|
nativeTools = false;
|
|
nativePrefix = lib.optionalString hostPlatform.isSunOS "/usr";
|
|
nativeLibc = true;
|
|
inherit (prevStage) stdenvNoCC binutils coreutils gnugrep;
|
|
cc = prevStage.gcc.cc;
|
|
isGNU = true;
|
|
shell = prevStage.bash + "/bin/sh";
|
|
};
|
|
|
|
shell = prevStage.bash + "/bin/sh";
|
|
|
|
fetchurlBoot = prevStage.stdenv.fetchurlBoot;
|
|
|
|
overrides = self: super: {
|
|
inherit cc;
|
|
inherit (cc) binutils;
|
|
inherit (prevStage)
|
|
gzip bzip2 xz bash coreutils diffutils findutils gawk
|
|
gnumake gnused gnutar gnugrep gnupatch perl;
|
|
};
|
|
};
|
|
})
|
|
]
|