summaryrefslogtreecommitdiff
path: root/gnu/image.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-10-19 12:51:57 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-10-19 13:11:40 -0400
commit5e2140511c1ad9ccd731438b74d61b62111da1e6 (patch)
treea4ff748ad26e121b88469b5d921001ef1382be8f /gnu/image.scm
parent9e3a5ee417ea7fe9721be8804ff047e80c4f22ed (diff)
parent353bdae32f72b720c7ddd706576ccc40e2b43f95 (diff)
downloadguix-patches-5e2140511c1ad9ccd731438b74d61b62111da1e6.tar
guix-patches-5e2140511c1ad9ccd731438b74d61b62111da1e6.tar.gz
Merge branch 'staging'
Conflicts: gnu/packages/admin.scm gnu/packages/commencement.scm gnu/packages/gdb.scm gnu/packages/llvm.scm gnu/packages/package-management.scm gnu/packages/tls.scm
Diffstat (limited to 'gnu/image.scm')
-rw-r--r--gnu/image.scm29
1 files changed, 28 insertions, 1 deletions
diff --git a/gnu/image.scm b/gnu/image.scm
index dc66f2c533..a60d83b175 100644
--- a/gnu/image.scm
+++ b/gnu/image.scm
@@ -39,7 +39,14 @@
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 @@
(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)))