mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
gexp: Add #:script-name parameter to 'gexp->derivation'.
* guix/gexp.scm (gexp->derivation): Add #:script-name parameter. * doc/guix.texi (G-Expressions): Document it.
This commit is contained in:
parent
b6c6105cac
commit
0309e1b0ba
2 changed files with 11 additions and 7 deletions
|
@ -3263,11 +3263,13 @@ information about monads.)
|
||||||
[#:module-path @var{%load-path}] @
|
[#:module-path @var{%load-path}] @
|
||||||
[#:references-graphs #f] [#:allowed-references #f] @
|
[#:references-graphs #f] [#:allowed-references #f] @
|
||||||
[#:leaked-env-vars #f] @
|
[#:leaked-env-vars #f] @
|
||||||
|
[#:script-name (string-append @var{name} "-builder")] @
|
||||||
[#:local-build? #f] [#:substitutable? #t] [#: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
|
Return a derivation @var{name} that runs @var{exp} (a gexp) with
|
||||||
@var{guile-for-build} (a derivation) on @var{system}. When @var{target}
|
@var{guile-for-build} (a derivation) on @var{system}; @var{exp} is
|
||||||
is true, it is used as the cross-compilation target triplet for packages
|
stored in a file called @var{script-name}. When @var{target} is true,
|
||||||
referred to by @var{exp}.
|
it is used as the cross-compilation target triplet for packages referred
|
||||||
|
to by @var{exp}.
|
||||||
|
|
||||||
Make @var{modules} available in the evaluation context of @var{exp};
|
Make @var{modules} available in the evaluation context of @var{exp};
|
||||||
@var{modules} is a list of names of Guile modules searched in
|
@var{modules} is a list of names of Guile modules searched in
|
||||||
|
|
|
@ -331,10 +331,12 @@ (define* (gexp->derivation name exp
|
||||||
references-graphs
|
references-graphs
|
||||||
allowed-references
|
allowed-references
|
||||||
leaked-env-vars
|
leaked-env-vars
|
||||||
local-build? (substitutable? #t))
|
local-build? (substitutable? #t)
|
||||||
|
(script-name (string-append name "-builder")))
|
||||||
"Return a derivation NAME that runs EXP (a gexp) with GUILE-FOR-BUILD (a
|
"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
|
derivation) on SYSTEM; EXP is stored in a file called SCRIPT-NAME. When
|
||||||
cross-compilation target triplet for packages referred to by EXP.
|
TARGET is true, it is used as the cross-compilation target triplet for
|
||||||
|
packages referred to by EXP.
|
||||||
|
|
||||||
Make MODULES available in the evaluation context of EXP; MODULES is a list of
|
Make MODULES available in the evaluation context of EXP; MODULES is a list of
|
||||||
names of Guile modules searched in MODULE-PATH to be copied in the store,
|
names of Guile modules searched in MODULE-PATH to be copied in the store,
|
||||||
|
@ -397,7 +399,7 @@ (define (graphs-file-names graphs)
|
||||||
(sexp (gexp->sexp exp
|
(sexp (gexp->sexp exp
|
||||||
#:system system
|
#:system system
|
||||||
#:target target))
|
#:target target))
|
||||||
(builder (text-file (string-append name "-builder")
|
(builder (text-file script-name
|
||||||
(object->string sexp)))
|
(object->string sexp)))
|
||||||
(modules (if (pair? %modules)
|
(modules (if (pair? %modules)
|
||||||
(imported-modules %modules
|
(imported-modules %modules
|
||||||
|
|
Loading…
Reference in a new issue