NixOS / nix-pills

Creative Commons Attribution Share Alike 4.0 International
392 stars 117 forks source link

Are input `.drv`s replaced by the same algorithm as output `.drv`s? #245

Open noamraph opened 5 months ago

noamraph commented 5 months ago

I read this in chapter 18:

In case the .drv has input derivations, that is it references other .drv, then such .drv paths are replaced by this same algorithm which returns a hash.

Just above this, the text describes how in order to calculate the hash of the derivation, output derivations are replaced with an empty string. I don't believe this is done for input derivations, as I'm pretty sure they should be already known when calculating the hash of a derivation.

Am I correct? If so, I suggest to change the paragraph to something like:

In case the .drv has input derivations, that is, it references other .drvs, there is no need to replace their path with an empty string, since their hash is calculated beforehand, using the algorithm described here.