cuirass: Build packages outside of 'evaluate' procedure.

* bin/cuirass.in (evaluate): Move 'build-packages' call to ...
(main): ... here.
pull/3/head
Mathieu Lirzin 2016-06-12 00:43:56 +02:00
parent b4c615fb73
commit 9f5896ccd2
No known key found for this signature in database
GPG Key ID: 0ADEE10094604D37
1 changed files with 13 additions and 14 deletions

View File

@ -91,19 +91,15 @@ DIR if required."
(format #t "prepending ~s to the load path~%" guixdir)
(set! %load-path (cons guixdir %load-path)))
(primitive-load spec)))
((guix-variable 'store 'set-build-options) store
#:use-substitutes? #f)
(build-packages
store
(match ((module-ref %user-module 'hydra-jobs) store '())
(((names . thunks) ...)
(map (lambda (job thunk)
(format (current-error-port) "evaluating '~a'... " job)
(force-output (current-error-port))
(make-job (symbol->string job)
(assoc-ref (call-with-time-display thunk)
'derivation)))
names thunks)))))
(match ((module-ref %user-module 'hydra-jobs) store '())
(((names . thunks) ...)
(map (lambda (job thunk)
(format (current-error-port) "evaluating '~a'... " job)
(force-output (current-error-port))
(make-job (symbol->string job)
(assoc-ref (call-with-time-display thunk)
'derivation)))
names thunks))))
;;;
@ -133,7 +129,10 @@ DIR if required."
(while #t
(pull-changes cachedir)
(compile cachedir)
(evaluate store cachedir jobfile)
(let ((jobs (evaluate store cachedir jobfile)))
((guix-variable 'store 'set-build-options) store
#:use-substitutes? #f)
(build-packages store jobs))
(sleep (string->number (option-ref opts 'interval "60")))))
(lambda ()
((guix-variable 'store 'close-connection) store))))))))