From 9fa6557a7118a2b4fb3373a980f12cd423505a18 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Thu, 26 Mar 2020 04:20:00 -0500 Subject: [PATCH] mpv: fix cocoa backend --- pkgs/applications/video/mpv/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/video/mpv/default.nix b/pkgs/applications/video/mpv/default.nix index f1713fe29d4b..c24d25634a1b 100644 --- a/pkgs/applications/video/mpv/default.nix +++ b/pkgs/applications/video/mpv/default.nix @@ -1,4 +1,4 @@ -{ config, stdenv, fetchurl, fetchFromGitHub, makeWrapper +{ config, stdenv, fetchurl, fetchFromGitHub, makeWrapper, fetchpatch , addOpenGLRunpath, docutils, perl, pkgconfig, python3, wafHook, which , ffmpeg_4, freefont_ttf, freetype, libass, libpthreadstubs, mujs , nv-codec-headers, lua, libuchardet, libiconv ? null @@ -191,6 +191,14 @@ in stdenv.mkDerivation rec { --prefix PYTHONPATH : "${vapoursynth}/lib/${python3.libPrefix}/site-packages:$PYTHONPATH" ''; + patches = stdenv.lib.optionals stdenv.isDarwin [ + # Fix cocoa backend. Remove with the next release + (fetchpatch { + url = "https://github.com/mpv-player/mpv/commit/188169854313b99d01da8f69fe129f0a487eb7c4.patch"; + sha256 = "062sz4666prb2wg1rn5q8brqkzlq6lxn8sxic78a8lb0125c01f7"; + }) + ]; + postInstall = '' # Use a standard font mkdir -p $out/share/mpv