diff --git a/pkgs/stdenv/cross/default.nix b/pkgs/stdenv/cross/default.nix index b194c780a319..f2adc91e2bb1 100644 --- a/pkgs/stdenv/cross/default.nix +++ b/pkgs/stdenv/cross/default.nix @@ -4,7 +4,7 @@ crossSystem, config, overlays, - crossOverlays ? [ ], + crossOverlays, }: let diff --git a/pkgs/stdenv/custom/default.nix b/pkgs/stdenv/custom/default.nix index 4520f0c9905a..b6fefa7c912e 100644 --- a/pkgs/stdenv/custom/default.nix +++ b/pkgs/stdenv/custom/default.nix @@ -4,7 +4,6 @@ crossSystem, config, overlays, - crossOverlays ? [ ], }: assert crossSystem == localSystem; diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 48c2db483e4a..d7e0dbf2c6ee 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -13,7 +13,6 @@ crossSystem, config, overlays, - crossOverlays ? [ ], # Allow passing in bootstrap files directly so we can test the stdenv bootstrap process when changing the bootstrap tools bootstrapFiles ? (config.replaceBootstrapFiles or lib.id) ( if localSystem.isAarch64 then diff --git a/pkgs/stdenv/default.nix b/pkgs/stdenv/default.nix index 3cbe274a2f0e..9e573477f290 100644 --- a/pkgs/stdenv/default.nix +++ b/pkgs/stdenv/default.nix @@ -12,32 +12,41 @@ crossSystem, config, overlays, - crossOverlays ? [ ], -}@args: + crossOverlays, +}: let + commonArgs = { + inherit + lib + localSystem + crossSystem + config + overlays + ; + }; # The native (i.e., impure) build environment. This one uses the # tools installed on the system outside of the Nix environment, # i.e., the stuff in /bin, /usr/bin, etc. This environment should # be used with care, since many Nix packages will not build properly # with it (e.g., because they require GNU Make). - stagesNative = import ./native args; + stagesNative = import ./native commonArgs; # The Nix build environment. - stagesNix = import ./nix (args // { bootStages = stagesNative; }); + stagesNix = import ./nix (commonArgs // { bootStages = stagesNative; }); - stagesFreeBSD = import ./freebsd args; + stagesFreeBSD = import ./freebsd commonArgs; # On Linux systems, the standard build environment consists of Nix-built # instances glibc and the `standard' Unix tools, i.e., the Posix utilities, # the GNU C compiler, and so on. - stagesLinux = import ./linux args; + stagesLinux = import ./linux commonArgs; - stagesDarwin = import ./darwin args; + stagesDarwin = import ./darwin commonArgs; - stagesCross = import ./cross args; + stagesCross = import ./cross (commonArgs // { inherit crossOverlays; }); - stagesCustom = import ./custom args; + stagesCustom = import ./custom commonArgs; in # Select the appropriate stages for the platform `system'. diff --git a/pkgs/stdenv/freebsd/default.nix b/pkgs/stdenv/freebsd/default.nix index 7ede014f80f1..61c386b8437b 100644 --- a/pkgs/stdenv/freebsd/default.nix +++ b/pkgs/stdenv/freebsd/default.nix @@ -6,7 +6,6 @@ crossSystem, config, overlays, - crossOverlays ? [ ], bootstrapFiles ? let table = { diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index feb7f90a147f..77fb996d376b 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -59,8 +59,6 @@ crossSystem, config, overlays, - crossOverlays ? [ ], - bootstrapFiles ? let table = { diff --git a/pkgs/stdenv/native/default.nix b/pkgs/stdenv/native/default.nix index 697e593e205a..690107af303f 100644 --- a/pkgs/stdenv/native/default.nix +++ b/pkgs/stdenv/native/default.nix @@ -4,7 +4,6 @@ crossSystem, config, overlays, - crossOverlays ? [ ], }: assert crossSystem == localSystem; diff --git a/pkgs/stdenv/nix/default.nix b/pkgs/stdenv/nix/default.nix index 84998fa52581..f85971479bee 100644 --- a/pkgs/stdenv/nix/default.nix +++ b/pkgs/stdenv/nix/default.nix @@ -1,11 +1,10 @@ { lib, - crossSystem, localSystem, + crossSystem, config, overlays, bootStages, - ... }: assert crossSystem == localSystem; diff --git a/pkgs/top-level/impure.nix b/pkgs/top-level/impure.nix index 851ab4282902..b1371e5fef8e 100644 --- a/pkgs/top-level/impure.nix +++ b/pkgs/top-level/impure.nix @@ -44,8 +44,6 @@ in # fix-point made by Nixpkgs. overlays ? import ./impure-overlays.nix, - crossOverlays ? [ ], - ... }@args: