From patchwork Fri Jul 31 14:49:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 23473 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7D33D27BBE5; Fri, 31 Jul 2020 15:50:12 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 23E7127BBE4 for ; Fri, 31 Jul 2020 15:50:12 +0100 (BST) Received: from localhost ([::1]:55772 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k1WMN-0005W7-J1 for patchwork@mira.cbaines.net; Fri, 31 Jul 2020 10:50:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k1WMF-0005Vq-Ed for guix-patches@gnu.org; Fri, 31 Jul 2020 10:50:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55102) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k1WMF-00018t-62 for guix-patches@gnu.org; Fri, 31 Jul 2020 10:50:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k1WMF-0006MV-4K for guix-patches@gnu.org; Fri, 31 Jul 2020 10:50:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42634] [PATCH 1/3] image: Add image-type support. References: <20200731144825.703211-1-othacehe@gnu.org> In-Reply-To: <20200731144825.703211-1-othacehe@gnu.org> Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 31 Jul 2020 14:50:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42634 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 42634@debbugs.gnu.org Cc: Mathieu Othacehe Received: via spool by 42634-submit@debbugs.gnu.org id=B42634.159620698724391 (code B ref 42634); Fri, 31 Jul 2020 14:50:03 +0000 Received: (at 42634) by debbugs.gnu.org; 31 Jul 2020 14:49:47 +0000 Received: from localhost ([127.0.0.1]:38409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k1WLy-0006LL-PX for submit@debbugs.gnu.org; Fri, 31 Jul 2020 10:49:47 -0400 Received: from mail-wr1-f51.google.com ([209.85.221.51]:35535) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k1WLw-0006L6-Ri for 42634@debbugs.gnu.org; Fri, 31 Jul 2020 10:49:45 -0400 Received: by mail-wr1-f51.google.com with SMTP id f1so27700490wro.2 for <42634@debbugs.gnu.org>; Fri, 31 Jul 2020 07:49:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8b2BV/WlZ9M1vWEGVfEgHbdiMBnuYCqTL08PwiTe/6k=; b=o046SWUTcn7aBn5keAI/PtHSsLDaFbjyxLyFuTjotZFMAOdNZs4vSG5T2qI+Fg4ARu YjurRtOWgxrHVNzUzW0rVfoDkmrWaXgDFRelwQ8o6xTVL/j9M6xi0V13WMjaN3fbaa+Z aSdGQawjm9G2QCs8nVnclZSYekqrBupN/D1Z3592dZQ0X6uhGOQYMYAMyPk7GG9X7CrY x1p+uSYP37/mitbGDa9Tmh/ERqRyKGNftwz3Sn3wJXy/+FC85vvYVX7aLAQJLc8o0M3/ ZLxubEXDD0ZfyNpy6mM8TWeZHfDslYM20CtDssWiFH1NNQeSguh4nHtmEOFpgiRu8QkD CvEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8b2BV/WlZ9M1vWEGVfEgHbdiMBnuYCqTL08PwiTe/6k=; b=o4kiVdUAny1zt3V9QZAFgqJyhAoze/B4DFBXaxf6pAiuyOVzghtY+7Df4uIClVTbY4 M/XV+H797xBTibYlTI5V4fAtM4xCmzr62a2sy2k7ezs5L4QyC0eBDvQY7YtmU6okXlgt e9S4uYw4SPU9WVvxCsHpl2ajzOPP2GUqg9eQYW71Jj8IrYwmenon3PTeqA7Cjm+xvyOo KBlD89GEp5mjLcxneJ4AYrOn5HOHcAr+HHf8EOTOcfddntDOGeu8Kts6EVxIui0tRmmE UAQ64gNWSRiU/bd8Jx9RJgy6YGWV1E6eTcF0S56z/Bwz3jKOVru0pw7djOj4MaYche// R/4A== X-Gm-Message-State: AOAM5330bA3PimWsuT82e2qhZ8mSGhZ9ZmxDOv2P8eMR0wgJI/caBiUu TvfPdTiAQ8KtoBvFsuOagZ3e8nHd X-Google-Smtp-Source: ABdhPJxWakB/zqRmkwS8slcudy4RnCFi88OHTbJg+c/BF3dEiQ2QxjBxSHU3x0cfdbw6oH4rx/U/Cg== X-Received: by 2002:adf:bbca:: with SMTP id z10mr3687332wrg.425.1596206978406; Fri, 31 Jul 2020 07:49:38 -0700 (PDT) Received: from cervin.home ([2a01:cb18:832e:5f00:c08f:7d21:ea98:a1c5]) by smtp.gmail.com with ESMTPSA id n189sm12648951wmn.40.2020.07.31.07.49.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jul 2020 07:49:37 -0700 (PDT) From: Mathieu Othacehe X-Google-Original-From: Mathieu Othacehe Date: Fri, 31 Jul 2020 16:49:27 +0200 Message-Id: <20200731144929.703345-1-othacehe@gnu.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/image.scm (): 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)) ;;; @@ -84,3 +91,23 @@ (default #t)) (substitutable? image-substitutable? ;boolean (default #t))) + + +;;; +;;; Image type. +;;; + +(define-record-type* + image-type make-image-type + image-type? + (name image-type-name) ;string + (constructor image-type-constructor)) ; -> + + +;;; +;;; Image creation. +;;; + +(define* (os->image os #:key type) + (let ((constructor (image-type-constructor type))) + (constructor os)))