diff options
| author | Herman Rimm <herman@rimm.ee> | 2024-06-17 11:19:29 +0200 |
|---|---|---|
| committer | Hilton Chain <hako@ultrarare.space> | 2025-04-18 15:11:45 +0800 |
| commit | d6fdc8ced46f55bb4459e0304bf50b0c6e713ade (patch) | |
| tree | d19b5ad1e4a923bbd63b4f8a29bce53f3f6d7e91 | |
| parent | 6f4d87c43a1c2cf992aa60d5b204e887f4cfbf01 (diff) | |
multiarch-container: Support sandbox home relative to XDG_DATA_HOME.
* nonguix/multiarch-container.scm (make-container-wrapper): Set sandbox-home
relative to XDG_DATA_HOME environment variable, if it exists.
Signed-off-by: Hilton Chain <hako@ultrarare.space>
Modified-by: Hilton Chain <hako@ultrarare.space>
| -rw-r--r-- | nonguix/multiarch-container.scm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nonguix/multiarch-container.scm b/nonguix/multiarch-container.scm index 8567542..77dee97 100644 --- a/nonguix/multiarch-container.scm +++ b/nonguix/multiarch-container.scm | |||
| @@ -269,10 +269,13 @@ in a sandboxed FHS environment." | |||
| 269 | `(,file) '())) | 269 | `(,file) '())) |
| 270 | (let* ((run #$(file-append fhs-internal "/bin/" (ngc-internal-name container))) | 270 | (let* ((run #$(file-append fhs-internal "/bin/" (ngc-internal-name container))) |
| 271 | (manifest-file #$(file-append fhs-manifest)) | 271 | (manifest-file #$(file-append fhs-manifest)) |
| 272 | (xdg-data-home (getenv "XDG_DATA_HOME")) | ||
| 272 | (xdg-runtime (getenv "XDG_RUNTIME_DIR")) | 273 | (xdg-runtime (getenv "XDG_RUNTIME_DIR")) |
| 273 | (home (getenv "HOME")) | 274 | (home (getenv "HOME")) |
| 274 | (sandbox-home (or (getenv "GUIX_SANDBOX_HOME") | 275 | (sandbox-home (or (getenv "GUIX_SANDBOX_HOME") |
| 275 | (string-append home "/" #$(ngc-sandbox-home container)))) | 276 | (if xdg-data-home |
| 277 | (in-vicinity xdg-data-home "guix-sandbox-home") | ||
| 278 | (in-vicinity home #$(ngc-sandbox-home container))))) | ||
| 276 | (wayland-display (or (getenv "WAYLAND_DISPLAY") | 279 | (wayland-display (or (getenv "WAYLAND_DISPLAY") |
| 277 | "wayland-0")) | 280 | "wayland-0")) |
| 278 | (preserved-env '("^DBUS_" | 281 | (preserved-env '("^DBUS_" |
