build-system/gnu: Add #:disallowed-references.

* guix/build-system/gnu.scm (gnu-build): Add #:disallowed-references and
honor it.
(gnu-cross-build): Likewise.
This commit is contained in:
Ludovic Courtès 2016-03-20 22:46:45 +01:00
parent 3f4ecf3229
commit 55e1f25d89

View file

@ -296,7 +296,8 @@ (define* (gnu-build store name input-drvs
(imported-modules %gnu-build-system-modules) (imported-modules %gnu-build-system-modules)
(modules %default-modules) (modules %default-modules)
(substitutable? #t) (substitutable? #t)
allowed-references) allowed-references
disallowed-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
System. The builder is run with GUILE, or with the distro's final Guile System. The builder is run with GUILE, or with the distro's final Guile
@ -313,7 +314,8 @@ (define* (gnu-build store name input-drvs
returned derivations, or whether they should always build it locally. 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. Likewise for DISALLOWED-REFERENCES, which lists
packages that must not be referenced."
(define canonicalize-reference (define canonicalize-reference
(match-lambda (match-lambda
((? package? p) ((? package? p)
@ -378,6 +380,10 @@ (define guile-for-build
(and allowed-references (and allowed-references
(map canonicalize-reference (map canonicalize-reference
allowed-references)) allowed-references))
#:disallowed-references
(and disallowed-references
(map canonicalize-reference
disallowed-references))
#:guile-for-build guile-for-build)) #:guile-for-build guile-for-build))
@ -432,7 +438,8 @@ (define* (gnu-cross-build store name
(imported-modules %gnu-build-system-modules) (imported-modules %gnu-build-system-modules)
(modules %default-modules) (modules %default-modules)
(substitutable? #t) (substitutable? #t)
allowed-references) allowed-references
disallowed-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
platform." platform."
@ -524,6 +531,10 @@ (define guile-for-build
(and allowed-references (and allowed-references
(map canonicalize-reference (map canonicalize-reference
allowed-references)) allowed-references))
#:disallowed-references
(and disallowed-references
(map canonicalize-reference
disallowed-references))
#:guile-for-build guile-for-build)) #:guile-for-build guile-for-build))
(define gnu-build-system (define gnu-build-system