python3: propagate overrides of spliced pythons#498251
python3: propagate overrides of spliced pythons#498251doronbehar merged 2 commits intoNixOS:masterfrom
Conversation
405958f to
5008a3b
Compare
| } | ||
| // __splices; | ||
| # When we override the interpreter we also need to override the spliced versions of the interpreter | ||
| inputs' = lib.filterAttrs ( |
There was a problem hiding this comment.
If I understand correctly, this would still have the surprising override-dropping behaviour if inputs to the python package are overridden, e.g. python.override { sqlite = sqlite-interactive; }?
There was a problem hiding this comment.
If I understand correctly, this would still have the surprising override-dropping behaviour if inputs to the python package are overridden, e.g.
python.override { sqlite = sqlite-interactive; }?
That behavior was present before 6421482 , due to the !lib.isDerivation condition used in the filter. TBH I'm not sure why that filter function was breaking the splicing for pkgsCross.armv7l-hf-multiplatform.buildPackages.python3Packages.setuptools-rust. After opening the current PR, I noticed the Lua ecosystem also uses the same filter and pretty much the same code:
nixpkgs/pkgs/development/interpreters/lua-5/interpreter.nix
Lines 191 to 202 in f3f83f3
I'm involved in cross compilation of lua packages too, and I haven't noticed equivalent issues. Maybe that's due to the @inputs in lua-5/interpreter.nix v.s cpython/default.nix.
Do you think the correct thing to do now would be to investigate why this lib.filter won't work for Python? Or maybe add a NOTE comment?
There was a problem hiding this comment.
Given that this PR doesn't introduce any new breakage, and at least partially fixes the existing breakage, I think it's good.
Maybe opening a new issue would be better than a note, but I'm also not sure if anyone really has the problem I'm describing (I do struggle to think of a real use case for overriding python inputs where an overlay replacing the package for all of nixpkgs wouldn't be the more sensible approach).
There was a problem hiding this comment.
@lheckemann I just realized that packageOverrides - an important @inputs argument should also be propagated to all of these Pythons, so I added it, along with a comment striving to thoroughly explain the situation. If you could give it one more round of review it'd be great.
|
This does fix the specific problem I was having though, thanks for looking into it! |
5008a3b to
7bc2f59
Compare
This is a more accurate resurrection of what was meant to be done in 6421482
7bc2f59 to
20a0e1b
Compare
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.