From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:54530) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsoud-0008Tf-05 for guix-patches@gnu.org; Wed, 31 Jul 2019 09:45:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hsouc-0003nB-0x for guix-patches@gnu.org; Wed, 31 Jul 2019 09:45:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42838) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hsoub-0003n1-Ug for guix-patches@gnu.org; Wed, 31 Jul 2019 09:45:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hsoub-0003vr-PA for guix-patches@gnu.org; Wed, 31 Jul 2019 09:45:01 -0400 Subject: [bug#36872] [PATCH 1/2] remote: Build derivations appropriate for the remote's architecture. Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:54445) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsouE-0008RF-Ct for guix-patches@gnu.org; Wed, 31 Jul 2019 09:44:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hsouA-0003PY-HC for guix-patches@gnu.org; Wed, 31 Jul 2019 09:44:38 -0400 Received: from mx.sdf.org ([205.166.94.20]:59682) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hsouA-0003OO-9m for guix-patches@gnu.org; Wed, 31 Jul 2019 09:44:34 -0400 Received: from Epsilon (pool-173-76-53-40.bstnma.fios.verizon.net [173.76.53.40]) (authenticated (0 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id x6VDiOXi025809 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO) for ; Wed, 31 Jul 2019 13:44:28 GMT From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) Date: Wed, 31 Jul 2019 09:41:30 -0400 Message-ID: <87lfwee2yd.fsf@sdf.lonestar.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 36872@debbugs.gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable * 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 rather than a . =2D-- 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 853029c54f..d5738ebbfa 100644 =2D-- a/guix/remote.scm +++ b/guix/remote.scm @@ -72,7 +72,7 @@ prerequisites of EXP are already available on the host at= SESSION." "Return a \"trampoline\" gexp that evaluates EXP and writes the evaluati= on result to the current output port using the (guix repl) protocol." (define program =2D (scheme-file "remote-exp.scm" exp)) + (program-file "remote-exp.scm" exp)) =20 (with-imported-modules (source-module-closure '((guix repl))) #~(begin @@ -97,10 +97,13 @@ all the elements EXP refers to are built and deployed t= o 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." =2D (mlet %store-monad ((lowered (lower-gexp (trampoline exp) =2D #:module-path %load-path)) =2D (remote -> (connect-to-remote-daemon session =2D 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 =2D-- 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 FILE= S is exported." ,(object->string (object->string export)))))) =20 +(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-syste= m)) + session)) + (define* (send-files local files remote #:key recursive? =2D-=20 2.22.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl1BmooACgkQ9Qb9Fp2P 2VptEA/+J/IgPRjvq/Cbe/wFJbMLxlyiq7ZEImt88YwBIHZHhXIttMa8SfNy7L+w AZt6YhmcNH/NtxNzLGEt0uUT2zk4T/MObXuwMj4rYq0R8nOLtNOj316buNlLVz6K VPFGrOVq/rzp3IIY88QpFCTsNLNHB//7WeBbMoFGevRPGfi3+G5fjPWIPAFVci4e zQ2A8HkQ0vctOoD0KG95bMARsCSWY7n3IZ5BDhVW5X/sWse9IviQWRi1ijplqKFF 53OY5hG64wWxcuvmc5dvoq1u+uT1cOiNlSQ7Dc+7AkCc9fi4CsmT1C9u1NCYhDs1 agEYIC0R27bvocN9JZrad2kRiDLnRRDiarpsXaarsrB12xKIvgPSc4eMZX4oWQ4D ETlbd6KTtMa1H5F+Nn8wHCfVV8LfJwdP511qGB/WAgO3Ka1RQ8b2IB2xUrYNVctN Tvxh/c6QnmGPlftDoKLuF8xef7yUwv/X1sSsj+sdfgxl+n5xZIURwGJs5F5PB4qu mc+K1cz+w2lRAClZnVqWNtdzTrc/9u77n6iHiO2TKsrnT6FA/uFAfQ2+nlqCuU05 Bq8ZPU/NYGjWebEZ8E5b3gbsNuMmiTE4Sd7EyPaawlCJDalSad94JZq9VO0z9Rd/ r0a+ZT/sOHme2VhOPpcuFCGjaofulG3TXBlw+yY4NMeCslNNBGE= =hfQd -----END PGP SIGNATURE----- --=-=-=--