anchor.diff:    '';
   
     nativeBuildInputs = [ pkg-config ] ++
  -    optional stdenv.isLinux wayland ++
  -    optional withVulkan makeWrapper;
  +    lib.optional stdenv.isLinux wayland ++
  +    lib.optional (runtimeLibs != [ ]) makeWrapper;
   
     buildInputs = [ ffmpeg freetype libxml2 libGLU libGL python3 SDL2 which ] ++
  -    optional enableNvidiaCgToolkit nvidia_cg_toolkit ++
  -    optional withVulkan vulkan-loader ++
  -    optionals stdenv.isDarwin [ libobjc AppKit Foundation ] ++
  -    optionals stdenv.isLinux [
  +    lib.optional enableNvidiaCgToolkit nvidia_cg_toolkit ++
  +    lib.optional withVulkan vulkan-loader ++
  +    lib.optionals stdenv.isDarwin [ libobjc AppKit Foundation ] ++
  +    lib.optionals stdenv.isLinux [
         alsa-lib
  -      libdrm
  -      libpulseaudio
  -      libv4l
         libX11
         libXdmcp
         libXext
         libXxf86vm
  +      libdrm
  +      libpulseaudio
  +      libv4l
  +      libxkbcommon
         mesa
         udev
         wayland
  -      libxkbcommon
       ];
   
     enableParallelBuilding = true;
   
     configureFlags = lib.optionals stdenv.isLinux [ "--enable-kms" "--enable-egl" ];
   
  -  postInstall = optionalString withVulkan ''
  +  postInstall = ''
       mkdir -p $out/share/libretro/info
       # TODO: ideally each core should have its own core information
  -    cp -r ${libretroSuperSrc}/* $out/share/libretro/info
  -    wrapProgram $out/bin/retroarch --prefix LD_LIBRARY_PATH ':' ${vulkan-loader}/lib
  +    cp -r ${libretroCoreInfo}/* $out/share/libretro/info
  +  '' + lib.optionalString (runtimeLibs != [ ]) ''
  +    wrapProgram $out/bin/retroarch \
  +      --prefix LD_LIBRARY_PATH ':' ${lib.makeLibraryPath runtimeLibs}
     '';
   
     preFixup = "rm $out/bin/retroarch-cg2glsl";
   
  -  meta = {
  +  meta = with lib; {
       homepage = "https://libretro.com";
       description = "Multi-platform emulator frontend for libretro cores";
       license = licenses.gpl3Plus;
  
positive.code:   src = fetchFromGitHub {
      owner = "libretro";
      repo = "RetroArch";
      sha256 = "sha256-H2fCA1sM8FZfVnLxBjnKe7RjHJNAn/Antxlos5oFFSY=";
      rev = "v${version}";
    };
  
  
negative.code: , ffmpeg
  , Foundation
  , freetype
  , gamemode
  , libdrm
  , libGL
  , libGLU
  