steam: fix readonly boostrap.tar.xz

steam writes it with 444 permissions, which makes
simple deletions fails, and steam will crash

(cherry picked from commit 373cb5d41d)
This commit is contained in:
Jonathan Ringer
2020-12-20 17:27:57 -08:00
committed by Jonathan Ringer
parent 7482d1b568
commit d2f347c2ba

View File

@@ -48,6 +48,14 @@ let
export STEAM_LD_LIBRARY_PATH="$STEAM_LD_LIBRARY_PATH''${STEAM_LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
'';
# bootstrap.tar.xz has 444 permissions, which means that simple deletes fail
# and steam will not be able to start
fixBootstrap = ''
if [ -r $HOME/.local/share/Steam/bootstrap.tar.xz ]; then
chmod +w $HOME/.local/share/Steam/bootstrap.tar.xz
fi
'';
setupSh = writeScript "setup.sh" ''
#!${runtimeShell}
'';
@@ -258,6 +266,7 @@ in buildFHSUserEnv rec {
fi
fi
${lib.optionalString (!nativeOnly) exportLDPath}
${fixBootstrap}
exec steam "$@"
'';
@@ -280,6 +289,7 @@ in buildFHSUserEnv rec {
fi
shift
${lib.optionalString (!nativeOnly) exportLDPath}
${fixBootstrap}
exec -- "$run" "$@"
'';
};