Merge pull request #275857 from tejing1/steam-fix-sddm

buildFHSEnv, steam: fix privateTmp for sddm, make privateTmp overrideable
This commit is contained in:
K900 2023-12-21 20:37:24 +03:00 committed by GitHub
commit d387afbd96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View file

@ -187,6 +187,12 @@ let
x11_args+=(--ro-bind-try "$local_socket" "$local_socket")
fi
${lib.optionalString privateTmp ''
# sddm places XAUTHORITY in /tmp
if [[ "$XAUTHORITY" == /tmp/* ]]; then
x11_args+=(--ro-bind-try "$XAUTHORITY" "$XAUTHORITY")
fi''}
cmd=(
${bubblewrap}/bin/bwrap
--dev-bind /dev /dev

View file

@ -7,6 +7,11 @@
, extraBwrapArgs ? [ ] # extra arguments to pass to bubblewrap (real default is at usage site)
, extraArgs ? "" # arguments to always pass to steam
, extraEnv ? { } # Environment variables to pass to Steam
# steamwebhelper deletes unrelated electron programs' singleton cookies from /tmp on startup:
# https://github.com/ValveSoftware/steam-for-linux/issues/9121
, privateTmp ? true # Whether to separate steam's /tmp from the host system
, withGameSpecificLibraries ? true # include game specific libraries
}@args:
@ -285,9 +290,7 @@ in buildFHSEnv rec {
exec steam ${extraArgs} "$@"
'';
# steamwebhelper deletes unrelated electron programs' singleton cookies from /tmp on startup:
# https://github.com/ValveSoftware/steam-for-linux/issues/9121
privateTmp = true;
inherit privateTmp;
extraPreBwrapCmds = ''
install -m 1777 -d /tmp/dumps