From 4a6aeb670f74ef895878631bc3d832d08e1cb321 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 3 Jul 2015 00:05:16 +0200 Subject: derivations: Add #:substitutable?, distinguished from #:local-build?. Fixes . * guix/derivations.scm (substitutable-derivation?): Rewrite to check for "allowSubstitutes". (derivation): Add #:substitutable? parameter. [user+system-env-vars]: Honor it. (build-expression->derivation): Add #:substitutable? and honor it. * guix/gexp.scm (gexp->derivation): Likewise. * tests/derivations.scm ("derivation-prerequisites-to-build and substitutes, non-substitutable build"): Use #:substitutable? instead of #:local-build?. ("substitutable-derivation?", "derivation-prerequisites-to-build and substitutes, local build"): New tests. * guix/download.scm (url-fetch): Adjust comment. * guix/git-download.scm (git-fetch): Likewise. * guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Use #:substitutable? instead of #:local-build?. * doc/guix.texi (Derivations, G-Expressions): Adjust accordingly. --- guix/gexp.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'guix/gexp.scm') diff --git a/guix/gexp.scm b/guix/gexp.scm index 09b51b3936..49dcc99ac3 100644 --- a/guix/gexp.scm +++ b/guix/gexp.scm @@ -320,7 +320,7 @@ names and file names suitable for the #:allowed-references argument to references-graphs allowed-references leaked-env-vars - local-build?) + local-build? (substitutable? #t)) "Return a derivation NAME that runs EXP (a gexp) with GUILE-FOR-BUILD (a derivation) on SYSTEM. When TARGET is true, it is used as the cross-compilation target triplet for packages referred to by EXP. @@ -439,7 +439,8 @@ The other arguments are as for 'derivation'." #:references-graphs (and=> graphs graphs-file-names) #:allowed-references allowed #:leaked-env-vars leaked-env-vars - #:local-build? local-build?)))) + #:local-build? local-build? + #:substitutable? substitutable?)))) (define* (gexp-inputs exp #:key native?) "Return the input list for EXP. When NATIVE? is true, return only native -- cgit v1.2.3