From 57aa94bd7e7d530e52356723c8f1dbf727144b25 Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Thu, 1 Dec 2016 20:41:08 +0100 Subject: [PATCH] services: cuirass: Put specifications in the store. * gnu/services/cuirass.scm (): Change type of 'specifications' field to an alist to match the documentation example. (cuirass-shepherd-service): Store the provided specifications in a file. Use that file as the "--specification" argument. --- gnu/services/cuirass.scm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm index d843c07335..4975a7e16e 100644 --- a/gnu/services/cuirass.scm +++ b/gnu/services/cuirass.scm @@ -52,8 +52,8 @@ (default 60)) (database cuirass-configuration-database ;string (file-name) (default "/var/run/cuirass/cuirass.db")) - (specifications cuirass-configuration-specifications ;string (file-name) - (default "")) + (specifications cuirass-configuration-specifications ;specification-alist + (default '())) (use-substitutes? cuirass-configuration-use-substitutes? ;boolean (default #f)) (one-shot? cuirass-configuration-one-shot? ;boolean @@ -66,7 +66,7 @@ (let ((cache-directory (cuirass-configuration-cache-directory config)) (interval (cuirass-configuration-interval config)) (database (cuirass-configuration-database config)) - (specifications (cuirass-configuration-specifications config)) + (specs (cuirass-configuration-specifications config)) (use-substitutes? (cuirass-configuration-use-substitutes? config)) (one-shot? (cuirass-configuration-one-shot? config))) (list (shepherd-service @@ -78,9 +78,11 @@ #$@(if (string=? "" cache-directory) '() (list "--cache-directory" cache-directory)) - #$@(if (string=? "" specifications) + #$@(if (null? specs) '() - (list "--specifications" specifications)) + (let ((str (format #f "'~S" specs))) + (list "--specifications" + (plain-file "specs.scm" str)))) "--database" #$database "--interval" #$(number->string interval) #$@(if use-substitutes? '("--use-substitutes") '())