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 themachine that will run the binary. In native compilation the host andtarget are the same platform (i.e., operating system, processorarchitecture, 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 andtarget platforms relative to the new derivation’s, and whether theyare propagated. The platform distinctions are motivated by crosscompilation; see Cross-compilation for exactly what each platformmeans. [1] But even if one is not cross compiling, the platforms implywhether or not the dependency is needed at run-time or build-time, aconcept that makes perfect sense outside of cross compilation. Bydefault, the run-time/build-time distinction is just a hint for mentalclarity, but with strictDeps set it is mostly enforced even in thenative case.
The extension of PATH with dependencies, alluded to above, proceedsaccording to the relative platforms alone. The process is carried outonly for dependencies whose host platform matches the new derivation’sbuild platform i.e. dependencies which run on the platform where thenew derivation will be built. [2] For each dependency of thosedependencies, dep/bin, if present, is added to the PATH environmentvariable.
A dependency is said to be propagated when some of itsother-transitive (non-immediate) downstream dependencies also need itas an immediate dependency. [3]
It is important to note that dependencies are not necessarilypropagated as the same sort of dependency that they were before, butrather as the corresponding sort so that the platform rules still lineup. To determine the exact rules for dependency propagation, we startby assigning to each dependency a couple of ternary numbers (-1 forbuild, 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. Thefollowing table summarize the different combinations that can beobtained: ...
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 outonly for dependencies whose host platform matches the new derivation’sbuild platform i.e. dependencies which run on the platform where thenew 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.