services: cuirass: Add fallback parameter.

* gnu/services/cuirass.scm (<cuirass-configuration>)[fallback?]: New field.
(cuirass-shepherd-service): Take it into account.
* doc/guix.texi (Continuous Integration): Document it.
This commit is contained in:
Mathieu Othacehe 2017-07-13 11:34:26 +02:00
parent 3c14378381
commit c800fd564b
No known key found for this signature in database
GPG key ID: 8354763531769CA6
2 changed files with 8 additions and 0 deletions

View file

@ -14773,6 +14773,10 @@ from source.
@item @code{one-shot?} (default: @code{#f})
Only evaluate specifications and build derivations once.
@item @code{fallback?} (default: @code{#f})
When substituting a pre-built binary fails, fall back to building
packages locally.
@item @code{load-path} (default: @code{'()})
This allows users to define their own packages and make them visible to
cuirass as in @command{guix build} command.

View file

@ -66,6 +66,8 @@ (define-record-type* <cuirass-configuration>
(default #f))
(one-shot? cuirass-configuration-one-shot? ;boolean
(default #f))
(fallback? cuirass-configuration-fallback? ;boolean
(default #f))
(load-path cuirass-configuration-load-path
(default '())))
@ -84,6 +86,7 @@ (define (cuirass-shepherd-service config)
(specs (cuirass-configuration-specifications config))
(use-substitutes? (cuirass-configuration-use-substitutes? config))
(one-shot? (cuirass-configuration-one-shot? config))
(fallback? (cuirass-configuration-fallback? config))
(load-path (cuirass-configuration-load-path config)))
(list (shepherd-service
(documentation "Run Cuirass.")
@ -99,6 +102,7 @@ (define (cuirass-shepherd-service config)
"--interval" #$(number->string interval)
#$@(if use-substitutes? '("--use-substitutes") '())
#$@(if one-shot? '("--one-shot") '())
#$@(if fallback? '("--fallback") '())
#$@(if (null? load-path) '()
`("--load-path" ,(string-join load-path ":"))))
#:user #$user