Skip to content

mpv: clean‐ups and Darwin improvements#350674

Merged
fpletz merged 21 commits intoNixOS:staging-nextfrom
emilazy:push-kmsntptmonot
Oct 24, 2024
Merged

mpv: clean‐ups and Darwin improvements#350674
fpletz merged 21 commits intoNixOS:staging-nextfrom
emilazy:push-kmsntptmonot

Conversation

@emilazy
Copy link
Member

@emilazy emilazy commented Oct 23, 2024

This ports mpv over to the new SDK format from #346043 (so much less cruft! yay!), enables the new upstream default of Vulkan on Darwin, and cleans up a bunch of flags and dependencies, including removing flags that had no effect, broke the build to toggle, or are just obsolete, and adjusting some defaults to be less Linux‐specific or more inline with upstream and other distros.

There are still things to investigate with the macOS build (e.g. VideoToolbox seems to support fewer pixel output formats compared to their official CI binaries), but I wanted to get this batch with the theoretically‐breaking changes posted before the freeze.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

Oh, this is satisfying.

Swift already propagates its corresponding SDK, so we don’t need
the patch.
mpv currently doesn’t even build successfully on macOS without Swift,
and there’s no use of Swift outside of the platform.
Using `--vo=gpu` or `--vo=gpu-next` with MoltenVK is now supported
and has replaced the previous `cocoa-cb` as the default.
This is now detected correctly as part of the SDK, as it should be.
Does nothing, removed upstream in 2012(!):
<mpv-player/mpv@1fde09d>.
Does nothing, removed upstream in 2012(!):
<mpv-player/mpv@1fde09d>.
Does nothing, removed upstream in 2012(!):
<mpv-player/mpv@6a26b4a>.
This is required as part of X11 support since the Meson transition.
Upstream’s Meson defaults, upstream’s CI binaries, and Arch
don’t enable this.
This prints out a big warning about how you shouldn’t be using
it. Upstream CI builds and Arch don’t enable it. There are other
backends of questionable worth that we don’t expose options for,
so let’s ditch this one.
No reason for FreeBSD to miss out on the fun.
Since we’re doing auto‐detection anyway, this is unnecessary.
On macOS, many things won’t work properly unless mpv is executed from
the app bundle, such as spatial audio with `--ao=avfoundation`. This
ensures that those features work reliably and also avoids duplicating
the entire `mpv` binary.
@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Oct 23, 2024
@ofborg ofborg bot added the 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. label Oct 23, 2024
@ofborg ofborg bot added the 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. label Oct 23, 2024
@emilazy
Copy link
Member Author

emilazy commented Oct 24, 2024

@AndersonTorres @fpletz would be great to get this reviewed before the freeze tonight if you have the time ^^

Copy link
Member

@AndersonTorres AndersonTorres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides, lgtm

Copy link
Member

@fpletz fpletz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for the cleanups. Much appreciated! ❤️

@fpletz fpletz merged commit f4f88f9 into NixOS:staging-next Oct 24, 2024
@emilazy emilazy deleted the push-kmsntptmonot branch October 24, 2024 11:26

patches = [
# Fix build with Darwin SDK 11
./0001-fix-darwin-build.patch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this file removed from Nixpkgs repo?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I intended to, but it’s possible it got lost in rebasing. Will open a PR soon if nobody beats me to it (currently racing against time for the 24.11 freeze).

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/title-the-darwin-sdks-have-been-updated/55295/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants