# CachyOS's Proton build (the proton-cachyos-slr package on CachyOS), from the # upstream release, for programs.steam.extraCompatPackages. Same layout as # nixpkgs' proton-ge-bin. The x86_64_v3 build is the one CachyOS installs on # v3/v4/Zen 4 machines. It runs inside the Steam Linux Runtime, which Steam # downloads by itself the first time a game uses it. { lib, stdenvNoCC, fetchzip, }: stdenvNoCC.mkDerivation (finalAttrs: { pname = "proton-cachyos"; version = "11.0-20261014"; toolName = "proton-cachyos-${finalAttrs.version}-slr-x86_64_v3"; src = fetchzip { url = "https://github.com/CachyOS/proton-cachyos/releases/download/cachyos-${finalAttrs.version}-slr/${finalAttrs.toolName}.tar.xz"; hash = "sha256-fHi/LfyvPj2qm8ma6JH+wEJiJO1Htwp6zkbdRSg6Xic="; }; dontUnpack = true; dontConfigure = true; dontBuild = true; outputs = [ "out" "steamcompattool" ]; installPhase = '' runHook preInstall echo "${finalAttrs.pname} should not be installed into environments. Use programs.steam.extraCompatPackages instead." > $out mkdir $steamcompattool ln -s $src/* $steamcompattool rm $steamcompattool/compatibilitytool.vdf cp $src/compatibilitytool.vdf $steamcompattool runHook postInstall ''; # Register under CachyOS's own internal name, "proton-cachyos-slr": Steam stores # the default and per-game compatibility tool by that name, so the choices made # on CachyOS keep working, and they survive updates (no version in the name). preFixup = '' substituteInPlace "$steamcompattool/compatibilitytool.vdf" \ --replace-fail '"display_name" "${finalAttrs.toolName}"' '"display_name" "proton-cachyos-${finalAttrs.version} (steam linux runtime)"' \ --replace-fail '"${finalAttrs.toolName}"' '"proton-cachyos-slr"' ''; meta = { description = "CachyOS's Proton build, for programs.steam.extraCompatPackages"; homepage = "https://github.com/CachyOS/proton-cachyos"; license = lib.licenses.bsd3; platforms = [ "x86_64-linux" ]; sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; }; })