From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id aLP0K0RR7WbhPwEA62LTzQ:P1 (envelope-from ) for ; Fri, 20 Sep 2024 10:41:08 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id aLP0K0RR7WbhPwEA62LTzQ (envelope-from ) for ; Fri, 20 Sep 2024 12:41:08 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=MWSLzDK7; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=V0IU4Prq; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1726828868; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=MGXJGMlBS2JxeQ9UHG5y4t5h/ac6O9cs+W8GkavSdxg=; b=biIT/qB74QkGLnhebhhcLPArHH8rZzqSILG4n5sSF4x+ypG6lhsvtc867MGzaTcft743hU ve0JE6x4X/xNQx7IYLeLs6NmhtsjlmBPndrJs/bFrjcoO0V1jLDKhl9RXmpFYECSlfScB+ gAliHlm4Vj85uJTb/FIbrGqt/QRzjS2uVBUKRuU1twd31pac1vfCtclwNM+fccpMdlJWSx RTLmy3XbWeyzGxrE6KBjysRY03cj9K8QeWnHr+4I4hjd5IMex0c7UKrG6K8qgwVSv89vNV ufGc/l9BlAU0P646QxsAZhyVm01RFcPIkg2sv//Jg6wj/rz/p8CguawAySTxqg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1726828868; a=rsa-sha256; cv=none; b=uMboojcvMYnYJmH/MJJ5JowtxVw4PiujGGtQgJViO1WjxyUEgf0cO32JntaGrSvxwZZkqn buxlqv/9oi7O70sj1AljeVxXbGjcCBiSGeuH8UVdM6d0LrzHud9m1B2hUvs9ODC05l+T5z s4MlVP5ASvMGaEEhL8vd5GqD/u5Pre/GW69SnsuYzbd7ea958BVd/D9o3zRP0x9/hOyXB+ b8c3NgzQrjTy8nWdDmBCSxiCBH90IH51XcvHXtvhOG3c3CvNHrqWvf3CyVUy0UNE0Vw62f k9v90zjG4PUfLgN+vIh0LdnPzyNgtmPkA/enkNPefCCtUJ/35it773yaul2WVg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=MWSLzDK7; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=V0IU4Prq; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" 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 84E44E164 for ; Fri, 20 Sep 2024 12:41:08 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srb3j-0005Hd-DO; Fri, 20 Sep 2024 06:40:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1srb3G-0004y6-VF for guix-patches@gnu.org; Fri, 20 Sep 2024 06:39:51 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1srb3G-0006Ue-NP for guix-patches@gnu.org; Fri, 20 Sep 2024 06:39:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=qRkQ+V7cbQqvpp4N1OyLrTv06n5MQwiFsnRDUcaJYXA=; b=MWSLzDK7DySJK7adJN3dtAdrZNjWt3r9bb6mFXED7VXS/BqCid6inJkay37+/UZEaap7I8TdJdfYmOV94PHsbEqar1HEOqULVMbjBEH5nwKRn1/nrSBmfIAiVyTE3cWmk5cRzKu2B4VigZ5SGSSZZR0QGPO/BxINLeC1c+FRtj4+L3dvNMqemFdSdhkHRdRrysXk+6B9ull9+Ip7Vl3nN4m1t34M7HkNrtg8bR/0O6GY7PRP36kTAu5bK5pP+GoZYVr6A5sGRCLorlqtYIjKVYktJ249U72AzTLeRC5hi58EthcpPGWEp04Pm+2+HgvG8t3dXbYWKhU79oKcv+huQw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1srb3Z-0001Qa-Av for guix-patches@gnu.org; Fri, 20 Sep 2024 06:40:09 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73202] [PATCH v2 13/15] gnu: bootloader: Match records outside the module. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 20 Sep 2024 10:40:09 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73202 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73202@debbugs.gnu.org Received: via spool by 73202-submit@debbugs.gnu.org id=B73202.17268287975345 (code B ref 73202); Fri, 20 Sep 2024 10:40:09 +0000 Received: (at 73202) by debbugs.gnu.org; 20 Sep 2024 10:39:57 +0000 Received: from localhost ([127.0.0.1]:34175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srb3M-0001O6-Ow for submit@debbugs.gnu.org; Fri, 20 Sep 2024 06:39:57 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:49077 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srb2x-0001LI-MB for 73202@debbugs.gnu.org; Fri, 20 Sep 2024 06:39:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1726828739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MGXJGMlBS2JxeQ9UHG5y4t5h/ac6O9cs+W8GkavSdxg=; b=V0IU4Prql54YM2qCJTgGf8JObJRqiSeN9UX6NSd8iTUHNs+mbIJuu1d2PTrz+wRKpkCVOm CbCn+pphSi2/K0GS81MSoI/fbOA2YzdPBHU/Lbu8LxxtKqP10H/kBGCQdGdPf/UTstaRlT AKsaO2UcNB5fy8iNevaqEQlpJdAyFFloja+GX3zBIk9u1TNUjnq9S4pFSP3Cwz2lcV9g36 aP+KhgoL0HdmD4uhrNtfQpcdkmX2v7DY/6xq2Vedf1Wo19xVipz+USkKk9n+c7f7Qsxow6 v5yoryDHFBzTuHl+coknVFV/xXhGYqm7yaBheVzj5O+GlLNi0u82R1nJ2us+sg== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 4ac43d61 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <73202@debbugs.gnu.org>; Fri, 20 Sep 2024 10:38:59 +0000 (UTC) Date: Fri, 20 Sep 2024 12:37:58 +0200 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: , Reply-to: Herman Rimm X-ACL-Warn: , Herman Rimm via Guix-patches From: Herman Rimm via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.91 X-Spam-Score: -4.91 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Queue-Id: 84E44E164 X-TUID: 0SB0JYcMqYY1 * gnu/bootloader.scm (match-bootloader-configuration, match-menu-entry): Add macros. Change-Id: I42cb7541045314c37ffef98fe6efe7f46acd9d9b --- gnu/bootloader.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gnu/bootloader.scm b/gnu/bootloader.scm index 6b08e61492..b1ed187aa2 100644 --- a/gnu/bootloader.scm +++ b/gnu/bootloader.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2022 Reza Alizadeh Majd ;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz> ;;; Copyright © 2024 Lilah Tascheter +;;; Copyright © 2024 Herman Rimm ;;; ;;; This file is part of GNU Guix. ;;; @@ -115,6 +116,9 @@ (define-module (gnu bootloader) bootloader-configuration->gexp bootloader-configurations->gexp + match-bootloader-configuration + match-menu-entry + %efi-supported-systems efi-arch install-efi @@ -642,6 +646,20 @@ (define (bootloader-configurations->gexp bootloader-configs . rest) (apply gbegin (filter-map (cut apply bootloader-configuration->gexp <> rest) bootloader-configs))) +;; In lieu of exporting bootloader-configuration and menu-entry RTDs. +(define-syntax match-bootloader-configuration + (syntax-rules () + "Bind each BOOTLOADER-CONFIGURATION field in FIELDS." + ((_ bootloader-configuration (fields ...) body ...) + (match-record bootloader-configuration + (fields ...) body ...)))) + +(define-syntax match-menu-entry + (syntax-rules () + "Bind each MENU-ENTRY field in FIELDS." + ((_ menu-entry (fields ...) body ...) + (match-record menu-entry (fields ...) body ...)))) + ;;; ;;; Bootloader installation to ESP. -- 2.45.2