@@ -38,11 +38,12 @@
3838, libpngSupport ? true, libpng ? null
3939, pulseSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio ? null
4040, rubberbandSupport ? stdenv.isLinux, rubberband ? null
41−, screenSaverSupport ? true, libXScrnSaver ? null
4241, sambaSupport ? stdenv.isLinux, samba ? null
42+, screenSaverSupport ? true, libXScrnSaver ? null
4343, sdl2Support ? true, SDL2 ? null
4444, sndioSupport ? true, sndio ? null
4545, speexSupport ? true, speex ? null
46+, swiftSupport ? false, swift ? null
4647, theoraSupport ? true, libtheora ? null
4748, vaapiSupport ? stdenv.isLinux, libva ? null
4849, vdpauSupport ? true, libvdpau ? null
@@ -119,7 +120,6 @@ in stdenv.mkDerivation rec {
119120 "--disable-libmpv-static"
120121 "--disable-static-build"
121122 "--disable-build-date" # Purity
122− "--disable-macos-cocoa-cb" # Disable whilst Swift isn't supported
123123 (enableFeature archiveSupport "libarchive")
124124 (enableFeature cddaSupport "cdda")
125125 (enableFeature dvdnavSupport "dvdnav")
@@ -130,11 +130,13 @@ in stdenv.mkDerivation rec {
130130 (enableFeature vaapiSupport "vaapi")
131131 (enableFeature waylandSupport "wayland")
132132 (enableFeature stdenv.isLinux "dvbin")
133− ];
133+ ] # Disable whilst Swift isn't supported
134+ ++ stdenv.lib.optional (!swiftSupport) "--disable-macos-cocoa-cb";
134135
135136 nativeBuildInputs = [
136137 addOpenGLRunpath docutils makeWrapper perl pkgconfig python3 wafHook which
137− ];
138+ ]
139+ ++ optional swiftSupport swift;
138140
139141 buildInputs = [
140142 ffmpeg_4 freetype libass libpthreadstubs
@@ -172,7 +174,7 @@ in stdenv.mkDerivation rec {
172174 ++ optionals x11Support [ libX11 libXext libGLU libGL libXxf86vm libXrandr ]
173175 ++ optionals vulkanSupport [ libplacebo shaderc vulkan-headers vulkan-loader ]
174176 ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
175− CoreFoundation Cocoa CoreAudio
177+ CoreFoundation Cocoa CoreAudio MediaPlayer
176178 ]);
177179
178180 enableParallelBuilding = true;