anchor.diff:      wrapProgram "$out/bin/mangohud" \
         --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ addOpenGLRunpath.driverLink ]} \
         --prefix XDG_DATA_DIRS : "$out/share"
  +  '' + lib.optionalString (gamescopeSupport) ''
  +    if [[ -e "$out/bin/mangoapp" ]]; then
  +      wrapProgram "$out/bin/mangoapp" \
  +        --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ addOpenGLRunpath.driverLink ]} \
  +        --prefix XDG_DATA_DIRS : "$out/share"
  +    fi
     '';
   
     meta = with lib; {
  
positive.code:       libdbus = dbus.lib;
        inherit hwdata libX11;
      })
    ] ++ lib.optional (stdenv.hostPlatform.system == "x86_64-linux") [
      # Support 32bit OpenGL applications by appending the mangohud32
      # lib path to LD_LIBRARY_PATH.
  
negative.code: , libXNVCtrl
  , wayland
  , spdlog
  , glew
  , glfw
  , nlohmann_json
  , xorg
  , addOpenGLRunpath
  , gamescopeSupport ? true # build mangoapp and mangohudctl
  }:
  
  let
  