Unverified Commit fa182a96 authored by Franz Pletz's avatar Franz Pletz Committed by GitHub
Browse files

mpv: Fix build on darwin (#395177)

parents 1e6569b4 08181ad1
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -227,6 +227,13 @@ stdenv.mkDerivation (finalAttrs: {
    ++ lib.optionals zimgSupport [ zimg ]
    ++ lib.optionals stdenv.hostPlatform.isLinux [ nv-codec-headers-11 ];

  # https://github.com/mpv-player/mpv/issues/15591#issuecomment-2764797522
  # In file included from ../player/clipboard/clipboard-mac.m:19:
  # ./osdep/mac/swift.h:270:9: fatal error: '.../app_bridge_objc-1.pch' file not found
  env = lib.optionalAttrs (stdenv.hostPlatform.isDarwin) {
    NIX_SWIFTFLAGS_COMPILE = "-disable-bridging-pch";
  };

  postBuild = lib.optionalString stdenv.hostPlatform.isDarwin ''
    pushd .. # Must be run from the source dir because it uses relative paths
    python3 TOOLS/osxbundle.py -s build/mpv