lol
1{ lib
2, localSystem, crossSystem, config, overlays
3}:
4
5let
6 bootStages = import ../. {
7 inherit lib localSystem overlays;
8 crossSystem = null;
9 # Ignore custom stdenvs when cross compiling for compatability
10 config = builtins.removeAttrs config [ "replaceStdenv" ];
11 };
12
13in bootStages ++ [
14
15 # Build Packages
16 (vanillaPackages: {
17 inherit config overlays;
18 selfBuild = false;
19 stdenv =
20 assert vanillaPackages.hostPlatform == localSystem;
21 assert vanillaPackages.targetPlatform == localSystem;
22 vanillaPackages.stdenv.override { targetPlatform = crossSystem; };
23 # It's OK to change the built-time dependencies
24 allowCustomOverrides = true;
25 })
26
27 # Run Packages
28 (buildPackages: {
29 inherit config overlays;
30 selfBuild = false;
31 stdenv = buildPackages.makeStdenvCross {
32 inherit (buildPackages) stdenv;
33 buildPlatform = localSystem;
34 hostPlatform = crossSystem;
35 targetPlatform = crossSystem;
36 cc = if crossSystem.useiOSCross or false
37 then buildPackages.darwin.ios-cross
38 else buildPackages.gccCrossStageFinal;
39 };
40 })
41
42]