build-system/gnu: Add #:substitutable? parameter.

* guix/build-system/gnu.scm (gnu-build): Add #:substitutable?
  parameter.  Pass #:local-build? to 'build-expression->derivation'.
  (gnu-cross-build): Likewise.
This commit is contained in:
Ludovic Courtès 2014-10-28 10:17:13 +01:00
parent f47638a353
commit 77b0ac905d

View file

@ -268,6 +268,7 @@ (define* (gnu-build store name input-drvs
(system (%current-system))
(imported-modules %default-modules)
(modules %default-modules)
(substitutable? #t)
allowed-references)
"Return a derivation called NAME that builds from tarball SOURCE, with
input derivation INPUTS, using the usual procedure of the GNU Build
@ -281,6 +282,9 @@ (define* (gnu-build store name input-drvs
to use GUILE's own version of it, rather than import the user's one,
which could lead to gratuitous input divergence.
SUBSTITUTABLE? determines whether users may be able to use substitutes of the
returned derivations, or whether they should always build it locally.
ALLOWED-REFERENCES can be either #f, or a list of packages that the outputs
are allowed to refer to."
(define canonicalize-reference
@ -335,6 +339,11 @@ (define guile-for-build
#:inputs input-drvs
#:outputs outputs
#:modules imported-modules
;; XXX: Update when
;; <http://bugs.gnu.org/18747> is fixed.
#:local-build? (not substitutable?)
#:allowed-references
(and allowed-references
(map canonicalize-reference
@ -390,6 +399,7 @@ (define* (gnu-cross-build store name
(guix build utils)))
(modules '((guix build gnu-build-system)
(guix build utils)))
(substitutable? #t)
allowed-references)
"Cross-build NAME for TARGET, where TARGET is a GNU triplet. INPUTS are
cross-built inputs, and NATIVE-INPUTS are inputs that run on the build
@ -473,6 +483,11 @@ (define guile-for-build
#:inputs (append native-drvs target-drvs)
#:outputs outputs
#:modules imported-modules
;; XXX: Update when
;; <http://bugs.gnu.org/18747> is fixed.
#:local-build? (not substitutable?)
#:allowed-references
(and allowed-references
(map canonicalize-reference