2016-12-16 13:22:02 +00:00
|
|
|
{ lib
|
2018-12-05 03:06:46 +00:00
|
|
|
, crossSystem, localSystem, config, overlays
|
2016-12-16 13:22:02 +00:00
|
|
|
, bootStages
|
|
|
|
, ...
|
|
|
|
}:
|
|
|
|
|
2018-12-05 03:06:46 +00:00
|
|
|
assert crossSystem == localSystem;
|
2016-12-16 13:22:02 +00:00
|
|
|
|
|
|
|
bootStages ++ [
|
2017-09-20 15:07:52 +00:00
|
|
|
(prevStage: {
|
2016-12-24 18:55:11 +00:00
|
|
|
inherit config overlays;
|
2016-12-16 13:22:02 +00:00
|
|
|
|
|
|
|
stdenv = import ../generic rec {
|
|
|
|
inherit config;
|
|
|
|
|
2017-08-21 22:26:08 +00:00
|
|
|
inherit (prevStage.stdenv) buildPlatform hostPlatform targetPlatform;
|
|
|
|
|
2016-12-16 13:22:02 +00:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2022-07-29 22:24:00 +00:00
|
|
|
initialPath = (import ../generic/common-path.nix) { pkgs = prevStage; };
|
2016-12-16 13:22:02 +00:00
|
|
|
|
|
|
|
cc = import ../../build-support/cc-wrapper {
|
2021-04-21 15:56:55 +00:00
|
|
|
inherit lib;
|
2016-12-16 13:22:02 +00:00
|
|
|
nativeTools = false;
|
2017-09-20 15:07:52 +00:00
|
|
|
nativePrefix = lib.optionalString hostPlatform.isSunOS "/usr";
|
2016-12-16 13:22:02 +00:00
|
|
|
nativeLibc = true;
|
2017-09-20 15:07:52 +00:00
|
|
|
inherit (prevStage) stdenvNoCC binutils coreutils gnugrep;
|
2016-12-16 13:22:02 +00:00
|
|
|
cc = prevStage.gcc.cc;
|
|
|
|
isGNU = true;
|
|
|
|
shell = prevStage.bash + "/bin/sh";
|
|
|
|
};
|
|
|
|
|
|
|
|
shell = prevStage.bash + "/bin/sh";
|
|
|
|
|
2017-09-20 15:07:52 +00:00
|
|
|
fetchurlBoot = prevStage.stdenv.fetchurlBoot;
|
2016-12-16 13:22:02 +00:00
|
|
|
|
|
|
|
overrides = self: super: {
|
|
|
|
inherit cc;
|
|
|
|
inherit (cc) binutils;
|
|
|
|
inherit (prevStage)
|
|
|
|
gzip bzip2 xz bash coreutils diffutils findutils gawk
|
|
|
|
gnumake gnused gnutar gnugrep gnupatch perl;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
})
|
|
|
|
]
|