From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id uMB3N6EvJF8KBwAA0tVLHw (envelope-from ) for ; Fri, 31 Jul 2020 14:50:09 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 6EYlM6EvJF+XKQAAbx9fmQ (envelope-from ) for ; Fri, 31 Jul 2020 14:50:09 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7148194005D for ; Fri, 31 Jul 2020 14:50:09 +0000 (UTC) Received: from localhost ([::1]:55772 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k1WMK-0005W7-BS for larch@yhetil.org; Fri, 31 Jul 2020 10:50:08 -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 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=gmail.com header.s=20161025 header.b=o046SWUT; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 4.09 X-TUID: AC4lGmVWSGsp * 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))) -- 2.26.2