Merge pull request #79344 from LnL7/darwin-mpv-swift
mpv: add flag for swift on darwin
This commit is contained in:
commit
230ab62e10
@ -1,7 +1,8 @@
|
|||||||
{ config, stdenv, fetchurl, fetchFromGitHub, makeWrapper
|
{ config, stdenv, fetchurl, fetchFromGitHub, makeWrapper
|
||||||
, addOpenGLRunpath, docutils, perl, pkgconfig, python3, wafHook, which
|
, addOpenGLRunpath, docutils, perl, pkgconfig, python3, wafHook, which
|
||||||
, ffmpeg_4, freefont_ttf, freetype, libass, libpthreadstubs, mujs
|
, ffmpeg_4, freefont_ttf, freetype, libass, libpthreadstubs, mujs
|
||||||
, nv-codec-headers, lua, libuchardet, libiconv ? null, darwin
|
, nv-codec-headers, lua, libuchardet, libiconv ? null
|
||||||
|
, CoreFoundation, Cocoa, CoreAudio, MediaPlayer
|
||||||
|
|
||||||
, waylandSupport ? stdenv.isLinux
|
, waylandSupport ? stdenv.isLinux
|
||||||
, wayland ? null
|
, wayland ? null
|
||||||
@ -38,11 +39,12 @@
|
|||||||
, libpngSupport ? true, libpng ? null
|
, libpngSupport ? true, libpng ? null
|
||||||
, pulseSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio ? null
|
, pulseSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio ? null
|
||||||
, rubberbandSupport ? stdenv.isLinux, rubberband ? null
|
, rubberbandSupport ? stdenv.isLinux, rubberband ? null
|
||||||
, screenSaverSupport ? true, libXScrnSaver ? null
|
|
||||||
, sambaSupport ? stdenv.isLinux, samba ? null
|
, sambaSupport ? stdenv.isLinux, samba ? null
|
||||||
|
, screenSaverSupport ? true, libXScrnSaver ? null
|
||||||
, sdl2Support ? true, SDL2 ? null
|
, sdl2Support ? true, SDL2 ? null
|
||||||
, sndioSupport ? true, sndio ? null
|
, sndioSupport ? true, sndio ? null
|
||||||
, speexSupport ? true, speex ? null
|
, speexSupport ? true, speex ? null
|
||||||
|
, swiftSupport ? false, swift ? null
|
||||||
, theoraSupport ? true, libtheora ? null
|
, theoraSupport ? true, libtheora ? null
|
||||||
, vaapiSupport ? stdenv.isLinux, libva ? null
|
, vaapiSupport ? stdenv.isLinux, libva ? null
|
||||||
, vdpauSupport ? true, libvdpau ? null
|
, vdpauSupport ? true, libvdpau ? null
|
||||||
@ -119,7 +121,6 @@ in stdenv.mkDerivation rec {
|
|||||||
"--disable-libmpv-static"
|
"--disable-libmpv-static"
|
||||||
"--disable-static-build"
|
"--disable-static-build"
|
||||||
"--disable-build-date" # Purity
|
"--disable-build-date" # Purity
|
||||||
"--disable-macos-cocoa-cb" # Disable whilst Swift isn't supported
|
|
||||||
(enableFeature archiveSupport "libarchive")
|
(enableFeature archiveSupport "libarchive")
|
||||||
(enableFeature cddaSupport "cdda")
|
(enableFeature cddaSupport "cdda")
|
||||||
(enableFeature dvdnavSupport "dvdnav")
|
(enableFeature dvdnavSupport "dvdnav")
|
||||||
@ -130,11 +131,13 @@ in stdenv.mkDerivation rec {
|
|||||||
(enableFeature vaapiSupport "vaapi")
|
(enableFeature vaapiSupport "vaapi")
|
||||||
(enableFeature waylandSupport "wayland")
|
(enableFeature waylandSupport "wayland")
|
||||||
(enableFeature stdenv.isLinux "dvbin")
|
(enableFeature stdenv.isLinux "dvbin")
|
||||||
];
|
] # Disable whilst Swift isn't supported
|
||||||
|
++ stdenv.lib.optional (!swiftSupport) "--disable-macos-cocoa-cb";
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
addOpenGLRunpath docutils makeWrapper perl pkgconfig python3 wafHook which
|
addOpenGLRunpath docutils makeWrapper perl pkgconfig python3 wafHook which
|
||||||
];
|
]
|
||||||
|
++ optional swiftSupport swift;
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
ffmpeg_4 freetype libass libpthreadstubs
|
ffmpeg_4 freetype libass libpthreadstubs
|
||||||
@ -171,9 +174,7 @@ in stdenv.mkDerivation rec {
|
|||||||
++ optionals waylandSupport [ wayland wayland-protocols libxkbcommon ]
|
++ optionals waylandSupport [ wayland wayland-protocols libxkbcommon ]
|
||||||
++ optionals x11Support [ libX11 libXext libGLU libGL libXxf86vm libXrandr ]
|
++ optionals x11Support [ libX11 libXext libGLU libGL libXxf86vm libXrandr ]
|
||||||
++ optionals vulkanSupport [ libplacebo shaderc vulkan-headers vulkan-loader ]
|
++ optionals vulkanSupport [ libplacebo shaderc vulkan-headers vulkan-loader ]
|
||||||
++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
|
++ optionals stdenv.isDarwin [ CoreFoundation Cocoa CoreAudio MediaPlayer ];
|
||||||
CoreFoundation Cocoa CoreAudio
|
|
||||||
]);
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
@ -75,6 +75,7 @@ with frameworks; with libs; {
|
|||||||
LocalAuthentication = [];
|
LocalAuthentication = [];
|
||||||
MapKit = [];
|
MapKit = [];
|
||||||
MediaAccessibility = [ CoreGraphics CoreText QuartzCore ];
|
MediaAccessibility = [ CoreGraphics CoreText QuartzCore ];
|
||||||
|
MediaPlayer = [];
|
||||||
MediaToolbox = [ AudioToolbox AudioUnit CoreMedia ];
|
MediaToolbox = [ AudioToolbox AudioUnit CoreMedia ];
|
||||||
Metal = [];
|
Metal = [];
|
||||||
MetalKit = [ ModelIO Metal ];
|
MetalKit = [ ModelIO Metal ];
|
||||||
|
@ -20458,6 +20458,7 @@ in
|
|||||||
|
|
||||||
mpv = callPackage ../applications/video/mpv {
|
mpv = callPackage ../applications/video/mpv {
|
||||||
inherit lua;
|
inherit lua;
|
||||||
|
inherit (darwin.apple_sdk.frameworks) CoreFoundation Cocoa CoreAudio MediaPlayer;
|
||||||
};
|
};
|
||||||
|
|
||||||
mpv-with-scripts = callPackage ../applications/video/mpv/wrapper.nix { };
|
mpv-with-scripts = callPackage ../applications/video/mpv/wrapper.nix { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user