mirror of
https://gitlab.com/nonguix/nonguix.git
synced 2024-11-22 00:18:07 +01:00
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.
This commit is contained in:
parent
9a502ae1b0
commit
8078757b88
1 changed files with 6 additions and 1 deletions
|
@ -335,6 +335,9 @@ in a sandboxed FHS environment."
|
||||||
,@(exists-> (getenv "XAUTHORITY"))
|
,@(exists-> (getenv "XAUTHORITY"))
|
||||||
#$@(ngc-shared container)))
|
#$@(ngc-shared container)))
|
||||||
(DEBUG (equal? (getenv "DEBUG") "1"))
|
(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)))
|
(args (cdr (command-line)))
|
||||||
(command (if DEBUG '()
|
(command (if DEBUG '()
|
||||||
`("--" ,run ,@args))))
|
`("--" ,run ,@args))))
|
||||||
|
@ -363,7 +366,9 @@ in a sandboxed FHS environment."
|
||||||
,@(map add-path expose)
|
,@(map add-path expose)
|
||||||
,@(map (lambda (item)
|
,@(map (lambda (item)
|
||||||
(add-path item #:writable? #t))
|
(add-path item #:writable? #t))
|
||||||
share)
|
(if extra-shares
|
||||||
|
(append share extra-shares)
|
||||||
|
share))
|
||||||
"-m" ,manifest-file
|
"-m" ,manifest-file
|
||||||
,@command)))))))
|
,@command)))))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue