Commit 9858b625 authored by Cole Faust's avatar Cole Faust
Browse files

steam: Allow overriding privateTmp

Some programs use /tmp to communicate, and steam having a private tmp
causes issues with that. Allow disabling privateTmp in an override.

Things that rely on /tmp:
  - PROTON_DUMP_DEBUG_COMMANDS dumps files to /tmp, where they can't
    be retrieved because steam-run gets a different /tmp
  - I'm not sure why this is, but in my testing, running tasklist
    through proton + cmd.exe would only show running steam games
    when privateTmp was false. I wanted this to get the windows
    pid of a steam game for attaching to it with Textractor.
  - Communication between teamspeak/arma 3 as reported in
    https://github.com/NixOS/nixpkgs/issues/381923
parent 36fd87ba
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -10,11 +10,12 @@
  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
  privateTmp ? true, # if the steam bubblewrap should isolate /tmp
}:
let
  steamEnv = { name, runScript, passthru ? {}, meta ? {} }:
  buildFHSEnv {
    inherit name runScript passthru meta;
    inherit name runScript passthru meta privateTmp;

    multiArch = true;
    includeClosures = true;
@@ -105,8 +106,6 @@ let
      ${extraProfile}
    '';

    privateTmp = true;

    inherit extraPreBwrapCmds;

    extraBwrapArgs = [