ffmpeg: make version part of the interface#280904
ffmpeg: make version part of the interface#280904Atemu wants to merge 947 commits intoNixOS:masterfrom
Conversation
|
Should this reference also be |
|
I'd almost prefer for it not to be but, really, you should be overriding src anyways if you're overriding the version. The hash won't match anyways. I guess we could also make hash and src an explicit part of the interface; making it fetch ffmpeg versions from the upstream repo. |
pipewire: 1.0.3 -> 1.0.4
|
I think version and src should be part of the interface and hash should be removed from it. |
|
Why? Having the hash in there has the nice property that one could make the ffmpeg drv build any upstream version by specifying version and hash as an override argument. |
|
(I've overhauled this in a local tree that I'm still having some issues with, drafting for now.) |
I think that having an src part of the interface would make it redundant as with src you could specify any srource and not just versions avaivable upstream. |
python311Packages.radios: 0.3.0 -> 0.3.1
|
You could still specify any source if |
This effectively obsoletes extraPatches
This is (to my knowledge) a novel pattern that is similar to how callPackages (note the s) is used. Whereas callPackages would try to make the arguments of default.nix overrideable, this instead exposes the individual packages' arguments. This pattern is a lot more robust than the custom import pattern I had implemented here before. It also moves the implementation detail out of all-packages which is great. Making the version part of the interface allows overriders to declare a different ABI. Doing so via overrideAttrs would not affect the flags in the arguments; effectively retaining the overridden package's ABI. See NixOS#280645 for an instance of that. By overriding the arguments using ffmpeg.override { version = "..."; ... } the ABI will now be overridden as expected. This means you could theoretically turn ffmpeg_5-full into ffmpeg_4-headless by overriding it with { version = "4.4.4"; hash = ...; ffmpegVariant = "headless"; } Having these implicit parameters be explicit parameters feels a lot cleaner and neater to work with.
You should use the override interface to modify ABI version, not overrideAttrs.
a5ff075 to
4033f2b
Compare
|
It's a draft, why did it do the ping? Urrrggghhh. |
Description of changes
This allows overriders to declare a different ABI. Doing so via overrideAttrs
would not affect the flags in the arguments; effectively retaining the
overridden package's ABI.
See #280645 for an instance of that.
By overriding the arguments using
the ABI will now be overridden as expected.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-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.
cc @anund