core/pkgs/stdenv/custom/default.nix

26 lines
633 B
Nix
Raw Normal View History

2024-05-02 00:46:19 +00:00
{ lib
, localSystem, crossSystem, config, overlays, crossOverlays ? []
}:
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; };
})
]