Unverified Commit d387afbd authored by K900's avatar K900 Committed by GitHub
Browse files

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

buildFHSEnv, steam: fix privateTmp for sddm, make privateTmp overrideable
parents 5ff5eaf7 25c947b3
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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
+6 −3
Original line number Diff line number Diff line
@@ -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