gexp: Add #:module-path parameter to 'gexp->derivation'.
* guix/gexp.scm (gexp->derivation): Add #:module-path parameter, and pass it to 'imported-modules' and 'compiled-modules'. * doc/guix.texi (G-Expressions): Adjust accordingly.
This commit is contained in:
parent
a2b63d58d4
commit
4684f301d5
|
@ -2383,6 +2383,7 @@ information about monads.)
|
||||||
[#:system (%current-system)] [#:target #f] [#:inputs '()] @
|
[#:system (%current-system)] [#:target #f] [#:inputs '()] @
|
||||||
[#:hash #f] [#:hash-algo #f] @
|
[#:hash #f] [#:hash-algo #f] @
|
||||||
[#:recursive? #f] [#:env-vars '()] [#:modules '()] @
|
[#:recursive? #f] [#:env-vars '()] [#:modules '()] @
|
||||||
|
[#:module-path @var{%load-path}] @
|
||||||
[#:references-graphs #f] [#:local-build? #f] @
|
[#:references-graphs #f] [#:local-build? #f] @
|
||||||
[#:guile-for-build #f]
|
[#: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
|
||||||
|
@ -2391,8 +2392,8 @@ is true, it is used as the cross-compilation target triplet for packages
|
||||||
referred to by @var{exp}.
|
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 from the current
|
@var{MODULES} is a list of names of Guile modules searched in
|
||||||
search path to be copied in the store, compiled, and made available in
|
@var{MODULE-PATH} to be copied in the store, compiled, and made available in
|
||||||
the load path during the execution of @var{exp}---e.g., @code{((guix
|
the load path during the execution of @var{exp}---e.g., @code{((guix
|
||||||
build utils) (guix build gnu-build-system))}.
|
build utils) (guix build gnu-build-system))}.
|
||||||
|
|
||||||
|
|
|
@ -126,6 +126,7 @@ corresponding derivation."
|
||||||
hash hash-algo recursive?
|
hash hash-algo recursive?
|
||||||
(env-vars '())
|
(env-vars '())
|
||||||
(modules '())
|
(modules '())
|
||||||
|
(module-path %load-path)
|
||||||
(guile-for-build (%guile-for-build))
|
(guile-for-build (%guile-for-build))
|
||||||
references-graphs
|
references-graphs
|
||||||
local-build?)
|
local-build?)
|
||||||
|
@ -134,7 +135,7 @@ derivation) on SYSTEM. When TARGET is true, it is used as the
|
||||||
cross-compilation target triplet for packages referred to by EXP.
|
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 from the current search path to be copied in the store,
|
names of Guile modules searched in MODULE-PATH to be copied in the store,
|
||||||
compiled, and made available in the load path during the execution of
|
compiled, and made available in the load path during the execution of
|
||||||
EXP---e.g., '((guix build utils) (guix build gnu-build-system)).
|
EXP---e.g., '((guix build utils) (guix build gnu-build-system)).
|
||||||
|
|
||||||
|
@ -194,11 +195,13 @@ The other arguments are as for 'derivation'."
|
||||||
(modules (if (pair? %modules)
|
(modules (if (pair? %modules)
|
||||||
(imported-modules %modules
|
(imported-modules %modules
|
||||||
#:system system
|
#:system system
|
||||||
|
#:module-path module-path
|
||||||
#:guile guile-for-build)
|
#:guile guile-for-build)
|
||||||
(return #f)))
|
(return #f)))
|
||||||
(compiled (if (pair? %modules)
|
(compiled (if (pair? %modules)
|
||||||
(compiled-modules %modules
|
(compiled-modules %modules
|
||||||
#:system system
|
#:system system
|
||||||
|
#:module-path module-path
|
||||||
#:guile guile-for-build)
|
#:guile guile-for-build)
|
||||||
(return #f)))
|
(return #f)))
|
||||||
(graphs (if references-graphs
|
(graphs (if references-graphs
|
||||||
|
|
Loading…
Reference in New Issue