From d5073fd113c621fe0b55382f7dd336ee118e759f Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Mon, 30 Aug 2021 18:24:27 +0200 Subject: gnu: Add platform support. * gnu/platform.scm: New file. * gnu/platforms/arm.scm: Ditto. * gnu/platforms/hurd.scm: Ditto. * gnu/local.mk (GNU_SYSTEM_MODULES): Add them. Signed-off-by: Mathieu Othacehe --- gnu/image.scm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'gnu/image.scm') diff --git a/gnu/image.scm b/gnu/image.scm index 75d489490d..2381efa208 100644 --- a/gnu/image.scm +++ b/gnu/image.scm @@ -17,6 +17,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu image) + #:use-module (gnu platform) #:use-module (guix records) #:export (partition partition? @@ -34,7 +35,7 @@ image? image-name image-format - image-target + image-platform image-size image-operating-system image-partitions @@ -47,7 +48,8 @@ image-type-name image-type-constructor - os->image)) + os->image + os+platform->image)) ;;; @@ -78,7 +80,7 @@ (name image-name ;symbol (default #f)) (format image-format) ;symbol - (target image-target + (platform image-platform ; (default #f)) (size image-size ;size in bytes as integer (default 'guess)) @@ -112,3 +114,8 @@ (define* (os->image os #:key type) (let ((constructor (image-type-constructor type))) (constructor os))) + +(define* (os+platform->image os platform #:key type) + (image + (inherit (os->image os #:type type)) + (platform platform))) -- cgit v1.2.3