dot
vizie's NixOS desktop: Hyprland, CachyOS kernel and gaming tweaks
| 1 | # CachyOS's Proton build (the proton-cachyos-slr package on CachyOS), from the |
| 2 | # upstream release, for programs.steam.extraCompatPackages. Same layout as |
| 3 | # nixpkgs' proton-ge-bin. The x86_64_v3 build is the one CachyOS installs on |
| 4 | # v3/v4/Zen 4 machines. It runs inside the Steam Linux Runtime, which Steam |
| 5 | # downloads by itself the first time a game uses it. |
| 6 | { |
| 7 | lib, |
| 8 | stdenvNoCC, |
| 9 | fetchzip, |
| 10 | }: |
| 11 | |
| 12 | stdenvNoCC.mkDerivation (finalAttrs: { |
| 13 | pname = "proton-cachyos"; |
| 14 | version = "11.0-20261014"; |
| 15 | |
| 16 | toolName = "proton-cachyos--slr-x86_64_v3"; |
| 17 | |
| 18 | src = fetchzip { |
| 19 | url = "https://github.com/CachyOS/proton-cachyos/releases/download/cachyos--slr/.tar.xz"; |
| 20 | hash = "sha256-fHi/LfyvPj2qm8ma6JH+wEJiJO1Htwp6zkbdRSg6Xic="; |
| 21 | }; |
| 22 | |
| 23 | dontUnpack = true; |
| 24 | dontConfigure = true; |
| 25 | dontBuild = true; |
| 26 | |
| 27 | outputs = [ |
| 28 | "out" |
| 29 | "steamcompattool" |
| 30 | ]; |
| 31 | |
| 32 | installPhase = '' |
| 33 | runHook preInstall |
| 34 | echo " should not be installed into environments. Use programs.steam.extraCompatPackages instead." > $out |
| 35 | mkdir $steamcompattool |
| 36 | ln -s $src/* $steamcompattool |
| 37 | rm $steamcompattool/compatibilitytool.vdf |
| 38 | cp $src/compatibilitytool.vdf $steamcompattool |
| 39 | runHook postInstall |
| 40 | ''; |
| 41 | |
| 42 | # Register under CachyOS's own internal name, "proton-cachyos-slr": Steam stores |
| 43 | # the default and per-game compatibility tool by that name, so the choices made |
| 44 | # on CachyOS keep working, and they survive updates (no version in the name). |
| 45 | preFixup = '' |
| 46 | substituteInPlace "$steamcompattool/compatibilitytool.vdf" \ |
| 47 | --replace-fail '"display_name" ""' '"display_name" "proton-cachyos- (steam linux runtime)"' \ |
| 48 | --replace-fail '""' '"proton-cachyos-slr"' |
| 49 | ''; |
| 50 | |
| 51 | meta = { |
| 52 | description = "CachyOS's Proton build, for programs.steam.extraCompatPackages"; |
| 53 | homepage = "https://github.com/CachyOS/proton-cachyos"; |
| 54 | license = lib.licenses.bsd3; |
| 55 | platforms = [ "x86_64-linux" ]; |
| 56 | sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; |
| 57 | }; |
| 58 | }) |