[WIP] nongnu: multiarch-container: Allow extra shared directories.

* 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:
John Kehayias 2023-10-22 15:54:54 -04:00
parent 6ac2849b56
commit 6da06a35b5
No known key found for this signature in database
GPG Key ID: 499097AE5EA815D9

View File

@ -330,6 +330,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))))
@ -362,7 +365,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))))))