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