1{
2 lib,
3 localSystem,
4 crossSystem,
5 config,
6 overlays,
7 crossOverlays ? [ ],
8}:
9
10assert crossSystem == localSystem;
11
12let
13 bootStages = import ../. {
14 inherit
15 lib
16 localSystem
17 crossSystem
18 overlays
19 ;
20 # Remove config.replaceStdenv to ensure termination.
21 config = builtins.removeAttrs config [ "replaceStdenv" ];
22 };
23
24in
25bootStages
26++ [
27
28 # Additional stage, built using custom stdenv
29 (vanillaPackages: {
30 inherit config overlays;
31 stdenv =
32 assert vanillaPackages.stdenv.hostPlatform == localSystem;
33 assert vanillaPackages.stdenv.targetPlatform == localSystem;
34 config.replaceStdenv { pkgs = vanillaPackages; };
35 })
36
37]