git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #79344 from LnL7/darwin-mpv-swift

mpv: add flag for swift on darwin

commit230ab62e1053623ac2fab8eb3e83225b8dbc25ff authorDaiderd Jordan <daiderd@gmail.com> dateWed 19 Feb 2020, 19:14 (7 years ago) parent7789299408f369
3 files changed+11−8
pkgs/applications/video/mpv/default.nix+9−8 pkgs/os-specific/darwin/apple-sdk/frameworks.nix+1 pkgs/top-level/all-packages.nix+1
pkgs/applications/video/mpv/default.nix+9−8
@@ -1,7 +1,8 @@
11{ config, stdenv, fetchurl, fetchFromGitHub, makeWrapper
22, addOpenGLRunpath, docutils, perl, pkgconfig, python3, wafHook, which
33, ffmpeg_4, freefont_ttf, freetype, libass, libpthreadstubs, mujs
4−, nv-codec-headers, lua, libuchardet, libiconv ? null, darwin
4+, nv-codec-headers, lua, libuchardet, libiconv ? null
5+, CoreFoundation, Cocoa, CoreAudio, MediaPlayer
56
67, waylandSupport ? stdenv.isLinux
78 , wayland ? null
@@ -38,11 +39,12 @@
3839, libpngSupport ? true, libpng ? null
3940, pulseSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio ? null
4041, rubberbandSupport ? stdenv.isLinux, rubberband ? null
41−, screenSaverSupport ? true, libXScrnSaver ? null
4242, sambaSupport ? stdenv.isLinux, samba ? null
43+, screenSaverSupport ? true, libXScrnSaver ? null
4344, sdl2Support ? true, SDL2 ? null
4445, sndioSupport ? true, sndio ? null
4546, speexSupport ? true, speex ? null
47+, swiftSupport ? false, swift ? null
4648, theoraSupport ? true, libtheora ? null
4749, vaapiSupport ? stdenv.isLinux, libva ? null
4850, vdpauSupport ? true, libvdpau ? null
@@ -119,7 +121,6 @@ in stdenv.mkDerivation rec {
119121 "--disable-libmpv-static"
120122 "--disable-static-build"
121123 "--disable-build-date" # Purity
122− "--disable-macos-cocoa-cb" # Disable whilst Swift isn't supported
123124 (enableFeature archiveSupport "libarchive")
124125 (enableFeature cddaSupport "cdda")
125126 (enableFeature dvdnavSupport "dvdnav")
@@ -130,11 +131,13 @@ in stdenv.mkDerivation rec {
130131 (enableFeature vaapiSupport "vaapi")
131132 (enableFeature waylandSupport "wayland")
132133 (enableFeature stdenv.isLinux "dvbin")
133− ];
134+ ] # Disable whilst Swift isn't supported
135+ ++ stdenv.lib.optional (!swiftSupport) "--disable-macos-cocoa-cb";
134136
135137 nativeBuildInputs = [
136138 addOpenGLRunpath docutils makeWrapper perl pkgconfig python3 wafHook which
137− ];
139+ ]
140+ ++ optional swiftSupport swift;
138141
139142 buildInputs = [
140143 ffmpeg_4 freetype libass libpthreadstubs
@@ -171,9 +174,7 @@ in stdenv.mkDerivation rec {
171174 ++ optionals waylandSupport [ wayland wayland-protocols libxkbcommon ]
172175 ++ optionals x11Support [ libX11 libXext libGLU libGL libXxf86vm libXrandr ]
173176 ++ optionals vulkanSupport [ libplacebo shaderc vulkan-headers vulkan-loader ]
174− ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
175− CoreFoundation Cocoa CoreAudio
176− ]);
177+ ++ optionals stdenv.isDarwin [ CoreFoundation Cocoa CoreAudio MediaPlayer ];
177178
178179 enableParallelBuilding = true;
179180
pkgs/os-specific/darwin/apple-sdk/frameworks.nix+1
@@ -75,6 +75,7 @@ with frameworks; with libs; {
7575 LocalAuthentication = [];
7676 MapKit = [];
7777 MediaAccessibility = [ CoreGraphics CoreText QuartzCore ];
78+ MediaPlayer = [];
7879 MediaToolbox = [ AudioToolbox AudioUnit CoreMedia ];
7980 Metal = [];
8081 MetalKit = [ ModelIO Metal ];
pkgs/top-level/all-packages.nix+1
@@ -20458,6 +20458,7 @@ in
2045820458
2045920459 mpv = callPackage ../applications/video/mpv {
2046020460 inherit lua;
20461+ inherit (darwin.apple_sdk.frameworks) CoreFoundation Cocoa CoreAudio MediaPlayer;
2046120462 };
2046220463
2046320464 mpv-with-scripts = callPackage ../applications/video/mpv/wrapper.nix { };