Skip to content

Commit 100bea9

Browse files
authored
proton-ge-bin: refactor (#377012)
2 parents d2f4dcb + a94bd68 commit 100bea9

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

pkgs/by-name/pr/proton-ge-bin/package.nix

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,17 @@ stdenvNoCC.mkDerivation (finalAttrs: {
1313
hash = "sha256-L0GkzpSn4f6dLDOm2iDJr8D1DINTHNW9Kkn1xFTuqfo=";
1414
};
1515

16+
dontUnpack = true;
17+
dontConfigure = true;
18+
dontBuild = true;
19+
1620
outputs = [
1721
"out"
1822
"steamcompattool"
1923
];
2024

21-
buildCommand = ''
22-
runHook preBuild
25+
installPhase = ''
26+
runHook preInstall
2327
2428
# Make it impossible to add to an environment. You should use the appropriate NixOS option.
2529
# Also leave some breadcrumbs in the file.
@@ -30,10 +34,14 @@ stdenvNoCC.mkDerivation (finalAttrs: {
3034
rm $steamcompattool/{compatibilitytool.vdf,proton,version}
3135
cp $src/{compatibilitytool.vdf,proton,version} $steamcompattool
3236
33-
sed -i -r 's|GE-Proton[0-9]*-[0-9]*|GE-Proton|' $steamcompattool/compatibilitytool.vdf
34-
sed -i -r 's|GE-Proton[0-9]*-[0-9]*|GE-Proton|' $steamcompattool/proton
37+
runHook postInstall
38+
'';
3539

36-
runHook postBuild
40+
preFixup = ''
41+
substituteInPlace "$steamcompattool/compatibilitytool.vdf" \
42+
--replace-fail "${finalAttrs.version}" "GE-Proton"
43+
substituteInPlace "$steamcompattool/proton" \
44+
--replace-fail "${finalAttrs.version}" "GE-Proton"
3745
'';
3846

3947
/*
@@ -62,6 +70,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
6270
license = lib.licenses.bsd3;
6371
maintainers = with lib.maintainers; [
6472
NotAShelf
73+
Scrumplex
6574
shawn8901
6675
];
6776
platforms = [ "x86_64-linux" ];

0 commit comments

Comments
 (0)