guix-commits
[Top][All Lists]
Advanced

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

05/07: services: cuirass: Remove unneeded conditional.


From: guix-commits
Subject: 05/07: services: cuirass: Remove unneeded conditional.
Date: Mon, 23 Sep 2019 17:41:43 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 46e552cb0f6b7b11600b7c41146f94dce70eee99
Author: Ludovic Courtès <address@hidden>
Date:   Mon Sep 23 22:58:50 2019 +0200

    services: cuirass: Remove unneeded conditional.
    
    * gnu/services/cuirass.scm (cuirass-shepherd-service): Remove unneeded 
'and'.
---
 gnu/services/cuirass.scm | 120 +++++++++++++++++++++++------------------------
 1 file changed, 59 insertions(+), 61 deletions(-)

diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
index 7bd43cd..914a0d3 100644
--- a/gnu/services/cuirass.scm
+++ b/gnu/services/cuirass.scm
@@ -81,70 +81,68 @@
 
 (define (cuirass-shepherd-service config)
   "Return a <shepherd-service> for the Cuirass service with CONFIG."
-  (and
-   (cuirass-configuration? config)
-   (let ((cuirass          (cuirass-configuration-cuirass config))
-         (cache-directory  (cuirass-configuration-cache-directory config))
-         (web-log-file     (cuirass-configuration-web-log-file config))
-         (log-file         (cuirass-configuration-log-file config))
-         (user             (cuirass-configuration-user config))
-         (group            (cuirass-configuration-group config))
-         (interval         (cuirass-configuration-interval config))
-         (database         (cuirass-configuration-database config))
-         (ttl              (cuirass-configuration-ttl config))
-         (port             (cuirass-configuration-port config))
-         (host             (cuirass-configuration-host 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)))
-     (list (shepherd-service
-            (documentation "Run Cuirass.")
-            (provision '(cuirass))
-            (requirement '(guix-daemon networking))
-            (start #~(make-forkexec-constructor
-                      (list (string-append #$cuirass "/bin/cuirass")
-                            "--cache-directory" #$cache-directory
-                            "--specifications"
-                            #$(scheme-file "cuirass-specs.scm" specs)
-                            "--database" #$database
-                            "--ttl" #$(string-append (number->string ttl) "s")
-                            "--interval" #$(number->string interval)
-                            #$@(if use-substitutes? '("--use-substitutes") '())
-                            #$@(if one-shot? '("--one-shot") '())
-                            #$@(if fallback? '("--fallback") '()))
+  (let ((cuirass          (cuirass-configuration-cuirass config))
+        (cache-directory  (cuirass-configuration-cache-directory config))
+        (web-log-file     (cuirass-configuration-web-log-file config))
+        (log-file         (cuirass-configuration-log-file config))
+        (user             (cuirass-configuration-user config))
+        (group            (cuirass-configuration-group config))
+        (interval         (cuirass-configuration-interval config))
+        (database         (cuirass-configuration-database config))
+        (ttl              (cuirass-configuration-ttl config))
+        (port             (cuirass-configuration-port config))
+        (host             (cuirass-configuration-host 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)))
+    (list (shepherd-service
+           (documentation "Run Cuirass.")
+           (provision '(cuirass))
+           (requirement '(guix-daemon networking))
+           (start #~(make-forkexec-constructor
+                     (list (string-append #$cuirass "/bin/cuirass")
+                           "--cache-directory" #$cache-directory
+                           "--specifications"
+                           #$(scheme-file "cuirass-specs.scm" specs)
+                           "--database" #$database
+                           "--ttl" #$(string-append (number->string ttl) "s")
+                           "--interval" #$(number->string interval)
+                           #$@(if use-substitutes? '("--use-substitutes") '())
+                           #$@(if one-shot? '("--one-shot") '())
+                           #$@(if fallback? '("--fallback") '()))
 
-                      #:environment-variables
-                      (list "GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt"
-                            (string-append "GIT_EXEC_PATH=" #$git
-                                           "/libexec/git-core"))
+                     #:environment-variables
+                     (list "GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt"
+                           (string-append "GIT_EXEC_PATH=" #$git
+                                          "/libexec/git-core"))
 
-                      #:user #$user
-                      #:group #$group
-                      #:log-file #$log-file))
-            (stop #~(make-kill-destructor)))
-           (shepherd-service
-            (documentation "Run Cuirass web interface.")
-            (provision '(cuirass-web))
-            (requirement '(guix-daemon networking))
-            (start #~(make-forkexec-constructor
-                      (list (string-append #$cuirass "/bin/cuirass")
-                            "--cache-directory" #$cache-directory
-                            "--specifications"
-                            #$(scheme-file "cuirass-specs.scm" specs)
-                            "--database" #$database
-                            "--ttl" #$(string-append (number->string ttl) "s")
-                            "--web"
-                            "--port" #$(number->string port)
-                            "--listen" #$host
-                            "--interval" #$(number->string interval)
-                            #$@(if use-substitutes? '("--use-substitutes") '())
-                            #$@(if fallback? '("--fallback") '()))
+                     #:user #$user
+                     #:group #$group
+                     #:log-file #$log-file))
+           (stop #~(make-kill-destructor)))
+          (shepherd-service
+           (documentation "Run Cuirass web interface.")
+           (provision '(cuirass-web))
+           (requirement '(guix-daemon networking))
+           (start #~(make-forkexec-constructor
+                     (list (string-append #$cuirass "/bin/cuirass")
+                           "--cache-directory" #$cache-directory
+                           "--specifications"
+                           #$(scheme-file "cuirass-specs.scm" specs)
+                           "--database" #$database
+                           "--ttl" #$(string-append (number->string ttl) "s")
+                           "--web"
+                           "--port" #$(number->string port)
+                           "--listen" #$host
+                           "--interval" #$(number->string interval)
+                           #$@(if use-substitutes? '("--use-substitutes") '())
+                           #$@(if fallback? '("--fallback") '()))
 
-                      #:user #$user
-                      #:group #$group
-                      #:log-file #$web-log-file))
-            (stop #~(make-kill-destructor)))))))
+                     #:user #$user
+                     #:group #$group
+                     #:log-file #$web-log-file))
+           (stop #~(make-kill-destructor))))))
 
 (define (cuirass-account config)
   "Return the user accounts and user groups for CONFIG."



reply via email to

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