unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* gexps and ‘with-imported-modules’
@ 2016-07-03 22:20 Ludovic Courtès
  2016-07-04  7:45 ` Alex Kost
  2016-07-12 20:58 ` Ludovic Courtès
  0 siblings, 2 replies; 4+ messages in thread
From: Ludovic Courtès @ 2016-07-03 22:20 UTC (permalink / raw)
  To: guix-devel

Hello!

The ‘wip-gexp-imported-modules’ branch changes gexps so that each gexp
embeds information about which modules need to be imported into its
execution environment.

Before you would do:

  (gexp->derivation "foo"
                    #~(begin
                        (use-modules (guix build utils))
                        …)
                    #:modules '((guix build utils)))

to specify that (guix build utils) must be imported in the build
environment of “foo”.  After, it becomes:

  (gexp->derivation "foo"
                    (with-imported-modules '((guix build utils))
                      #~(begin
                          (use-modules (guix build utils))
                          …)))

The gain (not visible here) is that when you nest gexps, the outermost
gexp now contains all the info about modules that need to be imported.
That way, no side channel is needed to carry the imported module info
(by “side channel”, I mean things like the ‘imported-modules’ field
currently found in <shepherd-service> and several other places.)  Thus,
it should be easier to compose gexps.

I plan to merge it within a day or two.

Comments welcome!

Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-07-12 20:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-03 22:20 gexps and ‘with-imported-modules’ Ludovic Courtès
2016-07-04  7:45 ` Alex Kost
2016-07-04 13:39   ` Ludovic Courtès
2016-07-12 20:58 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).