gnu: Blender: Add the missing Voxel Remesher.
[jackhill/guix/guix.git] / gnu / image.scm
index b05fc69..75d4894 100644 (file)
             partition?
             partition-device
             partition-size
+            partition-offset
             partition-file-system
+            partition-file-system-options
             partition-label
             partition-uuid
             partition-flags
             partition-initializer
 
             image
+            image?
             image-name
             image-format
+            image-target
             image-size
             image-operating-system
             image-partitions
             image-compression?
             image-volatile-root?
-            image-substitutable?))
+            image-substitutable?
+
+            image-type
+            image-type?
+            image-type-name
+            image-type-constructor
+
+            os->image))
 
 \f
 ;;;
 
 (define-record-type* <partition> partition make-partition
   partition?
-  (device      partition-device (default #f))
-  (size        partition-size)
-  (file-system partition-file-system (default "ext4"))
-  (label       partition-label (default #f))
-  (uuid        partition-uuid (default #f))
-  (flags       partition-flags (default '()))
-  (initializer partition-initializer (default #f)))
+  (device               partition-device (default #f))
+  (size                 partition-size)
+  (offset               partition-offset (default 0))
+  (file-system          partition-file-system (default "ext4"))
+  (file-system-options  partition-file-system-options
+                        (default '()))
+  (label                partition-label (default #f))
+  (uuid                 partition-uuid (default #f))
+  (flags                partition-flags (default '()))
+  (initializer          partition-initializer (default #f)))
 
 \f
 ;;;
 (define-record-type* <image>
   image make-image
   image?
+  (name               image-name ;symbol
+                      (default #f))
   (format             image-format) ;symbol
+  (target             image-target
+                      (default #f))
   (size               image-size  ;size in bytes as integer
                       (default 'guess))
   (operating-system   image-operating-system  ;<operating-system>
                       (default #t))
   (substitutable?     image-substitutable? ;boolean
                       (default #t)))
+
+\f
+;;;
+;;; 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>
+
+\f
+;;;
+;;; Image creation.
+;;;
+
+(define* (os->image os #:key type)
+  (let ((constructor (image-type-constructor type)))
+    (constructor os)))