diff options
Diffstat (limited to 'gnu/system')
-rw-r--r-- | gnu/system/file-systems.scm | 11 | ||||
-rw-r--r-- | gnu/system/linux-container.scm | 3 |
2 files changed, 13 insertions, 1 deletions
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm index b51d57f079..4cc1221eb8 100644 --- a/gnu/system/file-systems.scm +++ b/gnu/system/file-systems.scm @@ -40,6 +40,7 @@ file-system-dependencies file-system->spec + spec->file-system specification->file-system-mapping uuid @@ -107,6 +108,16 @@ initrd code." (($ <file-system> device title mount-point type flags options _ _ check?) (list device title mount-point type flags options check?)))) +(define (spec->file-system sexp) + "Deserialize SEXP, a list, to the corresponding <file-system> object." + (match sexp + ((device title mount-point type flags options check?) + (file-system + (device device) (title title) + (mount-point mount-point) (type type) + (flags flags) (options options) + (check? check?))))) + (define (specification->file-system-mapping spec writable?) "Read the SPEC and return the corresponding <file-system-mapping>. SPEC is a string of the form \"SOURCE\" or \"SOURCE=TARGET\". The former specifies diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm index 189f9efa79..24e61c3ead 100644 --- a/gnu/system/linux-container.scm +++ b/gnu/system/linux-container.scm @@ -94,9 +94,10 @@ that will be shared with the host system." (gnu build linux-container))) #~(begin (use-modules (gnu build linux-container) + (gnu system file-systems) ;spec->file-system (guix build utils)) - (call-with-container '#$specs + (call-with-container (map spec->file-system '#$specs) (lambda () (setenv "HOME" "/root") (setenv "TMPDIR" "/tmp") |