From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id kLsHNGw8YGLD8AAAbAwnHQ (envelope-from ) for ; Wed, 20 Apr 2022 19:01:32 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id GLPiM2w8YGIEzAAA9RJhRA (envelope-from ) for ; Wed, 20 Apr 2022 19:01:32 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 860C0285B7 for ; Wed, 20 Apr 2022 19:01:32 +0200 (CEST) Received: from localhost ([::1]:47974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhDhr-0004XO-Md for larch@yhetil.org; Wed, 20 Apr 2022 13:01:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60686) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhDSl-0003MU-Jm for guix-devel@gnu.org; Wed, 20 Apr 2022 12:46:01 -0400 Received: from coleridge.kublai.com ([166.84.7.167]:60264 helo=mail.spork.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhDSi-0003sk-M7 for guix-devel@gnu.org; Wed, 20 Apr 2022 12:45:54 -0400 Received: from ditto (unknown [IPv6:2001:470:1f07:1b9:8650:a942:ec5e:856b]) by mail.spork.org (Postfix) with ESMTPSA id 0B46C459D for ; Wed, 20 Apr 2022 12:45:18 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=spork.org; s=dkim; t=1650473121; bh=s6uYxtrxQS0JTuCh22caS1tHV+25Hr9vxtC7M/Oj9NM=; h=From:To:Subject:Date; b=bvYOyxXI1wWzq5L0bEDrARMHXbdsggbeWBIULzN7PKG9WYJe4WLrXigrOsO8jyTVZ iHWnFi83t/pGox0Jy5cnxROK699JwHoDBJxifluvm253/MwQ4cplrG1ffXS4SqLr8D oXoQq42/0h+x6Y7RKHnKVqemb7jjaP9g0E/M2VTw= User-agent: mu4e 1.6.10; emacs 28.1 From: Brian Cully To: guix-devel@gnu.org Subject: Viewing derivation output in the store Date: Wed, 20 Apr 2022 11:40:43 -0400 Message-ID: <87ee1rn1ph.fsf@ditto.jhoto.spork.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=166.84.7.167; envelope-from=bjc@spork.org; helo=mail.spork.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1650474092; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=vRhKWZkpc/O52vBrgxecJNaUsuhpSzt6Xizljp98HAE=; b=f38+SRZUXxa4h5kj72hpvuZ6GMe0Xc0mV5d/IrwBxAjMDaT1dszBc/RtEMGJ0a38PWEQJx rDc4x0fESNtFWoirLCW6YOCbbCqXAWERZbHdxVBNiW/hlfxKjKeTliYiTBwYS2Y1D/UKtB EmbbX+CiBSrQy5TVYuwTfJYr1fbWAKoLx5cTPVhE6q8zJBkxqT1ly846FPwV+3WWxj6uNv FIkQmAVs32AapcGRmDKb3QSmA9L5CJwmbgwA/sU/SoZ5jEsoRcfkF9QNEtzRMAXpWEfFfA qVmxsOVXMYwqCS31qJGdEn412b3iXiPdE7odF5fmdCPTOGmbTpjhDqScJBh5XA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1650474092; a=rsa-sha256; cv=none; b=J9I3tHvESbqy2YrnzUZGZ7u4VI8g0cNxmzaOOIILBjXtfGJnCdZ1qkf0lbcT68dJyAX2wn 9Qnd0soDgEVDvIhpxQTPC6mp3V80r4AznPAUyH9hrEREhcbxUm5z0jxb0T+JmJZsjymOwH +5UthR+PcLdKWaFZId0TDIQqBdtmuCXezOkrMvKMNLSy+85nJSyPrYE+l6oFEailKhm/as 6iquZqUGImn0uodLSYezEkKKP5boOtfDNkjBzW7/UA/UX2IZ2saAAlBzcX90EjQi/zDB+R 7+meYLRE04VVw6Mn2SLA09kc0KgYnx7s5v1+ebIxWVJXhe15QfOBX/bJdpUglw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=spork.org header.s=dkim header.b=bvYOyxXI; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 0.86 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=spork.org header.s=dkim header.b=bvYOyxXI; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 860C0285B7 X-Spam-Score: 0.86 X-Migadu-Scanner: scn0.migadu.com X-TUID: /3ThHx64X3fK I apologize if this isn=E2=80=99t the right place to ask these questions. While this is on the level of beginner tutorial (or should be, IMHO), the devel list seemed the most relevant. I=E2=80=99m trying to figure out how I can create a file and view it in the store before installation. I=E2=80=99d like to make sure the target loo= ks the way I want before putting it in its final location. I would like to do this entirely within a Geiser session, rather than having to call shell commands for ease of edit-test-debug cycles and tracing. This is also for pedagogical purposes; I=E2=80=99m trying to learn how Guix goes from abstract file-like-object to an actual file. I=E2=80=99m sti= ll new to basically everything here, and exercises like this help me learn. So, given the following: ---[snip]--- (use-modules (guix) (guix gexp) (guix monads) (gnu)) (define test-file (plain-file "foo.txt" "the contents of foo")) (define test-gexp #~(begin #$test-file)) (define test-drv (gexp->derivation "foo" test-gexp)) ---[snip]--- How do I go from the derivation in =E2=80=99test-drv=E2=80=99 to the outpu= t in the store? Something like how, from the REPL, this works: ---[snip]--- scheme@(guile-user)> ,enter-store-monad store-monad@(guile-user) [1]> (text-file "foo" "hello") $34 =3D "/gnu/store/mnzh1q6ilbw0bg04dg0vc4f47laz57lg-foo" ---[snip]--- Now I can easily open the path to =E2=80=99/gnu/store/=E2=80=A6foo=E2=80= =99 to verify the contents are correct. NB: While I=E2=80=99m using =E2=80=99plain-file=E2=80=99 here and its conen= ts are obvious, this is just to keep things simple. My actual target comes from =E2=80=99computed-file=E2=80=99. -bjc