3 ms·
Closure vs. derivation in the Nix package manager
- bobthebuilders 5y agoI've read this a few times now and I understand neither what the two are nor their differences.
- xelxebar 5y agoClosure, i.e. transitive closure, is just the list of a package's dependencies, and dependencies of those dependencies, etc. If you have package A that depends on package B, either directly or indirectly, then package B is in the closure of package A. Note that package A is also inside this transitive closure. You can also think of A's closure as the absolute minimum Linux userspace needed to run package A. Okay, so you have such a list, but how do you take that list an turn it into an actually usable installation of package A? Build dependencies are a thing, as well as source locations, build steps, installation paths, etc. Derivations act as a kind of executable build recipe. If you feed derivation A to the Nix builder daemon, it will chug for a while and then spit out a usable package A, no need for you to worry about dependencies, since the derivation knows about them.
- deleted 5y ago[deleted]
- radicalcentrist 5y agohttps://archive.md/wpvR3 https://archive.md/wpvR3