From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: How can I use () Date: Tue, 16 Jan 2018 17:11:25 +0100 Message-ID: <8760814wcy.fsf@gnu.org> References: <87h8rp25in.fsf@librem.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60609) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebTpj-0003YY-0w for help-guix@gnu.org; Tue, 16 Jan 2018 11:11:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebTpf-0005cS-Pr for help-guix@gnu.org; Tue, 16 Jan 2018 11:11:30 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:43374) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebTpf-0005bG-Jc for help-guix@gnu.org; Tue, 16 Jan 2018 11:11:27 -0500 In-Reply-To: <87h8rp25in.fsf@librem.i-did-not-set--mail-host-address--so-tickle-me> (Alex ter Weele's message of "Sat, 13 Jan 2018 08:32:48 -0600") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Alex ter Weele Cc: help-guix@gnu.org Hi Alex, Alex ter Weele skribis: > Based on this, what I think I want to do is something like: > > ,enter-store-monad > (build (list (gexp->script "test" (backup-home "alex")))) > > And then run the resulting script file. However, doing such gives the > error: > > ERROR: In procedure string->utf8: > ERROR: In procedure string->utf8: Wrong type argument in position 1 (expe= cting string): # =E2=80=98gexp->script=E2=80=99 returns a =E2=80=9Cmonadic=E2=80=9D value, s= o you need to =E2=80=9Cbind=E2=80=9D it with =E2=80=98mlet=E2=80=99 or similar to actually access that value: (mlet %store-monad ((script (gexp->script =E2=80=A6))) (built-derivations (list script))) Note that the whole result is again a monadic value. Alternately, instead of fiddling at the REPL, you could do: guix gc -R $(guix system build config.scm) | grep mcron then pick the right .drv from there, and run: guix build =E2=80=A6.drv HTH! Ludo=E2=80=99.