summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJan Nieuwenhuizen <janneke@gnu.org>2016-09-15 22:50:42 +0200
committerMathieu Lirzin <mthl@gnu.org>2016-09-23 16:16:29 +0200
commitfca42b010e56532fded536534ccb15b078a33e77 (patch)
tree39cd0215f7b52c3ef97477fa8c15f9640d9585b9 /bin
parentff7c3a11f2b32336cb185479ae7ab0a864644715 (diff)
downloadcuirass-fca42b010e56532fded536534ccb15b078a33e77.tar
cuirass-fca42b010e56532fded536534ccb15b078a33e77.tar.gz
cuirass: Optionally support using of substitutes.
* bin/cuirass.in (options): Add --use-substitutes. (show-help): Idem. (main): Set %use-substitutes?. Signed-off-by: Mathieu Lirzin <mthl@gnu.org>
Diffstat (limited to 'bin')
-rw-r--r--bin/cuirass.in5
-rw-r--r--bin/evaluate.in8
2 files changed, 9 insertions, 4 deletions
diff --git a/bin/cuirass.in b/bin/cuirass.in
index 553a5d0..88813b8 100644
--- a/bin/cuirass.in
+++ b/bin/cuirass.in
@@ -35,6 +35,7 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
Add specifications from SPECFILE to database.
-D --database=DB Use DB to store build results.
-I, --interval=N Wait N seconds between each poll
+ --use-substitutes Allow usage of pre-built substitutes
-V, --version Display version
-h, --help Display this help message")
(newline)
@@ -46,6 +47,7 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
(specifications (single-char #\S) (value #t))
(database (single-char #\D) (value #t))
(interval (single-char #\I) (value #t))
+ (use-substitutes (value #f))
(version (single-char #\V) (value #f))
(help (single-char #\h) (value #f))))
@@ -60,7 +62,8 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
((%program-name (car args))
(%package-database (option-ref opts 'database (%package-database)))
(%package-cachedir
- (option-ref opts 'cache-directory (%package-cachedir))))
+ (option-ref opts 'cache-directory (%package-cachedir)))
+ (%use-substitutes? (option-ref opts 'use-substitutes #f)))
(cond
((option-ref opts 'help #f)
(show-help)
diff --git a/bin/evaluate.in b/bin/evaluate.in
index f0542ce..767e15e 100644
--- a/bin/evaluate.in
+++ b/bin/evaluate.in
@@ -44,8 +44,9 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
(string-append cachedir "/" (assq-ref spec #:name))
(primitive-load (assq-ref spec #:file)))))
(with-store store
- ;; Make sure we don't resort to substitutes.
- (set-build-options store #:use-substitutes? #f #:substitute-urls '())
+ (unless (assoc-ref spec #:use-substitutes?)
+ ;; Make sure we don't resort to substitutes.
+ (set-build-options store #:use-substitutes? #f #:substitute-urls '()))
;; Grafts can trigger early builds. We do not want that to happen
;; during evaluation, so use a sledgehammer to catch such problems.
(set! build-things
@@ -54,7 +55,8 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
stderr)
(simple-format stderr "'build-things' arguments: ~S~%" args)
(exit 1)))
- (parameterize ((%package-database database))
+ (parameterize ((%package-database database)
+ (%use-substitutes? (assoc-ref spec #:use-substitutes?)))
;; Call the entry point of FILE and print the resulting job sexp.
(let* ((proc (module-ref %user-module 'hydra-jobs))
(thunks (proc store (assq-ref spec #:arguments)))