mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-24 21:14:52 +00:00
mpv: add Cocoa support for macOS
Only enable X11 Support on Linux by default. Add CoreFoundation first in the list of buildInputs to ensure that it is loaded before CF-osx allowing it to provide <CoreFoundation/CFAttributedString.h>.
This commit is contained in:
parent
1cfc4963a9
commit
152f6087b3
@ -3,7 +3,7 @@
|
|||||||
, freefont_ttf, freetype, libass, libpthreadstubs
|
, freefont_ttf, freetype, libass, libpthreadstubs
|
||||||
, lua, luasocket, libuchardet, libiconv ? null, darwin
|
, lua, luasocket, libuchardet, libiconv ? null, darwin
|
||||||
|
|
||||||
, x11Support ? true,
|
, x11Support ? stdenv.isLinux,
|
||||||
libGLU_combined ? null,
|
libGLU_combined ? null,
|
||||||
libX11 ? null,
|
libX11 ? null,
|
||||||
libXext ? null,
|
libXext ? null,
|
||||||
@ -98,7 +98,8 @@ in stdenv.mkDerivation rec {
|
|||||||
patchShebangs ./TOOLS/
|
patchShebangs ./TOOLS/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
NIX_LDFLAGS = optionalString x11Support "-lX11 -lXext";
|
NIX_LDFLAGS = optionalString x11Support "-lX11 -lXext "
|
||||||
|
+ optionalString stdenv.isDarwin "-framework CoreFoundation";
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--enable-libmpv-shared"
|
"--enable-libmpv-shared"
|
||||||
@ -155,7 +156,7 @@ in stdenv.mkDerivation rec {
|
|||||||
++ optionals x11Support [ libX11 libXext libGLU_combined libXxf86vm libXrandr ]
|
++ optionals x11Support [ libX11 libXext libGLU_combined libXxf86vm libXrandr ]
|
||||||
++ optionals waylandSupport [ wayland wayland-protocols libxkbcommon ]
|
++ optionals waylandSupport [ wayland wayland-protocols libxkbcommon ]
|
||||||
++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
|
++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
|
||||||
libiconv Cocoa CoreAudio
|
CoreFoundation libiconv Cocoa CoreAudio
|
||||||
]);
|
]);
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user