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:
parent
f47638a353
commit
77b0ac905d
|
@ -268,6 +268,7 @@ standard packages used as implicit inputs of the GNU build system."
|
||||||
(system (%current-system))
|
(system (%current-system))
|
||||||
(imported-modules %default-modules)
|
(imported-modules %default-modules)
|
||||||
(modules %default-modules)
|
(modules %default-modules)
|
||||||
|
(substitutable? #t)
|
||||||
allowed-references)
|
allowed-references)
|
||||||
"Return a derivation called NAME that builds from tarball SOURCE, with
|
"Return a derivation called NAME that builds from tarball SOURCE, with
|
||||||
input derivation INPUTS, using the usual procedure of the GNU Build
|
input derivation INPUTS, using the usual procedure of the GNU Build
|
||||||
|
@ -281,6 +282,9 @@ between both, because for Guile's own modules like (ice-9 foo), we want
|
||||||
to use GUILE's own version of it, rather than import the user's one,
|
to use GUILE's own version of it, rather than import the user's one,
|
||||||
which could lead to gratuitous input divergence.
|
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
|
ALLOWED-REFERENCES can be either #f, or a list of packages that the outputs
|
||||||
are allowed to refer to."
|
are allowed to refer to."
|
||||||
(define canonicalize-reference
|
(define canonicalize-reference
|
||||||
|
@ -335,6 +339,11 @@ are allowed to refer to."
|
||||||
#:inputs input-drvs
|
#:inputs input-drvs
|
||||||
#:outputs outputs
|
#:outputs outputs
|
||||||
#:modules imported-modules
|
#:modules imported-modules
|
||||||
|
|
||||||
|
;; XXX: Update when
|
||||||
|
;; <http://bugs.gnu.org/18747> is fixed.
|
||||||
|
#:local-build? (not substitutable?)
|
||||||
|
|
||||||
#:allowed-references
|
#:allowed-references
|
||||||
(and allowed-references
|
(and allowed-references
|
||||||
(map canonicalize-reference
|
(map canonicalize-reference
|
||||||
|
@ -390,6 +399,7 @@ is one of `host' or `target'."
|
||||||
(guix build utils)))
|
(guix build utils)))
|
||||||
(modules '((guix build gnu-build-system)
|
(modules '((guix build gnu-build-system)
|
||||||
(guix build utils)))
|
(guix build utils)))
|
||||||
|
(substitutable? #t)
|
||||||
allowed-references)
|
allowed-references)
|
||||||
"Cross-build NAME for TARGET, where TARGET is a GNU triplet. INPUTS are
|
"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
|
cross-built inputs, and NATIVE-INPUTS are inputs that run on the build
|
||||||
|
@ -473,6 +483,11 @@ platform."
|
||||||
#:inputs (append native-drvs target-drvs)
|
#:inputs (append native-drvs target-drvs)
|
||||||
#:outputs outputs
|
#:outputs outputs
|
||||||
#:modules imported-modules
|
#:modules imported-modules
|
||||||
|
|
||||||
|
;; XXX: Update when
|
||||||
|
;; <http://bugs.gnu.org/18747> is fixed.
|
||||||
|
#:local-build? (not substitutable?)
|
||||||
|
|
||||||
#:allowed-references
|
#:allowed-references
|
||||||
(and allowed-references
|
(and allowed-references
|
||||||
(map canonicalize-reference
|
(map canonicalize-reference
|
||||||
|
|
Loading…
Reference in New Issue