diff options
author | Michael Hoang <enzime@users.noreply.github.com> | 2018-07-16 12:49:38 +1000 |
---|---|---|
committer | Franz Pletz <fpletz@fnordicwalking.de> | 2018-07-16 03:58:15 +0000 |
commit | 152f6087b333ea91e358c976e9a1ee3588314d55 (patch) | |
tree | 4f87475b72c35e8c858ecca249d9d8c16eb15add /pkgs/applications | |
parent | 1cfc4963a90f6b12148cddc9f7527641534415bd (diff) | |
download | nixlib-152f6087b333ea91e358c976e9a1ee3588314d55.tar nixlib-152f6087b333ea91e358c976e9a1ee3588314d55.tar.gz nixlib-152f6087b333ea91e358c976e9a1ee3588314d55.tar.bz2 nixlib-152f6087b333ea91e358c976e9a1ee3588314d55.tar.lz nixlib-152f6087b333ea91e358c976e9a1ee3588314d55.tar.xz nixlib-152f6087b333ea91e358c976e9a1ee3588314d55.tar.zst nixlib-152f6087b333ea91e358c976e9a1ee3588314d55.zip |
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>.
Diffstat (limited to 'pkgs/applications')
-rw-r--r-- | pkgs/applications/video/mpv/default.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/applications/video/mpv/default.nix b/pkgs/applications/video/mpv/default.nix index 7880c3150872..61e3a7d895d8 100644 --- a/pkgs/applications/video/mpv/default.nix +++ b/pkgs/applications/video/mpv/default.nix @@ -3,7 +3,7 @@ , freefont_ttf, freetype, libass, libpthreadstubs , lua, luasocket, libuchardet, libiconv ? null, darwin -, x11Support ? true, +, x11Support ? stdenv.isLinux, libGLU_combined ? null, libX11 ? null, libXext ? null, @@ -98,7 +98,8 @@ in stdenv.mkDerivation rec { patchShebangs ./TOOLS/ ''; - NIX_LDFLAGS = optionalString x11Support "-lX11 -lXext"; + NIX_LDFLAGS = optionalString x11Support "-lX11 -lXext " + + optionalString stdenv.isDarwin "-framework CoreFoundation"; configureFlags = [ "--enable-libmpv-shared" @@ -155,7 +156,7 @@ in stdenv.mkDerivation rec { ++ optionals x11Support [ libX11 libXext libGLU_combined libXxf86vm libXrandr ] ++ optionals waylandSupport [ wayland wayland-protocols libxkbcommon ] ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ - libiconv Cocoa CoreAudio + CoreFoundation libiconv Cocoa CoreAudio ]); enableParallelBuilding = true; |