From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id IEA2KEK6dmXFPQEAG6o9tA:P1 (envelope-from ) for ; Mon, 11 Dec 2023 08:29:06 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id IEA2KEK6dmXFPQEAG6o9tA (envelope-from ) for ; Mon, 11 Dec 2023 08:29:06 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=laesvuori.fi header.s=mail header.b=hvo8tS55; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1702279746; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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=RS95MPd9xAGAThgFTAnEA9a4AwAhQszsCpTA+hJ/deM=; b=eEAZhYj9MgeRRrYEzrV4bkW+qsP7aEo3dbDifHPzHGvvnrVr1k+HPgSb4tWeQIZAQSwLb8 t41uaE/iwbZhNyJ4ATF5wsRp0w72JLnuM2pUQp2KspuzcIdO7+A2CkbF8FWaSJ0U2D6Cay apPauHfB6b/HZ6OX30RKNnf165wy33uEJWOJRyEb7GVQzUxryP24ZoBJ6RpSAmp4wJlhNd FoHuwWTX6H99K/6eimruZpXNbPnNMnq3wu88KX0XH/dQIOVBvrkzJd5N7M8rRdFGccGMHv CXKTjKqi2k091HL0ZMBT5Fqdj45PbdDfkJayc9ngZUN+vme4o6qJ4owMgcSz0w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=laesvuori.fi header.s=mail header.b=hvo8tS55; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1702279746; a=rsa-sha256; cv=none; b=Btn/Ge1BFhUCurBnpFPqo4oAU0xJH4UYj6SbRGtr/5BBbRas8k6O0EKobep5xOVyrIcgIE J2SRPpBpsyY7gQf8T3Bgm9sCTqzxRhnKgwuXGyS7naYYPac3/XbiveT0DDO65/5xDfPZRU BsVQo6i/Ht+ctHKu7dFaR08zwZGZATm0QvQL9yPraA78cLGRgGh/KxhGUgVTY3zu4ru8X0 II1SEb+iu/MihMuUlmNz6j8J+TIqxkTFjHn0efGXydWbVgBwUsuOUS2qI/nkqI+DAG+OOK UBI8pbZlvNoetOcto7qcOiM9kVVJiuSJKQTKILTS8NgyShN7oZhmoASg0XR7pA== 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 5176E20099 for ; Mon, 11 Dec 2023 08:29:06 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCaih-0004qK-18; Mon, 11 Dec 2023 02:28:51 -0500 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 1rCaie-0004q3-0c for guix-patches@gnu.org; Mon, 11 Dec 2023 02:28:48 -0500 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 1rCaid-0008QX-NN for guix-patches@gnu.org; Mon, 11 Dec 2023 02:28:47 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rCais-0006XL-32 for guix-patches@gnu.org; Mon, 11 Dec 2023 02:29:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67598] [PATCH v2] gnu: services: guix: Allow gexps evaluating to a list of build-machines References: <4cb4eac27ae7990eb9c79bcea0c05dbdbe0bdf37.1701595902.git.saku@laesvuori.fi> In-Reply-To: <4cb4eac27ae7990eb9c79bcea0c05dbdbe0bdf37.1701595902.git.saku@laesvuori.fi> Resent-From: Saku Laesvuori Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 11 Dec 2023 07:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67598 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: ludo@gnu.org Cc: 67598@debbugs.gnu.org, Saku Laesvuori Received: via spool by 67598-submit@debbugs.gnu.org id=B67598.170227968525019 (code B ref 67598); Mon, 11 Dec 2023 07:29:02 +0000 Received: (at 67598) by debbugs.gnu.org; 11 Dec 2023 07:28:05 +0000 Received: from localhost ([127.0.0.1]:52360 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rCahx-0006VR-8i for submit@debbugs.gnu.org; Mon, 11 Dec 2023 02:28:05 -0500 Received: from vmi571514.contaboserver.net ([75.119.130.101]:54892 helo=mail.laesvuori.fi) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rCahr-0006Uu-Hq for 67598@debbugs.gnu.org; Mon, 11 Dec 2023 02:28:03 -0500 Received: from X-kone.org.aalto.fi (unknown [130.233.144.30]) by mail.laesvuori.fi (Postfix) with ESMTPSA id 9313E3400FA; Mon, 11 Dec 2023 08:27:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=laesvuori.fi; s=mail; t=1702279665; bh=pzUunZPkbAcING6ZtDIBHLt86H43dYtG1KlsZtNqk24=; h=From:To:Cc:Subject:Date; b=hvo8tS55S3TexS2E5koxuonQQPyPvBLh5XvoUOInHBeAw2I2PZjxyDYega5ulBrD1 Ohog+2YkFKDypVpSsy9+bye1z0QGulhHy04DcNJUQ8zSdkXiqbEFxxBF0HR1+fWWin tiHj+4uND0Snn8OZ12CwcFR6K/oqc5gSsBoWRl9I= Date: Mon, 11 Dec 2023 09:26:14 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 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: Saku Laesvuori X-ACL-Warn: , Saku Laesvuori via Guix-patches From: Saku Laesvuori 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: -6.18 X-Spam-Score: -6.18 X-Migadu-Queue-Id: 5176E20099 X-Migadu-Scanner: mx10.migadu.com X-TUID: zXSBcCz7nI1P * 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 --- doc/guix.texi | 6 ++++-- gnu/services/base.scm | 8 +++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 1fd2e21608..e74aa631b7 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -19316,7 +19316,8 @@ Base Services @anchor{guix-configuration-build-machines} @item @code{build-machines} (default: @code{#f}) This field must be either @code{#f} or a list of gexps evaluating to a -@code{build-machine} record (@pxref{Daemon Offload Setup}). +@code{build-machine} record or to a list of @code{build-machine} records +(@pxref{Daemon Offload Setup}). When it is @code{#f}, the @file{/etc/guix/machines.scm} file is left untouched. Otherwise, the list of of gexps is written to @@ -19385,7 +19386,8 @@ Base Services A list of strings where each element is a substitute URL. @item @code{build-machines} (default: @code{'()}) -A list of gexps that evaluate to @code{build-machine} records +A list of gexps that evaluate to @code{build-machine} records or to a list of +@code{build-machine} records. (@pxref{Daemon Offload Setup}). Using this field, a service may add new build machines to receive builds diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 82c6940780..f060feab12 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -1765,7 +1765,13 @@ (define (guix-machines-files-installation machines) (mkdir-p (dirname machines-file))) ;; Installed the declared machines file. - (symlink #+(scheme-file "machines.scm" machines) + (symlink #+(scheme-file "machines.scm" + #~((@ (srfi srfi-1) concatenate) + (map (lambda (entry) + (if (build-machine? entry) + (list entry) + entry)) + #$machines))) machines-file)))) (define-record-type* base-commit: cd46757c1a0f886848fbb6828c028dd2a2532767 -- 2.41.0