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
gst_all_1: make extensible #49723
gst_all_1: make extensible #49723
Conversation
Please add your example to the commit message. |
What is the difference between |
56cc89b
to
7173122
Compare
AFAIK,
In this case, Now, the override could be done like this:
I based my implementation off of |
7173122
to
3a7b7fa
Compare
I guess this needs adaptations to work with this? (see eval) |
It was previously difficult to override a single gstreamer package and cause it to be used by other gstreamer packages. This commit converts gst_all_1 to an extensible attrset, which fixes this problem. Here is an example of how to override a gstreamer package in an overlay: gst_all_1 = super.gst_all_1.extend (gstSelf: gstSuper: { gst-plugins-base = gstSuper.gst-plugins-base.override (old: { enableWayland = false; }); });
3a7b7fa
to
369ef41
Compare
That problem should be fixed now. That was caused by my attempt to use I really would like someone knowledgeable in this area of nixpkgs to look at this PR. There are lots of package sets that follow a similar pattern to gstreamer, and very few provide an easy way to extend them in an overlay. Some of the larger packages sets such as perl and python packages use their own adhoc methods to allow overrides. The more I think about it, the more I think we need a more standardized way to override/extend nested package sets. |
Alternative, more generic solution in #54266:
The |
Reading through the related PRs, it seems to me that this PR shouldn't be merged without a standard extension system such as #51213. |
It was previously difficult to override a single gstreamer package and cause it to be used by other gstreamer packages. This PR converts
gst_all_1
to an extensible attrset, which fixes this problem. I'm not sure that this is perfect implementation, I just based it off other examples I found in nixpkgs.It is now possible to override a gstreamer package using something like this:
This PR only directly causes one rebuild, because
gst-validate
used to have gstreamer 0.10 passed as a dependency, which was inherited from the top level package set, rather than fromgst_all_1
.sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)