···83 # compiling toolchains and 32-bit packages on x86_64). In both those cases we
84 # want the provided non-native `localSystem` argument to affect the stdenv
85 # chosen.
0000000086 nixpkgsFun = newArgs: import ./. (args // newArgs);
8788 # Partially apply some arguments for building bootstraping stage pkgs
···83 # compiling toolchains and 32-bit packages on x86_64). In both those cases we
84 # want the provided non-native `localSystem` argument to affect the stdenv
85 # chosen.
86+ #
87+ # NB!!! This thing gets its `config` argument from `args`, i.e. it's actually
88+ # `config0`. It is important to keep it to `config0` format (as opposed to the
89+ # result of `evalModules`, i.e. the `config` variable above) throughout all
90+ # nixpkgs evaluations since the above function `config0 -> config` implemented
91+ # via `evalModules` is not idempotent. In other words, if you add `config` to
92+ # `newArgs`, expect strange very hard to debug errors! (Yes, I'm speaking from
93+ # experience here.)
94 nixpkgsFun = newArgs: import ./. (args // newArgs);
9596 # Partially apply some arguments for building bootstraping stage pkgs
-2
pkgs/top-level/stage.nix
···135 # default GNU libc on Linux systems. Non-Linux systems are not
136 # supported.
137 pkgsMusl = if stdenv.hostPlatform.isLinux then nixpkgsFun {
138- inherit overlays config;
139 ${if stdenv.hostPlatform == stdenv.buildPlatform
140 then "localSystem" else "crossSystem"} = {
141 parsed = stdenv.hostPlatform.parsed // {
···152 # All packages built for i686 Linux.
153 # Used by wine, firefox with debugging version of Flash, ...
154 pkgsi686Linux = if stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86 then nixpkgsFun {
155- inherit overlays config;
156 ${if stdenv.hostPlatform == stdenv.buildPlatform
157 then "localSystem" else "crossSystem"} = {
158 parsed = stdenv.hostPlatform.parsed // {
···135 # default GNU libc on Linux systems. Non-Linux systems are not
136 # supported.
137 pkgsMusl = if stdenv.hostPlatform.isLinux then nixpkgsFun {
0138 ${if stdenv.hostPlatform == stdenv.buildPlatform
139 then "localSystem" else "crossSystem"} = {
140 parsed = stdenv.hostPlatform.parsed // {
···151 # All packages built for i686 Linux.
152 # Used by wine, firefox with debugging version of Flash, ...
153 pkgsi686Linux = if stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86 then nixpkgsFun {
0154 ${if stdenv.hostPlatform == stdenv.buildPlatform
155 then "localSystem" else "crossSystem"} = {
156 parsed = stdenv.hostPlatform.parsed // {