[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#73202] [PATCH v2 07/15] guix: records: Add wrap-element procedure.
From: |
Herman Rimm |
Subject: |
[bug#73202] [PATCH v2 07/15] guix: records: Add wrap-element procedure. |
Date: |
Fri, 20 Sep 2024 12:37:52 +0200 |
* guix/records.scm (wrap-element): Add procedure.
Change-Id: If121c5d856e815776830282a0701a73e5ae2a7e7
---
guix/records.scm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/guix/records.scm b/guix/records.scm
index c084441441..b521a59257 100644
--- a/guix/records.scm
+++ b/guix/records.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012-2024 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2024 Lilah Tascheter <lilah@lunabee.space>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -31,6 +32,8 @@ (define-module (guix records)
alist->record
object->fields
recutils->alist
+ wrap-element
+
match-record
match-record-lambda))
@@ -606,6 +609,10 @@ (define (recutils->alist port)
(else
(error "unmatched line" line))))))))
+(define (wrap-element x)
+ "Sanitize a record field value X to a list."
+ (if (list? x) x (list x)))
+
;;;
;;; Pattern matching.
--
2.45.2
- [bug#73202] [PATCH v2 09/15] gnu: bootloader: Add bootloader-configurations->gexp., (continued)
- [bug#73202] [PATCH v2 09/15] gnu: bootloader: Add bootloader-configurations->gexp., Herman Rimm, 2024/09/20
- [bug#73202] [PATCH v2 01/15] gnu: bootloader: Remove deprecated bootloader-configuration field., Herman Rimm, 2024/09/20
- [bug#73202] [PATCH v2 02/15] gnu: system: Remove useless boot parameters., Herman Rimm, 2024/09/20
- [bug#73202] [PATCH v2 03/15] gnu: tests: reconfigure: Remove bootloader install test., Herman Rimm, 2024/09/20
- [bug#73202] [PATCH v2 11/15] gnu: build: bootloader: Add efi-bootnums procedure., Herman Rimm, 2024/09/20
- [bug#73202] [PATCH v2 08/15] gnu: bootloader: Add bootloader-target record and infastructure., Herman Rimm, 2024/09/20
- [bug#73202] [PATCH v2 06/15] guix: utils: Add flatten and flat-map from haunt., Herman Rimm, 2024/09/20
- [bug#73202] [PATCH v2 10/15] gnu: bootloader: Add device-subvol field to menu-entry record., Herman Rimm, 2024/09/20
- [bug#73202] [PATCH v2 12/15] gnu: bootloader: Install any bootloader to ESP., Herman Rimm, 2024/09/20
- [bug#73202] [PATCH v2 05/15] guix: scripts: Rewrite reinstall-bootloader to use provenance data., Herman Rimm, 2024/09/20
- [bug#73202] [PATCH v2 07/15] guix: records: Add wrap-element procedure.,
Herman Rimm <=
- [bug#73202] [PATCH v2 15/15] teams: Add bootloading team., Herman Rimm, 2024/09/20
- [bug#73202] [PATCH v2 13/15] gnu: bootloader: Match records outside the module., Herman Rimm, 2024/09/20
- [bug#73202] [PATCH v2 14/15] gnu: system: boot: Add procedure., Herman Rimm, 2024/09/20
- [bug#73202] [PATCH v2 00/15] Preparation for bootloader rewrite., Herman Rimm, 2024/09/21
- [bug#73202] [PATCH v3 01/14] gnu: bootloader: Remove deprecated bootloader-configuration field., Herman Rimm, 2024/09/26