unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Mathieu Othacehe <m.othacehe@gmail.com>
To: 42634@debbugs.gnu.org
Cc: Mathieu Othacehe <othacehe@gnu.org>
Subject: [bug#42634] [PATCH 1/3] image: Add image-type support.
Date: Fri, 31 Jul 2020 16:49:27 +0200	[thread overview]
Message-ID: <20200731144929.703345-1-othacehe@gnu.org> (raw)
In-Reply-To: <20200731144825.703211-1-othacehe@gnu.org>

* gnu/image.scm (<image-type>): New record,
(image-type, image-type?, image-type-name,
image-type-constructor, os->image): new procedures.
---
 gnu/image.scm | 29 ++++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/gnu/image.scm b/gnu/image.scm
index dc66f2c533..6f8f4828ac 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))
 
 \f
 ;;;
@@ -84,3 +91,23 @@
                       (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) ;string
+  (constructor    image-type-constructor)) ;<operating-system> -> <image>
+
+\f
+;;;
+;;; Image creation.
+;;;
+
+(define* (os->image os #:key type)
+  (let ((constructor (image-type-constructor type)))
+    (constructor os)))
-- 
2.26.2





  reply	other threads:[~2020-07-31 14:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-31 14:48 [bug#42634] [PATCH 0/3] Add image-type support Mathieu Othacehe
2020-07-31 14:49 ` Mathieu Othacehe [this message]
2020-07-31 14:49   ` [bug#42634] [PATCH 2/3] system: image: " Mathieu Othacehe
2020-09-24 15:37     ` Ludovic Courtès
2020-07-31 14:49   ` [bug#42634] [PATCH 3/3] scripts: system: Add support for image-type Mathieu Othacehe
2020-09-24 15:39     ` Ludovic Courtès
2020-09-30  9:51       ` bug#42634: " Mathieu Othacehe
2020-09-24 15:35   ` [bug#42634] [PATCH 1/3] image: Add image-type support Ludovic Courtès
2020-09-24 15:34 ` [bug#42634] [PATCH 0/3] " Ludovic Courtès
2020-09-30  9:50   ` Mathieu Othacehe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200731144929.703345-1-othacehe@gnu.org \
    --to=m.othacehe@gmail.com \
    --cc=42634@debbugs.gnu.org \
    --cc=othacehe@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).