If I edit a local checkout to remove this overriding in the healthchecks package, then I’m prompted to fix my empty hash; if I leave this content in, evaluation doesn’t seem to even notice the empty hash.
pythonPackagesExtensions seems to work, but it breaks a bunch of other packages; I’d prefer to only override in the scope of healthchecks if possible.
Reading the links at the top, it seems like it may be hopeless – that there is no way to merge packageOverrides like this, and I can’t fixup a python dependency if the parent package is accepting python3 and overriding it in the derivation.
It has nothing to do with 2025, they just wrote the code in a way that will ignore yours. Yes, packageOverrides don’t compose and this is why they’ve been deprecated at the top-level in favor of overlays for the last 8 years.
One option would be for upstream to extract python3 = python3.override {...} into all-packages.nix, that way it’s not squirrelled away in a let binding that no one can override. Another option would be to do what mailman does (but actually make it part of the public api unlike mailman).
lib.mirrorFunctionArgs is essentially a shorthand of f: g: lib.setFunctionArgs g (lib.functionArgs f) to save developers’ lives (i.e., my life) dealing with overriding implementations.
All lib.mirrorFunctionArgs f can be stripped and the function will still preserve packageOverrides. Still, __functionArgs is useful for callPakage, so I preserve them as I could.
Thanks for your input. I was actually looking at this part of mailman an hour or two before posting (just grepping through instanrces of override and packageOverrides in python packages).
This is what I was thinking – isn’t this one of the reasons the callPackage pattern is encouraged?
Sorry, if you have a minute, can you elaborate on this? I thought the healthchecks example was an overlay? Just one that uses packageOverrides (as spelled out in the lua docs). Just a name or link to a package that “does it right” would be great.