diff options
author | John Kehayias <john.kehayias@protonmail.com> | 2023-10-22 15:54:54 -0400 |
---|---|---|
committer | John Kehayias <john.kehayias@protonmail.com> | 2024-01-10 11:57:37 -0500 |
commit | 8078757b887a7691644b119913c3f7b41661775d (patch) | |
tree | c88f8131cb2bd72babec6d26bb17eabfd582dacd /nonguix | |
parent | 9a502ae1b0c97b3fa007b5ea059403268cf8981c (diff) |
nonguix: multiarch-container: Allow extra shared directories.
Basic fix for #237.
This allows exposing other directories or drives to the nonguix container, for
example to add additional library locations to Steam, by setting
$GUIX_SANDBOX_EXTRA_SHARES.
* nonguix/multiarch-container.scm (make-container-wrapper): Use environment
variable $GUIX_SANDBOX_EXTRA_SHARES to pass extra directories to share with
the container.
Diffstat (limited to 'nonguix')
-rw-r--r-- | nonguix/multiarch-container.scm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nonguix/multiarch-container.scm b/nonguix/multiarch-container.scm index 6cbd14a..8b54d40 100644 --- a/nonguix/multiarch-container.scm +++ b/nonguix/multiarch-container.scm @@ -335,6 +335,9 @@ in a sandboxed FHS environment." ,@(exists-> (getenv "XAUTHORITY")) #$@(ngc-shared container))) (DEBUG (equal? (getenv "DEBUG") "1")) + (extra-shares (if (getenv "GUIX_SANDBOX_EXTRA_SHARES") + (string-split (getenv "GUIX_SANDBOX_EXTRA_SHARES") #\:) + #f)) (args (cdr (command-line))) (command (if DEBUG '() `("--" ,run ,@args)))) @@ -363,7 +366,9 @@ in a sandboxed FHS environment." ,@(map add-path expose) ,@(map (lambda (item) (add-path item #:writable? #t)) - share) + (if extra-shares + (append share extra-shares) + share)) "-m" ,manifest-file ,@command))))))) |