Skip to content

Commit

Permalink
steam: fix readonly boostrap.tar.xz
Browse files Browse the repository at this point in the history
steam writes it with 444 permissions, which makes
simple deletions fails, and steam will crash
  • Loading branch information
Jonathan Ringer committed Dec 21, 2020
1 parent ab91cd9 commit 373cb5d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkgs/games/steam/fhsenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,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}
'';
Expand Down Expand Up @@ -264,6 +272,7 @@ in buildFHSUserEnv rec {
fi
fi
${lib.optionalString (!nativeOnly) exportLDPath}
${fixBootstrap}
exec steam "$@"
'';

Expand All @@ -290,6 +299,7 @@ in buildFHSUserEnv rec {
fi
shift
${lib.optionalString (!nativeOnly) exportLDPath}
${fixBootstrap}
exec -- "$run" "$@"
'';
};
Expand Down

0 comments on commit 373cb5d

Please sign in to comment.