git.iko.soy/typeable/nixpkgs
on master help sign in
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>.

commit152f6087b333ea91e358c976e9a1ee3588314d55 authorMichael Hoang <enzime@users.noreply.github.com> dateMon 16 Jul 2018, 12:49 (8 years ago) parent1cfc496
1 file changed+4−3
pkgs/applications/video/mpv/default.nix+4−3
pkgs/applications/video/mpv/default.nix+4−3
@@ -3,7 +3,7 @@
33, freefont_ttf, freetype, libass, libpthreadstubs
44, lua, luasocket, libuchardet, libiconv ? null, darwin
55
6−, x11Support ? true,
6+, x11Support ? stdenv.isLinux,
77 libGLU_combined ? null,
88 libX11 ? null,
99 libXext ? null,
@@ -98,7 +98,8 @@ in stdenv.mkDerivation rec {
9898 patchShebangs ./TOOLS/
9999 '';
100100
101− NIX_LDFLAGS = optionalString x11Support "-lX11 -lXext";
101+ NIX_LDFLAGS = optionalString x11Support "-lX11 -lXext "
102+ + optionalString stdenv.isDarwin "-framework CoreFoundation";
102103
103104 configureFlags = [
104105 "--enable-libmpv-shared"
@@ -155,7 +156,7 @@ in stdenv.mkDerivation rec {
155156 ++ optionals x11Support [ libX11 libXext libGLU_combined libXxf86vm libXrandr ]
156157 ++ optionals waylandSupport [ wayland wayland-protocols libxkbcommon ]
157158 ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
158− libiconv Cocoa CoreAudio
159+ CoreFoundation libiconv Cocoa CoreAudio
159160 ]);
160161
161162 enableParallelBuilding = true;