cuirass: Add fallback parameter.

* src/cuirass/base.scm (%fallback?): New exported parameter.
(process-specs)[set-build-options]: Pass fallback parameter.
* bin/cuirass.in (%options): Add fallback.
(main): Set %fallback? parameter.
(show-help): Update.
This commit is contained in:
Mathieu Othacehe 2017-07-11 11:38:18 +02:00 committed by Mathieu Othacehe
parent 707b053024
commit efcef52883
No known key found for this signature in database
GPG Key ID: 8354763531769CA6
2 changed files with 11 additions and 2 deletions

View File

@ -35,6 +35,7 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
--one-shot Evaluate and build jobs only once
--cache-directory=DIR Use DIR for storing repository data
--fallback Fall back to building when the substituter fails.
-L --load-path=DIR Prepend DIR to Guix package module search path.
-S --specifications=SPECFILE
Add specifications from SPECFILE to database.
@ -56,6 +57,7 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
(port (single-char #\p) (value #t))
(interval (single-char #\I) (value #t))
(use-substitutes (value #f))
(fallback (value #f))
(version (single-char #\V) (value #f))
(help (single-char #\h) (value #f))))
@ -73,7 +75,8 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
(option-ref opts 'cache-directory (%package-cachedir)))
(%guix-package-path
(option-ref opts 'load-path (%guix-package-path)))
(%use-substitutes? (option-ref opts 'use-substitutes #f)))
(%use-substitutes? (option-ref opts 'use-substitutes #f))
(%fallback? (option-ref opts 'fallback #f)))
(cond
((option-ref opts 'help #f)
(show-help)

View File

@ -43,7 +43,8 @@
;; Parameters.
%guix-package-path
%package-cachedir
%use-substitutes?))
%use-substitutes?
%fallback?))
(cond-expand
(guile-2.2
@ -56,6 +57,10 @@
;; Define whether to use substitutes
(make-parameter #f))
(define %fallback?
;; Define whether to fall back to building when the substituter fails.
(make-parameter #f))
(define %package-cachedir
;; Define to location of cache directory of this package.
(make-parameter (or (getenv "CUIRASS_CACHEDIR")
@ -204,6 +209,7 @@ directory and the sha1 of the top level commit in this directory."
;; failure.
(set-build-options store
#:use-substitutes? (%use-substitutes?)
#:fallback? (%fallback?)
#:keep-going? #t)
(let* ((spec* (acons #:current-commit commit spec))