multiarch-container: Place sandbox directory in XDG_DATA_HOME.

* nonguix/multiarch-container.scm (make-container-wrapper): Set
sandbox-home relative to XDG_DATA_HOME.
This commit is contained in:
Herman Rimm 2024-06-17 11:19:29 +02:00
parent a26ba00665
commit a76042b479
No known key found for this signature in database
GPG Key ID: 0DF3F878D2F3C62D

View File

@ -255,10 +255,16 @@ in a sandboxed FHS environment."
`(,file) '()))
(let* ((run #$(file-append fhs-internal "/bin/" (ngc-internal-name container)))
(manifest-file #$(file-append fhs-manifest))
(xdg-data-home (getenv "XDG_DATA_HOME"))
(xdg-runtime (getenv "XDG_RUNTIME_DIR"))
(home (getenv "HOME"))
(sandbox-home (or (getenv "GUIX_SANDBOX_HOME")
(string-append home "/" #$(ngc-sandbox-home container))))
(if xdg-data-home
(string-append xdg-data-home
"/guix-sandbox-home")
(string-append
home "/"
#$(ngc-sandbox-home container)))))
(wayland-display (or (getenv "WAYLAND_DISPLAY")
"wayland-0"))
(preserved-env '("^DBUS_"