all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#36162] [PATCH 0/4] Add 'remote-eval'
@ 2019-06-10 21:08 Ludovic Courtès
  2019-06-10 21:41 ` [bug#36162] [PATCH 1/4] gexp: Add 'lower-gexp' and express 'gexp->derivation' in terms of it Ludovic Courtès
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Ludovic Courtès @ 2019-06-10 21:08 UTC (permalink / raw)
  To: 36162

Hello Guix!

This patch series add ‘remote-eval’, which takes a gexp, remotely deploys
everything the gexp refers to, and evaluates it (see
<https://lists.gnu.org/archive/html/guix-devel/2019-03/msg00127.html> for
the initial discussion.)  So you can have gexps like:

  #~(execl #$(file-append ffmpeg "/bin/ffmpeg") …)

When you evaluate it, this specific ‘ffmpeg’ will be deployed over there.
Another example is:

  (with-imported-modules (source-module-closure '((gnu services herd)))
    #~(begin
        (use-modules (gnu services herd))
        (map live-service-provision (current-services))))

This gexp, when evaluated remotely, will use your very own (gnu services
herd) module and the corresponding Guile (so if you’re on Guile 3 and the
remote is still on Guile 2, that’s fine: Guile 3 will first be deployed
there.)

‘remote-eval’ allows you to build locally and send the build results,
or to send the derivations and build remotely.

The use case is for code that deals with state or has a side effect.
Otherwise you’d just use a derivation and offload it.

There are no tests for ‘remote-eval’ currently.  It would need a VM
with access to the store, as Jakob explained on guix-devel.

Thoughts?

Ludo’.

Ludovic Courtès (4):
  gexp: Add 'lower-gexp' and express 'gexp->derivation' in terms of it.
  Add (guix repl).
  inferior: Add 'read-repl-response'.
  Add (guix remote).

 Makefile.am           |   2 +
 guix/gexp.scm         | 238 +++++++++++++++++++++++++++++++-----------
 guix/inferior.scm     |   9 +-
 guix/remote.scm       | 130 +++++++++++++++++++++++
 guix/repl.scm         |  86 +++++++++++++++
 guix/scripts/repl.scm |  56 +---------
 tests/gexp.scm        |  37 +++++++
 7 files changed, 444 insertions(+), 114 deletions(-)
 create mode 100644 guix/remote.scm
 create mode 100644 guix/repl.scm

-- 
2.21.0

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

end of thread, other threads:[~2019-07-04 16:23 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-10 21:08 [bug#36162] [PATCH 0/4] Add 'remote-eval' Ludovic Courtès
2019-06-10 21:41 ` [bug#36162] [PATCH 1/4] gexp: Add 'lower-gexp' and express 'gexp->derivation' in terms of it Ludovic Courtès
2019-06-10 21:41   ` [bug#36162] [PATCH 2/4] Add (guix repl) Ludovic Courtès
2019-06-10 21:41   ` [bug#36162] [PATCH 3/4] inferior: Add 'read-repl-response' Ludovic Courtès
2019-06-10 21:41   ` [bug#36162] [PATCH 4/4] Add (guix remote) Ludovic Courtès
2019-06-11 13:26 ` [bug#36162] [PATCH 0/4] Add 'remote-eval' Ricardo Wurmus
2019-06-11 17:35 ` Jakob L. Kreuze
2019-06-12 13:45   ` Ludovic Courtès
2019-06-12 15:12     ` Jakob L. Kreuze
2019-06-13 11:09       ` Ludovic Courtès
2019-06-13 13:18         ` Jakob L. Kreuze
2019-06-13 16:17           ` Jakob L. Kreuze
2019-06-14 11:20             ` Ludovic Courtès
2019-06-30 13:24               ` Christopher Lemmer Webber
2019-07-04 16:22                 ` Ludovic Courtès

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.