guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: services: cuirass: Allow passing extra command li


From: guix-commits
Subject: branch master updated: services: cuirass: Allow passing extra command line options.
Date: Sun, 08 Mar 2020 19:54:35 -0400

This is an automated email from the git hooks/post-receive script.

cbaines pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new af96c1e  services: cuirass: Allow passing extra command line options.
af96c1e is described below

commit af96c1e0e42978594b27bcf957d75b304f107998
Author: Christopher Baines <address@hidden>
AuthorDate: Mon Mar 2 08:00:14 2020 +0000

    services: cuirass: Allow passing extra command line options.
    
    This is so that the options supported by the service configuration don't 
have
    to always be changed. Generally though all options should be explicitly
    supported and documented, so this is mostly to facilitate experimentation.
    
    * gnu/services/cuirass.scm (<cuirass-configuration>): Add an extra-options
    field.
    (cuirass-shepherd-service): Pass the extra options to the shepherd 
servvices.
    * doc/guix.texi (Continuous Integration): Document it.
---
 doc/guix.texi            |  3 +++
 gnu/services/cuirass.scm | 13 +++++++++----
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index b192118..1af8084 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -22450,6 +22450,9 @@ Only evaluate specifications and build derivations once.
 When substituting a pre-built binary fails, fall back to building
 packages locally.
 
+@item @code{extra-options} (default: @code{'()})
+Extra options to pass when running the Cuirass processes.
+
 @item @code{cuirass} (default: @code{cuirass})
 The Cuirass package to use.
 @end table
diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
index 7bfb021..0f4f0f9 100644
--- a/gnu/services/cuirass.scm
+++ b/gnu/services/cuirass.scm
@@ -77,7 +77,9 @@
   (one-shot?        cuirass-configuration-one-shot? ;boolean
                     (default #f))
   (fallback?        cuirass-configuration-fallback? ;boolean
-                    (default #f)))
+                    (default #f))
+  (extra-options    cuirass-configuration-extra-options
+                    (default '())))
 
 (define (cuirass-shepherd-service config)
   "Return a <shepherd-service> for the Cuirass service with CONFIG."
@@ -95,7 +97,8 @@
         (specs            (cuirass-configuration-specifications config))
         (use-substitutes? (cuirass-configuration-use-substitutes? config))
         (one-shot?        (cuirass-configuration-one-shot? config))
-        (fallback?        (cuirass-configuration-fallback? config)))
+        (fallback?        (cuirass-configuration-fallback? config))
+        (extra-options    (cuirass-configuration-extra-options config)))
     (list (shepherd-service
            (documentation "Run Cuirass.")
            (provision '(cuirass))
@@ -110,7 +113,8 @@
                            "--interval" #$(number->string interval)
                            #$@(if use-substitutes? '("--use-substitutes") '())
                            #$@(if one-shot? '("--one-shot") '())
-                           #$@(if fallback? '("--fallback") '()))
+                           #$@(if fallback? '("--fallback") '())
+                           #$@extra-options)
 
                      #:environment-variables
                      (list "GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt"
@@ -137,7 +141,8 @@
                            "--listen" #$host
                            "--interval" #$(number->string interval)
                            #$@(if use-substitutes? '("--use-substitutes") '())
-                           #$@(if fallback? '("--fallback") '()))
+                           #$@(if fallback? '("--fallback") '())
+                           #$@extra-options)
 
                      #:user #$user
                      #:group #$group



reply via email to

[Prev in Thread] Current Thread [Next in Thread]