When should a fixed output path be used for a derivation in nix?
Nix pill #18 says the following:
Finally, the other most used kind of path is when we know beforehand an integrity hash of a file. This is usual for tarballs.
The builder must create the out path and make sure its hash is the same as the one declared with
The Nix manual documents the options used to specify the output hash.
I think it could be further explained what does it mean to know beforehand an integrity hash of a file. It would help newcomers (and others) to better understand this concept.
In particular, is it right to say that a derivation with run time dependencies (using for instance
propagatedUserEnvPkgs) should not have a fixed output path, because it will change when any dependence change?