nixos-configs/packages/proton-ge-latest/default.nix
matt1432 a79cb29aaf
All checks were successful
Discord / discord commits (push) Has been skipped
feat(steam): add proton pkg that doesn't change name in steam
2024-08-01 00:41:47 -04:00

25 lines
614 B
Nix

{
proton-ge-bin,
rsync,
...
}:
proton-ge-bin.overrideAttrs {
buildInputs = [rsync];
buildCommand =
# bash
''
runHook preBuild
echo "Proton should not be installed into environments. Please use programs.steam.extraCompatPackages instead." > $out
cat $src/compatibilitytool.vdf > ./compatibilitytool.vdf
sed -i 's/"GE-Proton[^"]*"/"GE-Proton-Latest"/g' ./compatibilitytool.vdf
mkdir $steamcompattool
cp -a ./compatibilitytool.vdf $steamcompattool/
rsync -ar --exclude='compatibilitytool.vdf' $src/* $steamcompattool/
runHook postBuild
'';
}