From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze)
To: Christopher Lemmer Webber <cwebber@dustycloud.org>
Cc: 36872@debbugs.gnu.org
Subject: [bug#36872] [PATCH v2 1/2] remote: Build derivations appropriate for the remote's
Date: Tue, 06 Aug 2019 16:58:54 -0400 [thread overview]
Message-ID: <87o912vwmp.fsf_-_@sdf.lonestar.org> (raw)
In-Reply-To: <87ef1yovur.fsf@dustycloud.org> (Christopher Lemmer Webber's message of "Tue, 06 Aug 2019 16:57:32 -0400")
* guix/ssh.scm (remote-system): New variable.
* guix/remote.scm (remote-eval): Use result of 'remote-system' when
lowering the G-Expression.
(trampoline): Return a <program-file> rather than a <scheme-file>.
---
guix/remote.scm | 13 ++++++++-----
guix/ssh.scm | 7 +++++++
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/guix/remote.scm b/guix/remote.scm
index 5fecd954e9..0a0bdaf30b 100644
--- a/guix/remote.scm
+++ b/guix/remote.scm
@@ -71,7 +71,7 @@ prerequisites of EXP are already available on the host at SESSION."
"Return a \"trampoline\" gexp that evaluates EXP and writes the evaluation
result to the current output port using the (guix repl) protocol."
(define program
- (scheme-file "remote-exp.scm" exp))
+ (program-file "remote-exp.scm" exp))
(with-imported-modules (source-module-closure '((guix repl)))
#~(begin
@@ -96,10 +96,13 @@ all the elements EXP refers to are built and deployed to SESSION beforehand.
When BUILD-LOCALLY? is true, said dependencies are built locally and sent to
the remote store afterwards; otherwise, dependencies are built directly on the
remote store."
- (mlet %store-monad ((lowered (lower-gexp (trampoline exp)
- #:module-path %load-path))
- (remote -> (connect-to-remote-daemon session
- socket-name)))
+ (mlet* %store-monad ((system -> (remote-system session))
+ (lowered (lower-gexp (trampoline exp)
+ #:system system
+ #:guile-for-build #f
+ #:module-path %load-path))
+ (remote -> (connect-to-remote-daemon session
+ socket-name)))
(define inputs
(cons (lowered-gexp-guile lowered)
(lowered-gexp-inputs lowered)))
diff --git a/guix/ssh.scm b/guix/ssh.scm
index ede00133c8..9b5ca68894 100644
--- a/guix/ssh.scm
+++ b/guix/ssh.scm
@@ -39,6 +39,7 @@
remote-inferior
remote-daemon-channel
connect-to-remote-daemon
+ remote-system
send-files
retrieve-files
retrieve-files*
@@ -282,6 +283,12 @@ be read. When RECURSIVE? is true, the closure of FILES is exported."
,(object->string
(object->string export))))))
+(define (remote-system session)
+ "Return the system type as expected by Nix, usually ARCHITECTURE-KERNEL, of
+the machine on the other end of SESSION."
+ (inferior-remote-eval '(begin (use-modules (guix utils)) (%current-system))
+ session))
+
(define* (send-files local files remote
#:key
recursive?
--
2.22.0
next prev parent reply other threads:[~2019-08-06 21:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-31 13:41 [bug#36872] [PATCH 1/2] remote: Build derivations appropriate for the remote's architecture Jakob L. Kreuze
2019-07-31 13:43 ` [bug#36872] [PATCH 2/2] remote: Remove '--system' argument Jakob L. Kreuze
2019-08-06 20:57 ` Christopher Lemmer Webber
2019-08-06 20:58 ` Jakob L. Kreuze [this message]
2019-08-06 20:59 ` [bug#36872] [PATCH v2 " Jakob L. Kreuze
2019-08-06 21:29 ` [bug#36872] [PATCH " Jakob L. Kreuze
2019-08-07 18:31 ` Christopher Lemmer Webber
2019-08-07 19:03 ` Thompson, David
2019-08-07 20:28 ` Jakob L. Kreuze
2019-08-09 18:24 ` [bug#36872] [PATCH v2 1/2] remote: Build derivations appropriate for the remote's Jakob L. Kreuze
2019-08-09 18:25 ` [bug#36872] [PATCH v2 2/2] remote: Remove '--system' argument Jakob L. Kreuze
2019-08-14 19:40 ` Christopher Lemmer Webber
2019-08-14 20:29 ` bug#36872: " Christopher Lemmer Webber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o912vwmp.fsf_-_@sdf.lonestar.org \
--to=zerodaysfordays@sdf.lonestar.org \
--cc=36872@debbugs.gnu.org \
--cc=cwebber@dustycloud.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).