Evaluation check does not consider `passthru` and thus `passthru.tests`
FRidh opened this issue · comments
I just hit this pain for passthru.updateScript
having evaluation failures that were causing r-ryantm to not run any updatescript updates :(
Instead of assigning meaning to passthru
, which is still an implementation detail, we should assign meaning to specific package attributes, such as pkg.meta
, pkg.tests
and pkg.updateScript
.
This passthru
business is going to look very silly as soon as we normalize packages that aren't tied to a single top-ish derivation, whether that's because of RFC 92, separate documentation derivations or good engineering practices.
I'll tolerate the use of the term, but maybe call them passthru package attributes? That distances the concept passthru from the code passthru
a bit and eases us into the more sensible package attribute term.
I don't think renaming passthru will change something. The average nixpkgs contributor does not really care if it is an implementation detail or not. It works and is the defacto standard. Moving updateScripts and tests one level higher sounds like a good idea but it should not trigger a rebuild of the package.
We don't need to rename or move anything. passthru
is an ok name for the mkDerivation
behavior that we need. It's not pretty, sure, but it gets the job done. We should not move updateScripts
anywhere. It is already in the correct place in the mkDerivation
arguments, because as you say, it should not trigger a rebuild, and it is also already in the correct place in the output, in the package attributes.
All I'm really trying to say is that we should ignore the passthru
attribute in the returned package, or in other words, we should define pkg = mkDerivation { passthru.updateScript = ...; }
, but read pkg.updateScript
.