2024-08-01 00:41:47 -04:00
|
|
|
{
|
2024-08-04 13:52:41 -04:00
|
|
|
lib,
|
2024-08-01 00:41:47 -04:00
|
|
|
proton-ge-bin,
|
|
|
|
rsync,
|
|
|
|
...
|
2024-08-04 13:52:41 -04:00
|
|
|
}: let
|
|
|
|
inherit (lib) elemAt match replaceStrings;
|
|
|
|
in
|
|
|
|
proton-ge-bin.overrideAttrs (o: {
|
|
|
|
version = replaceStrings ["-"] ["."] (elemAt (match "^[^0-9]*(.*)" o.version) 0);
|
2024-08-01 00:41:47 -04:00
|
|
|
|
2024-08-04 13:52:41 -04:00
|
|
|
buildInputs = [rsync];
|
2024-08-01 00:41:47 -04:00
|
|
|
|
2024-08-04 13:52:41 -04:00
|
|
|
buildCommand =
|
|
|
|
# bash
|
|
|
|
''
|
|
|
|
runHook preBuild
|
2024-08-01 00:41:47 -04:00
|
|
|
|
2024-08-04 13:52:41 -04:00
|
|
|
echo "Proton should not be installed into environments. Please use programs.steam.extraCompatPackages instead." > $out
|
2024-08-01 00:41:47 -04:00
|
|
|
|
2024-08-04 13:52:41 -04:00
|
|
|
cat $src/compatibilitytool.vdf > ./compatibilitytool.vdf
|
|
|
|
sed -i 's/"GE-Proton[^"]*"/"GE-Proton-Latest"/g' ./compatibilitytool.vdf
|
2024-08-01 00:41:47 -04:00
|
|
|
|
2024-08-04 13:52:41 -04:00
|
|
|
mkdir $steamcompattool
|
|
|
|
cp -a ./compatibilitytool.vdf $steamcompattool/
|
|
|
|
rsync -ar --exclude='compatibilitytool.vdf' $src/* $steamcompattool/
|
|
|
|
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
})
|