https://www.uber.com/blog/bootstrapping-ubers-infrastructure-on-arm64-with-zig/ says:
A host is the machine that is compiling the binary. A target is the machine that will run the binary. In native compilation the host and target are the same platform (i.e., operating system, processor architecture, and shared libraries are the same).
https://nixos.org/manual/nixpkgs/stable/#ssec-stdenv-dependencies-reference says:
Dependencies can be broken down along three axes: their host and target platforms relative to the new derivation’s, and whether they are propagated. The platform distinctions are motivated by cross compilation; see Cross-compilation for exactly what each platform means. [1] But even if one is not cross compiling, the platforms imply whether or not the dependency is needed at run-time or build-time, a concept that makes perfect sense outside of cross compilation. By default, the run-time/build-time distinction is just a hint for mental clarity, but with strictDeps set it is mostly enforced even in the native case.
The extension of PATH with dependencies, alluded to above, proceeds according to the relative platforms alone. The process is carried out only for dependencies whose host platform matches the new derivation’s build platform i.e. dependencies which run on the platform where the new derivation will be built. [2] For each dependency of those dependencies, dep/bin, if present, is added to the PATH environment variable.
A dependency is said to be propagated when some of its other-transitive (non-immediate) downstream dependencies also need it as an immediate dependency. [3]
It is important to note that dependencies are not necessarily propagated as the same sort of dependency that they were before, but rather as the corresponding sort so that the platform rules still line up. To determine the exact rules for dependency propagation, we start by assigning to each dependency a couple of ternary numbers (-1 for build, 0 for host, and 1 for target) representing its dependency type, which captures how its host and target platforms are each “offset” from the depending derivation’s host and target platforms. The following table summarize the different combinations that can be obtained: ...
The first quote defines the host and target platforms of a package as where it is built and run.
But when reading the second quote, I couldn't comprehend
The process is carried out only for dependencies whose host platform matches the new derivation’s build platform i.e. dependencies which run on the platform where the new derivation will be built.
Does it mean that the host platforms of dependencies are defined as where they are run?, and the build platform of the new derivation is where it is built?
Are host platform and build platform the same concept? If yes, why does the second quote makes distinction between them?
Thanks.