From a02ad4592cc085ca488a5c4c4c352dba5eaa645b Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 27 Aug 2020 00:32:49 -0400 Subject: gexp: computed-file: Prevent mistakenly overriding default option values. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In order to do so, default to an empty options list, and expose options whose default values are sensitive directly as keyword arguments. * guix/gexp.scm (computed-file): Extract the LOCAL-BUILD? parameter from the OPTIONS parameter to make it a stand-alone keyword argument. Introduce an OPTIONS* binding which is obtained by combining the LOCAL-BUILD? keyword and its value with OPTIONS. * doc/guix.texi (G-Expressions): Adjust doc. Suggested-by: Ludovic Courtès --- doc/guix.texi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'doc/guix.texi') diff --git a/doc/guix.texi b/doc/guix.texi index 56b1cd8976..b1b0ab37d4 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -8327,10 +8327,12 @@ This is the declarative counterpart of @code{text-file}. @end deffn @deffn {Scheme Procedure} computed-file @var{name} @var{gexp} @ - [#:options '(#:local-build? #t)] + [#:local-build? #t] + [#:options '()] Return an object representing the store item @var{name}, a file or -directory computed by @var{gexp}. @var{options} -is a list of additional arguments to pass to @code{gexp->derivation}. +directory computed by @var{gexp}. When @var{local-build?} is true (the +default), the derivation is built locally. @var{options} is a list of +additional arguments to pass to @code{gexp->derivation}. This is the declarative counterpart of @code{gexp->derivation}. @end deffn -- cgit v1.2.3