New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python packageOverrides improvements #87388
base: master
Are you sure you want to change the base?
Conversation
This makes it so that if I apply a patch to Django using packageOverrides, it's applied to python3.pkgs.python.pkgs.django (and python3.pkgs.python.pkgs.python.pkgs.django) as well as python3.pkgs.django.
This allows (manually) composing packageOverrides, like so: python3.override { packageOverrides = lib.composeExtensions python3.packageOverrides (final: super: { ... }); } This is still not great, but without this, you can't use packageOverrides twice at all, because the second use just clobbers the first with no way to make sure the first override is applied as well.
For Regarding |
For `python3.pkgs: apply packageOverrides recursively`, this is why it
is typically also needed to pass `self = python;` if I recall
correctly.
Does my change then remove the need to do that?
Regarding `python3: expose packageOverrides in passthru `, see also
#67422. Another idea was to offer
the contents of `python-packages.nix` as a top-level "overlay" so what
you want to do here *could* apply also to the other Python sets.
Exposing packageOverrides is a nice simple change that makes multiple
overrides possible, if not pretty. It doesn't stop us doing it better
later, but I don't have the capacity to do that now.
|
I don't think so. Consider you override both the interpreter build, and a package in the package set. In that case you really still need to pass nixpkgs/pkgs/development/interpreters/python/default.nix Lines 20 to 23 in a68a408
This is why I regret introducing the
I've said before this probably should go via an RFC but frankly I don't see that happening. This change is simple and very useful so IMO its good. |
Alternative at #91850. |
I marked this as stale due to inactivity. → More info |
Still very interested into this PR, composing |
This is a super valuable quick fix for the problem of not being able to compose Python overrides. |
personally, I'm of the opinion that we should use the cc @FRidh |
I marked this as stale due to inactivity. → More info |
Hello again, I would like to call on a decision for this. AFAIK, composing If the |
@RaitoBezarius strongly in favor of documenting the result. @NixOS/documentation-team can assist with making it nice. Who else should we involve in making the technical decision? @DavHau opinions? |
Between these two changes, complex uses of packageOverrides become a lot more tolerable (even if they’re still not pleasant). Explanations in commit messages.