a3a6ad7a01
crossOverlays only apply to the packages being built, not the build packages. It is useful when you don’t care what is used to build your packages, just what is being built. The idea relies heavily on the cross compiling infrastructure. Using this implies that we need to create a cross stdenv.
26 lines
613 B
Nix
26 lines
613 B
Nix
{ lib
|
|
, localSystem, crossSystem, config, overlays
|
|
}:
|
|
|
|
assert crossSystem == localSystem;
|
|
|
|
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: {
|
|
inherit config overlays;
|
|
stdenv =
|
|
assert vanillaPackages.hostPlatform == localSystem;
|
|
assert vanillaPackages.targetPlatform == localSystem;
|
|
config.replaceStdenv { pkgs = vanillaPackages; };
|
|
})
|
|
|
|
]
|