aboutsummaryrefslogtreecommitdiff
path: root/gnu/image.scm
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2021-08-30 18:24:27 +0200
committerMathieu Othacehe <othacehe@gnu.org>2021-10-11 12:05:39 +0000
commitd5073fd113c621fe0b55382f7dd336ee118e759f (patch)
tree1ff84f4482eb1da515a0113a9b73e3aea88bff30 /gnu/image.scm
parent00a132222f62e43a76b1bf7c1973faa31906f29e (diff)
downloadguix-d5073fd113c621fe0b55382f7dd336ee118e759f.tar
guix-d5073fd113c621fe0b55382f7dd336ee118e759f.tar.gz
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 <othacehe@gnu.org>
Diffstat (limited to 'gnu/image.scm')
-rw-r--r--gnu/image.scm13
1 files changed, 10 insertions, 3 deletions
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 <http://www.gnu.org/licenses/>.
(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 ;<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)))