anchor.diff:      patchShebangs ./TOOLS/
     '';
   
  -  NIX_LDFLAGS = optionalString x11Support "-lX11 -lXext";
  +  NIX_LDFLAGS = optionalString x11Support "-lX11 -lXext "
  +              + optionalString stdenv.isDarwin "-framework CoreFoundation";
   
     configureFlags = [
       "--enable-libmpv-shared"
  
positive.code: , freefont_ttf, freetype, libass, libpthreadstubs
  , lua, luasocket, libuchardet, libiconv ? null, darwin
  
  , x11Support ? true,
      libGLU_combined       ? null,
      libX11     ? null,
      libXext    ? null,
  
negative.code:     ++ optionals x11Support        [ libX11 libXext libGLU_combined libXxf86vm libXrandr ]
      ++ optionals waylandSupport    [ wayland wayland-protocols libxkbcommon ]
      ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
        CoreFoundation libiconv Cocoa CoreAudio
      ]);
  
    enableParallelBuilding = true;
  