From d2f347c2ba62e14b5a33c9dfbf2ebc486ecf799f Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Sun, 20 Dec 2020 17:27:57 -0800 Subject: [PATCH] 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 373cb5d41db3a60249dfa2c7481fb46642e11a92) --- pkgs/games/steam/fhsenv.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/games/steam/fhsenv.nix b/pkgs/games/steam/fhsenv.nix index 8d85e6f2a2b7..857cd3b3f480 100644 --- a/pkgs/games/steam/fhsenv.nix +++ b/pkgs/games/steam/fhsenv.nix @@ -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" "$@" ''; };