GNU bug report logs - #67598
[PATCH] gnu: services: guix: Allow gexps evaluating to a list of build-machines

Previous Next

Package: guix-patches;

Reported by: Saku Laesvuori <saku <at> laesvuori.fi>

Date: Sun, 3 Dec 2023 09:34:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #16 received at 67598-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Saku Laesvuori <saku <at> laesvuori.fi>
Cc: 67598-done <at> debbugs.gnu.org
Subject: Re: [PATCH v2] gnu: services: guix: Allow gexps evaluating to a
 list of build-machines
Date: Thu, 14 Dec 2023 22:08:34 +0100
[Message part 1 (text/plain, inline)]
Hi,

Saku Laesvuori <saku <at> laesvuori.fi> skribis:

> * gnu/services/base.scm (guix-machines-files-installation): Handle
> machines being a mixed list of build-machines and lists of
> build-machines.
> * doc/guix.texi: Document it.
>
> Change-Id: Ie404562ca0b564413233c3a624046da831893dc3

Applied with the small change below (hadn’t realized earlier that we
could use ‘append-map’).  Thanks!

Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 3a4d8e789c..6539bfd6ce 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1768,12 +1768,12 @@ (define (guix-machines-files-installation machines)
 
         ;; Installed the declared machines file.
         (symlink #+(scheme-file "machines.scm"
-                                #~((@ (srfi srfi-1) concatenate)
-                                   (map (lambda (entry)
-                                          (if (build-machine? entry)
-                                            (list entry)
-                                            entry))
-                                        #$machines)))
+                                #~((@ (srfi srfi-1) append-map)
+                                   (lambda (entry)
+                                     (if (build-machine? entry)
+                                         (list entry)
+                                         entry))
+                                   #$machines))
                  machines-file))))
 
 (define-record-type* <guix-configuration>

This bug report was last modified 1 year and 155 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.