mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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.
This commit is contained in:
parent
8f5825540d
commit
af15fe13b6
2 changed files with 27 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue