summary refs log tree commit diff
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2021-08-12 14:23:41 +0200
committerMathieu Othacehe <othacehe@gnu.org>2021-08-12 14:31:54 +0200
commit23b5b168ae95aed04cbaa0598449361af3423688 (patch)
tree9070c5fb630f2e214e7dc343ccedb3e46d0fb0e8
parent1314761bbec40d1370d4b038fbfa1fc91a3d1a2c (diff)
downloadguix-23b5b168ae95aed04cbaa0598449361af3423688.tar.gz
services: cuirass: Add a substitute-urls argument.
* gnu/services/cuirass.scm (<cuirass-remote-worker-configuration>): Add a
substitute-urls field.
(cuirass-remote-worker-shepherd-service): Honor it.
* doc/guix.texi (Cuirass remote building): Document it.
-rw-r--r--doc/guix.texi3
-rw-r--r--gnu/services/cuirass.scm10
2 files changed, 12 insertions, 1 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index ac6c11949f..78c1c09858 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -27928,6 +27928,9 @@ Location of the log file.
 @item @code{publish-port} (default: @code{5558})
 The TCP port of the publish server.  It defaults to @code{5558}.
 
+@item @code{substitute-urls} (default: @code{%default-substitute-urls})
+The list of URLs where to look for substitutes by default.
+
 @item @code{public-key}
 @item @code{private-key}
 Use the specific @var{file}s as the public/private key pair used to sign
diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
index f0df5a6824..4d4f81a3a8 100644
--- a/gnu/services/cuirass.scm
+++ b/gnu/services/cuirass.scm
@@ -25,6 +25,7 @@
   #:use-module (guix channels)
   #:use-module (guix gexp)
   #:use-module (guix records)
+  #:use-module (guix store)
   #:use-module (guix utils)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages ci)
@@ -338,6 +339,8 @@
                     (default "/var/log/cuirass-remote-worker.log"))
   (publish-port     cuirass-remote-worker-configuration-publish-port ;int
                     (default 5558))
+  (substitute-urls  cuirass-remote-worker-configuration-substitute-urls
+                    (default %default-substitute-urls)) ;list of strings
   (public-key       cuirass-remote-worker-configuration-public-key ;string
                     (default #f))
   (private-key      cuirass-remote-worker-configuration-private-key ;string
@@ -348,7 +351,7 @@
 CONFIG."
   (match-record config <cuirass-remote-worker-configuration>
     (cuirass workers server systems log-file publish-port
-             public-key private-key)
+             substitute-urls public-key private-key)
     (list (shepherd-service
            (documentation "Run Cuirass remote build worker.")
            (provision '(cuirass-remote-worker))
@@ -371,6 +374,11 @@ CONFIG."
                                          "--publish-port="
                                          (number->string publish-port)))
                                   '())
+                           #$@(if substitute-urls
+                                  (string-append
+                                   "--substitute-urls="
+                                   (string-join substitute-urls))
+                                  '())
                            #$@(if public-key
                                   (list
                                    (string-append "--public-key="