summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2017-09-03 20:00:13 +0100
committerChristopher Baines <mail@cbaines.net>2017-09-03 20:00:13 +0100
commitce63fc3e470a81906eb0e06203809ec073f31c72 (patch)
treeddc0a9bd73c4568530e301472ac7fae0c1d2e109 /bin
parent7cee071e503ae2c68ba49dc494a4db759e1dd555 (diff)
downloadcuirass-ce63fc3e470a81906eb0e06203809ec073f31c72.tar
cuirass-ce63fc3e470a81906eb0e06203809ec073f31c72.tar.gz
WIP
Diffstat (limited to 'bin')
-rw-r--r--bin/evaluate.in14
1 files changed, 9 insertions, 5 deletions
diff --git a/bin/evaluate.in b/bin/evaluate.in
index d1d0767..3918681 100644
--- a/bin/evaluate.in
+++ b/bin/evaluate.in
@@ -32,7 +32,7 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
(guix store))
(define* (main #:optional (args (command-line)))
- (match args
+ (match (peek "args" args)
((command load-path guix-package-path cachedir specstr database)
;; Load FILE, a Scheme file that defines Hydra jobs.
(let ((%user-module (make-fresh-user-module))
@@ -43,7 +43,7 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
(lambda ()
(set-current-module %user-module)
(with-directory-excursion
- (string-append cachedir "/" (assq-ref spec #:name))
+ (string-append cachedir "/" (assq-ref (peek "spec" spec) #:name))
(primitive-load (assq-ref spec #:file)))))
(with-store store
(unless (assoc-ref spec #:use-substitutes?)
@@ -60,11 +60,15 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
(parameterize ((%package-database database)
(%use-substitutes? (assoc-ref spec #:use-substitutes?)))
(unless (string-null? guix-package-path)
- (set-guix-package-path! guix-package-path))
+ (set-guix-package-path! guix-package-path))
+
;; Call the entry point of FILE and print the resulting job sexp.
(let* ((proc-name (assq-ref spec #:proc))
- (proc (module-ref %user-module proc-name))
- (thunks (proc store (assq-ref spec #:arguments)))
+ (proc (module-ref %user-module proc-name))
+ (thunks (with-directory-excursion
+ (string-append cachedir "/" (assq-ref (peek "spec" spec) #:name))
+
+ (proc store (assq-ref spec #:arguments))))
(db (db-open))
(commit (assq-ref spec #:current-commit))
(eval `((#:specification . ,(assq-ref spec #:name))