diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-12-24 00:55:07 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-12-24 16:06:32 +0100 |
commit | af15fe13b69d27f9902353540fd8ad0001ce8311 (patch) | |
tree | b86892919ee48c8fa1c01332c76149630d355b39 /guix/ssh.scm | |
parent | 8f5825540db0a0f1fb637cde95739f25157f89ab (diff) | |
download | gnu-guix-af15fe13b69d27f9902353540fd8ad0001ce8311.tar gnu-guix-af15fe13b69d27f9902353540fd8ad0001ce8311.tar.gz |
ssh: Add 'remote-inferior'.
* guix/inferior.scm (<inferior>)[close]: New field.
(port->inferior): New procedure.
(open-inferior): Rewrite in terms of 'port->inferior'.
(close-inferior): Honor INFERIOR's 'close' field.
(inferior-eval-with-store): Add FIXME comment.
* guix/ssh.scm (remote-inferior): New procedure.
Diffstat (limited to 'guix/ssh.scm')
-rw-r--r-- | guix/ssh.scm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/guix/ssh.scm b/guix/ssh.scm index 104f4f52d6..b8bea8028a 100644 --- a/guix/ssh.scm +++ b/guix/ssh.scm @@ -18,6 +18,7 @@ (define-module (guix ssh) #:use-module (guix store) + #:use-module (guix inferior) #:use-module (guix i18n) #:use-module ((guix utils) #:select (&fix-hint)) #:use-module (ssh session) @@ -36,6 +37,7 @@ #:use-module (ice-9 match) #:use-module (ice-9 binary-ports) #:export (open-ssh-session + remote-inferior remote-daemon-channel connect-to-remote-daemon send-files @@ -94,6 +96,12 @@ Throw an error on failure." (message (format #f (G_ "SSH connection to '~a' failed: ~a~%") host (get-error session)))))))))) +(define (remote-inferior session) + "Return a remote inferior for the given SESSION." + (let ((pipe (open-remote-pipe* session OPEN_BOTH + "guix" "repl" "-t" "machine"))) + (port->inferior pipe))) + (define* (remote-daemon-channel session #:optional (socket-name |