mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
4751d9e5ad
- Non-cross stdenvs are honest and assert that `crossSystem` is null - `crossSystem` is a mandatory argument to top-level/stage.nix, just like `system` and `platform` - Broken default arguments on stdenvs for testing are gone. - All stdenvs (but little-used stdenvNix) take the same arguments for easy testing.
23 lines
578 B
Nix
23 lines
578 B
Nix
{ lib, allPackages
|
|
, system, platform, crossSystem, config
|
|
}:
|
|
|
|
assert crossSystem == null;
|
|
|
|
rec {
|
|
vanillaStdenv = import ../. {
|
|
inherit lib allPackages system platform crossSystem;
|
|
# Remove config.replaceStdenv to ensure termination.
|
|
config = builtins.removeAttrs config [ "replaceStdenv" ];
|
|
};
|
|
|
|
buildPackages = allPackages {
|
|
inherit system platform crossSystem config;
|
|
# It's OK to change the built-time dependencies
|
|
allowCustomOverrides = true;
|
|
stdenv = vanillaStdenv;
|
|
};
|
|
|
|
stdenvCustom = config.replaceStdenv { pkgs = buildPackages; };
|
|
}
|