-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Rename dependency attributes #28327
Copy link
Copy link
Open
Labels
0.kind: enhancementAdd something new or improve an existing system.Add something new or improve an existing system.1.severity: significantNovel ideas, large API changes, notable refactorings, issues with RFC potential, etc.Novel ideas, large API changes, notable refactorings, issues with RFC potential, etc.2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: cross-compilationBuilding packages on a different platform than they will be used onBuilding packages on a different platform than they will be used on9.needs: documentationThis needs to be documented well.This needs to be documented well.
Metadata
Metadata
Assignees
Labels
0.kind: enhancementAdd something new or improve an existing system.Add something new or improve an existing system.1.severity: significantNovel ideas, large API changes, notable refactorings, issues with RFC potential, etc.Novel ideas, large API changes, notable refactorings, issues with RFC potential, etc.2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: cross-compilationBuilding packages on a different platform than they will be used onBuilding packages on a different platform than they will be used on9.needs: documentationThis needs to be documented well.This needs to be documented well.
Fields
Give feedbackNo fields configured for issues without a type.
nativeBuildInputs,buildInputs,propagatedNativeBuildInputs, andpropagatedBuildInputsare horrible names:nativeis vague wrt cross compilationhostplatform andtargetplatform of dependencies can be varied, so in fact there is 2 axis of "native" vs "foreignness"In #26805 I do add 4 more sorts of dependencies giving us:
depsBuildBuilddepsBuildBuildnativeBuildInputsdepsBuildHostdepsBuildTargetdepsBuildTargetdepsHostHostdepsHostHostbuildInputsdepsHostTargetdepsTargetTargetdepsTargetTargetA disadvantages of these names, per the comments below, is for the vast majority of deps the target platform is irrelevant---my names are unintuitive and noisy in this case.
N.B. I'd love to structure things purely when the deps are needed---run time or build time---which is a pretty understandable concept even for those who have never heard of cross compiling. But this just isn't correct (yet). Firstly, it isn't enough granularity---see when dependent's host = depender's build, there's 3 possible target platforms. Worse, host=host dependencies may be used in all possible ways: only at build-time (static linking), only at run-time (dynamic loading of plugin library), or both (linking and headers).
A completely different approach would be rely more on language-specific builders: For C, let people think in terms of headers (and pkg-config files, etc) and libraries (dynamic or static), and then C-specific infrastructure would take care of everything behind the scenes regarding propagation and multiple outputs. I should probably elaborate this approach more fully in the another issue or RFC.
Split out from #4855
CC @dezgeg @edolstra