Files
nixpkgs/pkgs/stdenv/nix/default.nix
Aliaksandr 2dd1349006 stdenv: stop passing crossSystem to local stages
The dispatcher now constructs local bootstrap stages directly, so their target is represented entirely by localSystem. Remove the redundant crossSystem arguments and equality assertions from each local stage implementation.

Assisted-by: codex with gpt-5.6-sol-high
2026-07-19 00:11:51 +03:00

71 lines
1.5 KiB
Nix

{
lib,
localSystem,
config,
overlays,
bootStages,
}:
let
genericStdenv = import ../generic { defaultConfig = config; };
in
bootStages
++ [
(prevStage: {
inherit config overlays;
stdenv = genericStdenv rec {
inherit (prevStage.stdenv) buildPlatform hostPlatform targetPlatform;
preHook = ''
export NIX_ENFORCE_PURITY="''${NIX_ENFORCE_PURITY-1}"
export NIX_ENFORCE_NO_NATIVE="''${NIX_ENFORCE_NO_NATIVE-1}"
export NIX_IGNORE_LD_THROUGH_GCC=1
'';
initialPath = (import ../generic/common-path.nix) { pkgs = prevStage; };
cc = import ../../build-support/cc-wrapper {
inherit lib;
nativeTools = false;
nativePrefix = lib.optionalString hostPlatform.isSunOS "/usr";
nativeLibc = true;
inherit (prevStage)
stdenvNoCC
binutils
coreutils
gnugrep
;
cc = prevStage.gcc.cc;
isGNU = true;
shell = prevStage.bash + "/bin/sh";
};
shell = prevStage.bash + "/bin/sh";
fetchurlBoot = prevStage.stdenv.fetchurlBoot;
overrides = self: super: {
inherit cc;
inherit (cc) binutils;
inherit (prevStage)
gzip
bzip2
xz
bash
coreutils
diffutils
findutils
gawk
gnumake
gnused
gnutar
gnugrep
gnupatch
perl
;
};
};
})
]