(define-module (guix remote)
#:use-module (guix ssh)
#:use-module (guix gexp)
+ #:use-module (guix i18n)
#:use-module (guix inferior)
#:use-module (guix store)
#:use-module (guix monads)
#:use-module (guix derivations)
#:use-module (guix utils)
#:use-module (ssh popen)
+ #:use-module (ssh channel)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-34)
#:use-module (srfi srfi-35)
(let ((pipe (apply open-remote-pipe* session OPEN_READ repl-command)))
(when (eof-object? (peek-char pipe))
- (raise (condition
- (&message
- (message (format #f (G_ "failed to run '~{~a~^ ~}'")
- repl-command))))))
+ (let ((status (channel-get-exit-status pipe)))
+ (close-port pipe)
+ (raise (condition
+ (&message
+ (message (format #f (G_ "remote command '~{~a~^ ~}' failed \
+with status ~a")
+ repl-command status)))))))
pipe))
(define* (%remote-eval lowered session #:optional become-command)
(build-locally? #t)
(system (%current-system))
(module-path %load-path)
- (socket-name "/var/guix/daemon-socket/socket")
+ (socket-name (%daemon-socket-uri))
(become-command #f))
"Evaluate EXP, a gexp, on the host at SESSION, an SSH session. Ensure that
all the elements EXP refers to are built and deployed to SESSION beforehand.