aboutsummaryrefslogtreecommitdiff
path: root/gnu/system/image.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-09-14 16:17:19 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-09-14 16:17:19 -0400
commitfa8fe90edb4efaf7d52f71516c4dcabb13d56418 (patch)
tree8d69a1132e95845d8a3d90f1fe4d0ef04039e2f4 /gnu/system/image.scm
parent1bec03df9b60f156c657a64a323ef27f4ed14b44 (diff)
parentd60739dff2e2f5eb74173b73a5fd207ef7cd110a (diff)
downloadguix-fa8fe90edb4efaf7d52f71516c4dcabb13d56418.tar
guix-fa8fe90edb4efaf7d52f71516c4dcabb13d56418.tar.gz
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'gnu/system/image.scm')
-rw-r--r--gnu/system/image.scm26
1 files changed, 19 insertions, 7 deletions
diff --git a/gnu/system/image.scm b/gnu/system/image.scm
index c1a718d607..97c7021454 100644
--- a/gnu/system/image.scm
+++ b/gnu/system/image.scm
@@ -63,7 +63,8 @@
iso9660-image
find-image
- system-image))
+ system-image
+ image-with-label))
;;;
@@ -266,8 +267,7 @@ used in the image."
#$output
image-root)))))
(computed-file "partition.img" image-builder
- #:options `(#:local-build? #t ;typically large file
- #:references-graphs ,inputs))))
+ #:options `(#:references-graphs ,inputs))))
(define (partition->config partition)
;; Return the genimage partition configuration for PARTITION.
@@ -325,8 +325,7 @@ image ~a {
#~(symlink
(string-append #$image-dir "/" #$genimage-name)
#$output)
- #:options `(#:local-build? #t ;typically large file
- #:substitutable? ,substitutable?))))
+ #:options `(#:substitutable? ,substitutable?))))
;;
@@ -403,10 +402,23 @@ used in the image. "
#:volume-id #$root-label
#:volume-uuid #$root-uuid)))))
(computed-file name builder
- #:options `(#:local-build? #t ;typically large file
- #:references-graphs ,inputs
+ #:options `(#:references-graphs ,inputs
#:substitutable? ,substitutable?))))
+(define (image-with-label base-image label)
+ "The volume ID of an ISO is the label of the first partition. This procedure
+returns an image record where the first partition's label is set to <label>."
+ (image
+ (inherit base-image)
+ (partitions
+ (match (image-partitions base-image)
+ ((boot others ...)
+ (cons
+ (partition
+ (inherit boot)
+ (label label))
+ others))))))
+
;;
;; Image creation.