mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gexp: Add 'with-imported-modules' macro.
* guix/gexp.scm (<gexp>)[modules]: New field. (gexp-modules): New procedure. (gexp->derivation): Use it and append the result to %MODULES. Update docstring to mark #:modules as deprecated. (current-imported-modules, with-imported-modules): New macros. (gexp): Pass CURRENT-IMPORTED-MODULES as second argument to 'gexp'. (gexp->script): Use and honor 'gexp-modules'; define '%modules'. * tests/gexp.scm ("gexp->derivation & with-imported-modules") ("gexp->derivation & nested with-imported-modules") ("gexp-modules & ungexp", "gexp-modules & ungexp-splicing"): New tests. ("program-file"): Use 'with-imported-modules'. Remove #:modules argument to 'program-file'. * doc/guix.texi (G-Expressions): Document 'with-imported-modules'. Mark #:modules of 'gexp->derivation' as deprecated. * emacs/guix-devel.el: Add syntax for 'with-imported-modules'. (guix-devel-keywords): Add it. * .dir-locals.el: Likewise.
This commit is contained in:
parent
affd7761f3
commit
0bb9929eaa
5 changed files with 142 additions and 10 deletions
|
@ -216,6 +216,7 @@ to find 'modify-phases' keywords."
|
|||
"with-derivation-substitute"
|
||||
"with-directory-excursion"
|
||||
"with-error-handling"
|
||||
"with-imported-modules"
|
||||
"with-monad"
|
||||
"with-mutex"
|
||||
"with-store"))
|
||||
|
@ -306,6 +307,7 @@ Each rule should have a form (SYMBOL VALUE). See `put' for details."
|
|||
(with-derivation-substitute 2)
|
||||
(with-directory-excursion 1)
|
||||
(with-error-handling 0)
|
||||
(with-imported-modules 1)
|
||||
(with-monad 1)
|
||||
(with-mutex 1)
|
||||
(with-store 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue