anchor.diff:                  ++ optional enableNvidiaCgToolkit nvidia_cg_toolkit
                   ++ optional withVulkan [ vulkan-loader ]
                   ++ optionals stdenv.isDarwin [ libobjc AppKit Foundation ]
  -                ++ optionals stdenv.isLinux [ alsaLib libpulseaudio libv4l libX11
  -                                              libXdmcp libXext libXxf86vm udev ];
  +                ++ optionals stdenv.isLinux [ alsaLib libdrm libpulseaudio libv4l libX11
  +                                              libXdmcp libXext libXxf86vm mesa udev ];
   
     enableParallelBuilding = true;
  +
  +  configureFlags = if stdenv.isLinux then [ "--enable-kms" ] else "";
   
     postInstall = optionalString withVulkan ''
       wrapProgram $out/bin/retroarch --prefix LD_LIBRARY_PATH ':' ${vulkan-loader}/lib
  
positive.code: 
  in stdenv.mkDerivation rec {
    pname = "retroarch-bare";
    version = "1.7.8.4";
  
    src = fetchFromGitHub {
      owner = "libretro";
      repo = "RetroArch";
      sha256 = "1i3i23xwvmck8k2fpalr49np7xjzfg507243mybqrljawlnbxvph";
      rev = "v${version}";
    };
  
  
negative.code: , ffmpeg, libGLU_combined, freetype, libxml2, python3
  , libobjc, AppKit, Foundation
  , alsaLib ? null
  , libdrm ? null
  , libpulseaudio ? null
  , libv4l ? null
  , libX11 ? null
  , libXdmcp ? null
  , libXext ? null
  , libXxf86vm ? null
  , mesa ? null
  , SDL2 ? null
  , udev ? null
  , enableNvidiaCgToolkit ? false, nvidia_cg_toolkit ? null
  