-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
ffmpeg_7-full: Enable xev{d,e} on Darwin systems #328428
ffmpeg_7-full: Enable xev{d,e} on Darwin systems #328428
Conversation
8a44f61
to
ea6ce42
Compare
Not a huge fan of the negative assertion TBH. Though the inverse of Kinda wish we could use |
Good point but why couldn't we? |
Could also make use of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Result of nixpkgs-review pr 328428
run on aarch64-darwin 1
1 package marked as broken and skipped:
- handbrake
7 packages built:
- ffmpeg_7-full
- ffmpeg_7-full.bin
- ffmpeg_7-full.data
- ffmpeg_7-full.dev
- ffmpeg_7-full.doc
- ffmpeg_7-full.lib
- ffmpeg_7-full.man
Result of nixpkgs-review pr 328428
run on x86_64-darwin 1
1 package marked as broken and skipped:
- handbrake
7 packages built:
- ffmpeg_7-full
- ffmpeg_7-full.bin
- ffmpeg_7-full.data
- ffmpeg_7-full.dev
- ffmpeg_7-full.doc
- ffmpeg_7-full.lib
- ffmpeg_7-full.man
I think it shouldn’t be hard to get this working on aarch64-linux
; the builds succeed on aarch64-darwin
and the error seems like just some weird static linking compiler flags thing stopping the build from even happening rather than a fundamental problem. That would obviate the need to have any conditional here, though I’m not asking you to spend any more time on these packages than you already have.
Anyway I’m fine with whatever condition is used here, but availableOn
is the most elegant solution in my opinion.
@jopejoe1, I loved the idea of @Atemu, kinda assumed we either wanted explicit control over what features should not be broken or that it causes more evaluation than we want or something. I'll ask around to see if anyone knows of a problem with doing this. @emilazy, I'll mark this as ready for review as-is for now. If there's no problem with using |
Perhaps we should introduce a
It depends. In this case, it was simply not enabled because it was broken which would in turn break ffmpeg. Using meta.broken/availableOn would have sent a clearer message. |
I’d rather just have way fewer feature flags, honestly. We build three variants of increasing size and have additional flags for licensing concerns; the current level of customizability is way over‐the‐top. |
It is a bit over the top but it has proven itself to be quite handy in the past and does not add too much maintenance overhead IME. |
If defaulting the features to |
I’m genuinely curious as to how such fine‐grained configurability has proven helpful! The level of granularity for every single codec, which libraries to build, and whether to copy some (Also we should probably just merge this.) |
I do understand the idea behind As for the flags, I personally override |
Oh, yeah, I’m not proposing we get rid of |
I prefer it :)
It's helpful for precisely the situations such as this. Notice how @toonn didn't have to touch any implementation details whatsoever here but merely adjust the declarative policy? If you look at the implementation, notice that it is super simple and repetitive. We could perhaps even automate away most of the repetition. (Well, I was nerdsniped by this discussion just now and had an idea that I'll now attempt to implement.) If you look at the flag defaults, there's lots of platform or version specific logic that we can adjust at any point in a manner like this. This is also true for external users. This fine-grained flags system is what allows us to keep as close to a full feature set as possible without compromising other platforms or versions. Without it, we'd only be able to enable the intersection of flags that work on all platforms and versions.
I agree that some of the flags could probably be removed. When I refactored the ffmpeg derivations, I opted to simply retain the existing ones and keep the result as close as possible. (I even had the drvs be 1:1 the same modulo configureFlags and buildInputs order.) I'd like to challenge the second thought of yours however: Go try and remove a feature flag aswell a dependency using Meanwhile having these flags present costs us nearly nothing. If we had something like #312432 we would even be able to spin out this slight complexity into a separate code unit using a few rather idiomatic patterns.
|
ea6ce42
to
51cfc56
Compare
Only aarch64-linux is known to be incompatible currently. By conditioning the option on the xev{d,e}.meta.broken attribute the features will automatically be enabled when xev{d,e} are no longer broken on aarch64-linux.
51cfc56
to
0681529
Compare
Pushed the change, rebased on master and altered the commit message. Still seems to build fine on aarch64-darwin. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I think clearly I’ll have to write up my position on the feature flags in another issue sometime. For now though let’s get this merged.
Result of nixpkgs-review pr 328428
run on x86_64-darwin 1
1 package marked as broken and skipped:
- handbrake
7 packages built:
- ffmpeg_7-full
- ffmpeg_7-full.bin
- ffmpeg_7-full.data
- ffmpeg_7-full.dev
- ffmpeg_7-full.doc
- ffmpeg_7-full.lib
- ffmpeg_7-full.man
Result of nixpkgs-review pr 328428
run on x86_64-linux 1
Result of nixpkgs-review pr 328428
run on aarch64-linux 1
One drawback of going with The flipside of that is that it's not quite fair to put the burden of dealing with such breakages on Ffmpeg maintainers. |
As soon as |
Someone will have to manually set I'm generally of the opinion that the people who care about some feature working should be the one maintaining it and that everyone else should take a rather hands-off approach, only doing the bare minimum (e.g. marking as broken and notifying interested people of the breakage). |
Well, but do you want to add |
I actually think *-full is a bit of an exceptional case. It's pretty much "Enable all the options you can." Without necessarily an expectation that that will be all the possible options. In the ~minimal variant it makes sense to have tight control over what is enabled. With *-full it turns a bit into a game of whack-a-mole disabling a feature for packages marked broken and reenabling them when the packages get fixed. I do still think conditioning ~everything on broken will have the knock-on effect of fewer people trying to get things to work. I certainly didn't have any reason to fix Quirc and Xev{d,e} other than "Huh, I wonder why ffmpeg_7-full is not building for aarch64-darwin?" But I also think it's very reasonable to not require ffmpeg maintainers to play Feature-Flag Manager Tycoon. Maybe a change of name to *-fullest or *-full-ish would communicate the intent better? |
I don‘t think |
That effect is not necessarily a positive one. Not all things need to get fixed in a timely manner. These codecs here are irrelevant in practice and almost nobody would be likely to miss them on macOS. There are far better uses of your time than to fix these packages w.r.t. your own goals and the ecosystem. If you think fixing these is fun and/or it fulfils you then go ahead and knock yourself out of course but you shouldn't feel compelled to do so because it's seen as necessary. IMHO, leave it to the people who actually want/need this codec to look into fixing it.
Keep in mind that it's ffmpeg-full, not ffmpeg-all. IMV it should be a "fully featured" build of ffmpeg that includes all functionality we can reasonably support in Nixpkgs, no matter how niche or outdated it is with little regard for closure size. There's some exceptions like for instance torch which IIRC had such a huge closure that ffmpeg-full would be mostly torch with a little ffmpeg on the side.
That's my vision for the regular It's a principle of least surprise thing for me. If a feature being absent in the default For instance, you'd expect ffmpeg to come with AV1 encoders these days but nobody would really expect MPEG's newest DOA patent traps or an advanced effects scripting library to be included. Since we do have them in Nixpkgs though, those should be included in ffmpeg-full. |
Description of changes
This enables xevd and xeve again in ffmpeg_7-full on all platforms but is dependent on #328422, hence still a draft.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.