mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
image: Add image-type support.
* gnu/image.scm (<image-type>): New record, (image-type, image-type?, image-type-name, image-type-constructor, os->image): new procedures. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
This commit is contained in:
parent
2f1f7b6667
commit
99d036ce84
1 changed files with 28 additions and 1 deletions
|
@ -39,7 +39,14 @@ (define-module (gnu image)
|
|||
image-partitions
|
||||
image-compression?
|
||||
image-volatile-root?
|
||||
image-substitutable?))
|
||||
image-substitutable?
|
||||
|
||||
image-type
|
||||
image-type?
|
||||
image-type-name
|
||||
image-type-constructor
|
||||
|
||||
os->image))
|
||||
|
||||
|
||||
;;;
|
||||
|
@ -84,3 +91,23 @@ (define-record-type* <image>
|
|||
(default #t))
|
||||
(substitutable? image-substitutable? ;boolean
|
||||
(default #t)))
|
||||
|
||||
|
||||
;;;
|
||||
;;; Image type.
|
||||
;;;
|
||||
|
||||
(define-record-type* <image-type>
|
||||
image-type make-image-type
|
||||
image-type?
|
||||
(name image-type-name) ;symbol
|
||||
(constructor image-type-constructor)) ;<operating-system> -> <image>
|
||||
|
||||
|
||||
;;;
|
||||
;;; Image creation.
|
||||
;;;
|
||||
|
||||
(define* (os->image os #:key type)
|
||||
(let ((constructor (image-type-constructor type)))
|
||||
(constructor os)))
|
||||
|
|
Loading…
Reference in a new issue