main
1# From https://github.com/powerofthe69/nix-gaming-edge
2{
3 pkgs,
4 renameInternalName ? true,
5}:
6pkgs.stdenv.mkDerivation rec {
7 pname = "proton-cachyos";
8 version = "10.0-20260425-slr";
9
10 src = pkgs.fetchurl {
11 url = "https://github.com/CachyOS/proton-cachyos/releases/download/cachyos-${version}/proton-cachyos-${version}-x86_64_v3.tar.xz";
12 hash = "sha256-1b0yGKQiygZq+GtVc5JrXhQfUL/k2hPd7CvxpmK585k=";
13 };
14
15 nativeBuildInputs = [pkgs.xz];
16 outputs = [
17 "out"
18 "steamcompattool"
19 ];
20
21 installPhase = ''
22 runHook preInstall
23
24 # Create the steamcompat directory
25 mkdir -p $steamcompattool
26 cp -r ./* $steamcompattool/
27
28 # Modify the display name
29 sed -i -r "s|\"display_name\".*|\"display_name\" \"Proton CachyOS\"|" \
30 $steamcompattool/compatibilitytool.vdf
31
32 ${pkgs.lib.optionalString renameInternalName ''
33 sed -i -r 's|"proton-cachyos-[^"]*"(\s*// Internal name)|"Proton CachyOS"\1|' $steamcompattool/compatibilitytool.vdf
34 ''}
35
36 # Create a real folder so that Steam doesn't require reselecting compatibility tool on update
37 mkdir -p $out/share/
38
39 # Create a real folder so that Steam doesn't require reselecting compatibility tool on update
40 mkdir -p $out/share/steam/compatibilitytools.d/proton-cachyos
41
42 #Symlink the files INSIDE, not the folder itself. Oopsie
43 ln -s $steamcompattool/* $out/share/steam/compatibilitytools.d/proton-cachyos/
44
45 runHook postInstall
46 '';
47
48 meta = with pkgs.lib; {
49 description = "Optimized Proton by CachyOS";
50 homepage = "https://github.com/CachyOS/proton-cachyos";
51 license = licenses.bsd3;
52 platforms = ["x86_64-linux"];
53 };
54}