summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpineapples <>2021-03-05 11:40:43 -0700
committerison <ison@airmail.cc>2021-03-05 11:40:43 -0700
commita31cd4a5ec27c8354f299ac85b73cd9ffded5098 (patch)
tree3e1a1c22278946b8b758d83e746e2b55bfaa750a
parent1404b00a49813754c88418928a947164510f76cc (diff)
nongnu: steam: Audio and D-Bus fixes.
* nongnu/packages/steam-client.scm (make-container-wrapper): Remove the UID variable in favor of XDG_RUNTIME_DIR for dbus and pulse sockets. Preserve the DBUS_SESSION_BUS_ADDRESS environment variable. Signed-off-by: ison <ison@airmail.cc>
-rw-r--r--nongnu/packages/steam-client.scm12
1 files changed, 7 insertions, 5 deletions
diff --git a/nongnu/packages/steam-client.scm b/nongnu/packages/steam-client.scm
index 300c45e..a60a52c 100644
--- a/nongnu/packages/steam-client.scm
+++ b/nongnu/packages/steam-client.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2020 pkill-9
;;; Copyright © 2020, 2021 ison <ison@airmail.cc>
+;;; Copyright © 2021 pineapples
;;;
;;; This file is not part of GNU Guix.
;;;
@@ -311,12 +312,13 @@ in a sandboxed FHS environment."
(define (exists-> file)
(if (and file (file-exists? file))
`(,file) '()))
- (let* ((UID (number->string (passwd:uid (getpwnam (getenv "USER")))))
- (run #$(file-append fhs-internal "/bin/" (ngc-internal-name container)))
+ (let* ((run #$(file-append fhs-internal "/bin/" (ngc-internal-name container)))
(manifest-file #$(file-append fhs-manifest))
+ (xdg-runtime (getenv "XDG_RUNTIME_DIR"))
(home (getenv "HOME"))
(sandbox-home (string-append home "/" #$(ngc-sandbox-home container)))
- (preserved-env '("DISPLAY"
+ (preserved-env '("DBUS_SESSION_BUS_ADDRESS"
+ "DISPLAY"
"DRI_PRIME"
"SDL_AUDIODRIVER"
"STEAM_RUNTIME"
@@ -335,8 +337,8 @@ in a sandboxed FHS environment."
(share `("/dev/shm"
,(string-append sandbox-home "=" home)
,@(exists-> (string-append home "/.config/pulse"))
- ,@(exists-> (string-append "/run/user/" UID "/pulse"))
- ,@(exists-> (string-append "/run/user/" UID "/bus"))
+ ,@(exists-> (string-append xdg-runtime "/pulse"))
+ ,@(exists-> (string-append xdg-runtime "/bus"))
,@(exists-> (getenv "XAUTHORITY"))))
(DEBUG (equal? (getenv "DEBUG") "1"))
(args (cdr (command-line)))