summaryrefslogtreecommitdiff
path: root/bin/cuirass.in
diff options
context:
space:
mode:
authorMathieu Lirzin <mthl@gnu.org>2016-06-12 01:19:30 +0200
committerMathieu Lirzin <mthl@gnu.org>2016-06-13 18:10:52 +0200
commit49ab3c8b0de993fdc32d90a258e62c485d23af07 (patch)
treedbe4a5c11d4878f3c36614306175daf610b0d572 /bin/cuirass.in
parent9f5896ccd20f7d6966cec57b9920db919fcda464 (diff)
downloadcuirass-49ab3c8b0de993fdc32d90a258e62c485d23af07.tar
cuirass-49ab3c8b0de993fdc32d90a258e62c485d23af07.tar.gz
job: Add <job-spec> record type.
* src/cuirass/job.scm <job-spec>: New record type. (%make-job-spec, make-job-spec, job-spec-name, job-spec-proc) (job-spec-metadata): New procedures. * tests/gnu-system.scm (package-job): Rename to ... (package-job-spec): ... this. Use 'make-job-spec'. (package-cross-job): Rename to ... (package-cross-job-spec): ... this. Use 'make-job-spec'. (tarball-jobs): Rename to ... (tarball-job-specs): ... this. Use 'make-job-spec'. (package->alist): Rename to ... (package-metadata): ... this. Adapt. (package->job): Rename to ... (package->jobspec): ... this. Adapt. (hydra-jobs): Adapt.
Diffstat (limited to 'bin/cuirass.in')
-rw-r--r--bin/cuirass.in14
1 files changed, 6 insertions, 8 deletions
diff --git a/bin/cuirass.in b/bin/cuirass.in
index 2c0e4c8..8eaf842 100644
--- a/bin/cuirass.in
+++ b/bin/cuirass.in
@@ -91,15 +91,13 @@ DIR if required."
(format #t "prepending ~s to the load path~%" guixdir)
(set! %load-path (cons guixdir %load-path)))
(primitive-load spec)))
- (match ((module-ref %user-module 'hydra-jobs) store '())
- (((names . thunks) ...)
- (map (lambda (job thunk)
- (format (current-error-port) "evaluating '~a'... " job)
+ (let ((job-specs ((module-ref %user-module 'hydra-jobs) store '())))
+ (map (match-lambda
+ (($ <job-spec> name thunk metadata)
+ (format (current-error-port) "evaluating '~a'... " name)
(force-output (current-error-port))
- (make-job (symbol->string job)
- (assoc-ref (call-with-time-display thunk)
- 'derivation)))
- names thunks))))
+ (make-job name (call-with-time-display thunk) metadata)))
+ job-specs)))
;;;