-
-
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
mpv: Move all wrappings to a single wrapper Nix function #88620
Conversation
@GrahamcOfBorg build mpv-unwrapped @GrahamcOfBorg build mpv |
Is it me or do these build commands don't work? :/ |
They only work if you're a whitelisted user. |
Inspired by `wrapNeovim`, write a wrapMpv Nix function that creates a derivation that has all of the environment that was added if needed at the unwrapped version. Add derivations to all-packages.nix in an almost compatible way and make `mpv-with-scripts` throw a message implying to switch to `wrapMpv` which has an incompatible signature. Add to vapoursynth a new passthru attribute `python3` that is used in passed down to the wrapper to ensure ABI compatibility with `PYTHONPATH`.
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.
Just looking from above, feels good to me, and way more organized.
Pushing out the wrap logic is a great improvement.
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.
It's more inline with current nixpkgs' approach.
It would be great if symbols like Since this is a breaking change, this requires an entry in the release notes cc @doronbehar @AndersonTorres |
You are correct. It was on my mind, I wanted to get some feedback before adding to the PR the changes to rl-2009 but I forgot about it after a while. See: #89208 |
The latter has been removed from Nixpkgs. See: - <NixOS/nixpkgs#88620> - <NixOS/nixpkgs#89208> PR #1295
The latter has been removed from Nixpkgs. See: - <NixOS/nixpkgs#88620> - <NixOS/nixpkgs#89208> PR nix-community#1295
The latter has been removed from Nixpkgs. See: - <NixOS/nixpkgs#88620> - <NixOS/nixpkgs#89208> PR nix-community#1295
The latter has been removed from Nixpkgs. See: - <NixOS/nixpkgs#88620> - <NixOS/nixpkgs#89208> PR nix-community#1295
Motivation for this change
In #88136 I concluded that mpv's wrapping was done purely - both the "unwrapped" build had done some wrappings to the two executables in
$out/bin/
, while we already had an external wrapper derivation calledmpv-with-scripts
. This was bad because:mpv-with-scripts
had their executable wrapped twice.youtubeSupport
caused mpv to be wrapped twice while it was a mere change of includingyoutube-dl
in the wrapper's$PATH
or not.youtubeSupport
enabled, but say you had an override for an updatedyoutube-dl
, it was impossible to make mpv use your youtube-dl without recompiling it.Things done
This PR is a rewrite of what was called
mpv-with-scripts
- it's now calledwrapMpv
(inspired by Neovim'swrapNeovim
Nix function) and it's possible with it to satisfy both "deterministics" which want everything to be configured exactly as they want via Nix while it enables everyone to tweak what's possible via an external wrapper which doesn't trigger a rebuild of mpv.I tested
wrapMpv
with:mpv-unwrapped
was compiled with and withoutvapoursynthSupport
enabled - checked that the wrapper got the same environment but:youtubeSupport
works (of course it works as the exectuable has the same environment).Besides that, as always:
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)cc @pstch @AndersonTorres @jtojnar