92edcb7ebb
The long term goal is a big replace: { inherit system platform; } => buildPlatform crossSystem => hostPlatform stdenv.cross => targetPlatform And additionally making sure each is defined even when not cross compiling. This commit refactors the bootstrapping code along that vision, but leaves the old identifiers with their null semantics in place so packages can be modernized incrementally.
25 lines
581 B
Nix
25 lines
581 B
Nix
{ lib
|
|
, localSystem, crossSystem, config, overlays
|
|
}:
|
|
|
|
assert crossSystem == null;
|
|
|
|
let
|
|
bootStages = import ../. {
|
|
inherit lib localSystem crossSystem overlays;
|
|
# Remove config.replaceStdenv to ensure termination.
|
|
config = builtins.removeAttrs config [ "replaceStdenv" ];
|
|
};
|
|
|
|
in bootStages ++ [
|
|
|
|
# Additional stage, built using custom stdenv
|
|
(vanillaPackages: {
|
|
buildPlatform = localSystem;
|
|
hostPlatform = localSystem;
|
|
targetPlatform = localSystem;
|
|
inherit config overlays;
|
|
stdenv = config.replaceStdenv { pkgs = vanillaPackages; };
|
|
})
|
|
|
|
]
|