From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:53010) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjsxT-0002Hn-MY for guix-patches@gnu.org; Sat, 06 Jul 2019 18:15:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hjsxS-000809-OF for guix-patches@gnu.org; Sat, 06 Jul 2019 18:15:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47138) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hjsxS-0007zf-ID for guix-patches@gnu.org; Sat, 06 Jul 2019 18:15:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hjsxS-0006Et-BH for guix-patches@gnu.org; Sat, 06 Jul 2019 18:15:02 -0400 Subject: [bug#36404] [PATCH 2/3] machine: Reimplement 'managed-host-environment-type' deployment. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87o92ianbj.fsf@sdf.lonestar.org> <87o92glap5.fsf@dustycloud.org> <878sthoqzi.fsf@gnu.org> <87r2799tzd.fsf@sdf.lonestar.org> <87d0isrsmk.fsf@sdf.lonestar.org> <878std3fw0.fsf@sdf.lonestar.org> <87wogwoqrg.fsf@gnu.org> <87bly8f3kq.fsf_-_@sdf.lonestar.org> <877e8wf3iz.fsf_-_@sdf.lonestar.org> <8736jkf3h5.fsf_-_@sdf.lonestar.org> Date: Sun, 07 Jul 2019 00:13:45 +0200 In-Reply-To: <8736jkf3h5.fsf_-_@sdf.lonestar.org> (Jakob L. Kreuze's message of "Fri, 05 Jul 2019 19:47:50 -0400") Message-ID: <87y31aerqe.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: "Jakob L. Kreuze" Cc: 36404@debbugs.gnu.org zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) skribis: > + (define (run-switch-to-system machine) > + "Monadic procedure serializing the items in MACHINE necessary to bui= ld a > +G-Expression with 'switch-to-system'." > + (let* ((os (machine-system machine)) > + (activation-script (operating-system-activation-script os))) > + (mlet %store-monad ((osdrv (operating-system-derivation os))) > + (machine-remote-eval machine > + (switch-to-system osdrv activation-script))= ))) Normally you should never need to call =E2=80=98operating-system-derivation= =E2=80=99 because you can just insert an in a gexp and it=E2=80=99= ll do the right thing: #~(frob #$os) Ludo=E2=80=99.