diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-07-03 00:05:16 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-07-03 00:30:55 +0200 |
commit | 4a6aeb670f74ef895878631bc3d832d08e1cb321 (patch) | |
tree | e6c2813bb9d13cb57c4d725614e255392e543a6b /doc | |
parent | 322eeb87d0e5bb608ae1c176611a50297c93cbe8 (diff) | |
download | guix-4a6aeb670f74ef895878631bc3d832d08e1cb321.tar.gz |
derivations: Add #:substitutable?, distinguished from #:local-build?.
Fixes <http://bugs.gnu.org/18747>. * 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.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/guix.texi | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index fdd8fdf9ae..284d667f34 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -2582,7 +2582,8 @@ a derivation is the @code{derivation} procedure: @var{args} [#:outputs '("out")] [#:hash #f] [#:hash-algo #f] @ [#:recursive? #f] [#:inputs '()] [#:env-vars '()] @ [#:system (%current-system)] [#:references-graphs #f] @ - [#:allowed-references #f] [#:leaked-env-vars #f] [#:local-build? #f] + [#:allowed-references #f] [#:leaked-env-vars #f] [#:local-build? #f] @ + [#:substitutable? #t] Build a derivation with the given arguments, and return the resulting @code{<derivation>} object. @@ -2612,6 +2613,11 @@ When @var{local-build?} is true, declare that the derivation is not a good candidate for offloading and should rather be built locally (@pxref{Daemon Offload Setup}). This is the case for small derivations where the costs of data transfers would outweigh the benefits. + +When @var{substitutable?} is false, declare that substitutes of the +derivation's output should not be used (@pxref{Substitutes}). This is +useful, for instance, when building packages that capture details of the +host CPU instruction set. @end deffn @noindent @@ -2651,7 +2657,7 @@ is now deprecated in favor of the much nicer @code{gexp->derivation}. [#:outputs '("out")] [#:hash #f] [#:hash-algo #f] @ [#:recursive? #f] [#:env-vars '()] [#:modules '()] @ [#:references-graphs #f] [#:allowed-references #f] @ - [#:local-build? #f] [#:guile-for-build #f] + [#:local-build? #f] [#:substitutable? #t] [#:guile-for-build #f] Return a derivation that executes Scheme expression @var{exp} as a builder for derivation @var{name}. @var{inputs} must be a list of @code{(name drv-path sub-drv)} tuples; when @var{sub-drv} is omitted, @@ -2674,7 +2680,8 @@ terminates by passing the result of @var{exp} to @code{exit}; thus, when @code{%guile-for-build} fluid is used instead. See the @code{derivation} procedure for the meaning of -@var{references-graphs}, @var{allowed-references}, and @var{local-build?}. +@var{references-graphs}, @var{allowed-references}, @var{local-build?}, +and @var{substitutable?}. @end deffn @noindent @@ -3163,7 +3170,7 @@ information about monads.) [#:module-path @var{%load-path}] @ [#:references-graphs #f] [#:allowed-references #f] @ [#:leaked-env-vars #f] @ - [#:local-build? #f] [#:guile-for-build #f] + [#:local-build? #f] [#:substitutable? #t] [#:guile-for-build #f] Return a derivation @var{name} that runs @var{exp} (a gexp) with @var{guile-for-build} (a derivation) on @var{system}. When @var{target} is true, it is used as the cross-compilation target triplet for packages |