[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#36162] [PATCH 0/4] Add 'remote-eval'

From: Ludovic Courtès
Subject: [bug#36162] [PATCH 0/4] Add 'remote-eval'
Date: Mon, 10 Jun 2019 23:08:53 +0200

Hello Guix!

This patch series add ‘remote-eval’, which takes a gexp, remotely deploys
everything the gexp refers to, and evaluates it (see
<> 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)))
        (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

‘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.



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).           |   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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]