diff mbox series

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

Message ID 87jzpgtru5.fsf@gnu.org
State New
Headers show
Series bug#67598: [PATCH v2] gnu: services: guix: Allow gexps evaluating to a list of build-machines | expand

Commit Message

Ludovic Courtès Dec. 14, 2023, 9:08 p.m. UTC
Hi,

Saku Laesvuori <saku@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’.
diff mbox series

Patch

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>