git.iko.soy/typeable/nixpkgs
on master help sign in
top-level: Document the `{local,cross}System, contrasting with `*Platform`

This is an implementation detail of how the bootstrapping chain is chosen, and thus need not be in the manual.

commit4c17cd555f6443207144da9af6e1c2b1304afd8b authorJohn Ericson <Ericson2314@Yahoo.com> dateSun 15 Jan 2017, 17:45 (10 years ago) parenta1a798f
1 file changed+16
pkgs/top-level/default.nix+16
pkgs/top-level/default.nix+16
@@ -83,6 +83,22 @@ in let
8383 boot = import ../stdenv/booter.nix { inherit lib allPackages; };
8484
8585 stages = stdenvStages {
86+ # One would think that `localSystem` and `crossSystem` overlap horribly with
87+ # the three `*Platforms` (`buildPlatform`, `hostPlatform,` and
88+ # `targetPlatform`; see `stage.nix` or the manual). Actually, those
89+ # identifiers I, @Ericson2314, purposefully not used here to draw a subtle
90+ # but important distinction:
91+ #
92+ # While the granularity of having 3 platforms is necessary to properly
93+ # *build* packages, it is overkill for specifying the user's *intent* when
94+ # making a build plan or package set. A simple "build vs deploy" dichotomy
95+ # is adequate: the "sliding window" principle described in the manual shows
96+ # how to interpolate between the these two "end points" to get the 3
97+ # platform triple for each bootstrapping stage.
98+ #
99+ # Also, less philosophically but quite practically, `crossSystem` should be
100+ # null when one doesn't want to cross-compile, while the `*Platform`s are
101+ # always non-null. `localSystem` is always non-null.
86102 localSystem = { inherit system platform; };
87103 inherit lib crossSystem config overlays;
88104 };