From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id KHINDWZrYGKrDgEAbAwnHQ (envelope-from ) for ; Wed, 20 Apr 2022 22:21:58 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id UKweDWZrYGLDfQAA9RJhRA (envelope-from ) for ; Wed, 20 Apr 2022 22:21:58 +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 083583D2E8 for ; Wed, 20 Apr 2022 22:21:58 +0200 (CEST) Received: from localhost ([::1]:32838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhGpp-0001CS-50 for larch@yhetil.org; Wed, 20 Apr 2022 16:21:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44446) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhGDu-0008VR-0H for guix-devel@gnu.org; Wed, 20 Apr 2022 15:42:48 -0400 Received: from albert.telenet-ops.be ([2a02:1800:110:4::f00:1a]:39490) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhGDq-0007UX-71 for guix-devel@gnu.org; Wed, 20 Apr 2022 15:42:44 -0400 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by albert.telenet-ops.be with bizsmtp id M7ie270044UW6Th067ieNA; Wed, 20 Apr 2022 21:42:38 +0200 Message-ID: <40e59c1a7b3cd1bb4333b912739688a5146336cb.camel@telenet.be> Subject: Re: Viewing derivation output in the store From: Maxime Devos To: Brian Cully , guix-devel@gnu.org Date: Wed, 20 Apr 2022 21:42:33 +0200 In-Reply-To: <87ee1rn1ph.fsf@ditto.jhoto.spork.org> References: <87ee1rn1ph.fsf@ditto.jhoto.spork.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-zXJ644Q72bFwnmz7TSkK" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1650483758; bh=yfNmfHL5kohndaxjIMBSeOQat7pKmi+23EWHhoPRJZ8=; h=Subject:From:To:Date:In-Reply-To:References; b=KqdUMU3WSbX3k0chkAdOAWMje4zpm1cygAr54p4EOQm5/45v8urWE5nAuJ8eHoz9s vCK+7dN8OFRhd8JFTjVz+gpJ3A4rwGlm/1OVMxxBNBB/F/0l48WeRDN7uks1rtlCQK wfoYYdLGAozMw6UcL0c0O0rOLyIzkosHQAit1fZHnlWWs7i5YsMnxC0sucMqYA6wl0 w7UQ0fEvnyejLYZ50WcLSaIzuKND27ZO1UH5sZzgSD3vhd/8Nxrda/xjc7kQzzSmJ8 NxY63l5CDrS8Mad7Zo36IcWmO6BD/qLYNkAXobVwnKtAwEYeayEYimnS4hB/bznU0K dfw/6kQE2aHOw== Received-SPF: pass client-ip=2a02:1800:110:4::f00:1a; envelope-from=maximedevos@telenet.be; helo=albert.telenet-ops.be X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, 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=1650486118; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=yfNmfHL5kohndaxjIMBSeOQat7pKmi+23EWHhoPRJZ8=; b=QTs0zOhjyzsvAUS2cLkWqJb7rrJ9R0/DbUBC0dGGhxdOmHwmkUEVVUN/DBHHUU/wKzm27F Sge6yY4IVSDhkTtceeQyMCDueBBI7oIz8sAQ/JU+Vm2cWDZa56m++qsayXR+9yONGQs+TW JBjk0zU5aNvaApCZc4yzEHSO1h84NnvlpZpEqTlA4xMCSUdp1RVAfTTBtLEBBvGapm3T3/ q4cSz8XTi11n6TGOHZhnX7tiSUy362sbca7wBLfLUT49Vp4O87quKCZ5R7J9sJOxzyprTw 8BdEqzBd8G9NROFjXDOFkqRQHnDxNzdYjxdVJHJMirnphKtvi7t46EKVEBtNVA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1650486118; a=rsa-sha256; cv=none; b=Sq2eGMRMOS0sUm8v5qqSxLfdKRJWtkNw2OYx5GZvuElKqndtW2svML9pcMHeff9J3MSY+g 0oK0G1a3OqyakAwsjZtnGjCPwAdh79NLdEv2VDO3k/q6XvSmpWqQ5p8VXqPKLPYjw7y262 n8cshvtYlcp9NnicQbwrezasx02ZcFm6q+lG1486wYAVtYLN9H+4a2DI3QEhfemuTqooR4 DnU+CoOxDeQZGIcAIny8Y0J4P994Tt7Zvv2oHoNhpLJ490rrhaRM/kBo7C8dVbT1XNyp6V jlq5CsbGplvFD4CY6ATSXV9NgFzH86vUefYnNNbPnj2vBm+FH2JDU5Rpic9LRA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b=KqdUMU3W; dmarc=pass (policy=none) header.from=telenet.be; 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: -11.24 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b=KqdUMU3W; dmarc=pass (policy=none) header.from=telenet.be; 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: 083583D2E8 X-Spam-Score: -11.24 X-Migadu-Scanner: scn0.migadu.com X-TUID: OhS+QDCbPbDa --=-zXJ644Q72bFwnmz7TSkK Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Brian Cully schreef op wo 20-04-2022 om 11:40 [-0400]: > How do I go from the derivation in =E2=80=99test-drv=E2=80=99 to the out= put in > the store? Something like how, from the REPL, this works: >=20 > ---[snip]--- > scheme@(guile-user)> ,enter-store-monad > store-monad@(guile-user) [1]> (text-file "foo" "hello") > $34 =3D "/gnu/store/mnzh1q6ilbw0bg04dg0vc4f47laz57lg-foo" > ---[snip]--- Proposal, for 'plain-file', which returns a =E2=80=98high-level=E2=80=99 ob= ject that can be lowered to a monadic value: ,run-in-store (lower-object (plain-file "foo" "bar")) for 'gexp->derivation', which directly returns a monadic value: ,run-in-store (gexp->derivation "x" #~(pk #$output)) On my x86_64 system I can low look at the derivation at =E2=80=98/gnu/store/2s5gfk7a41v7ianfw5qv88y6336mvkw4-x.drv=E2=80=99. Howev= er, the derivation hasn't been build yet, so let's lower it. To actually make the output path exist, the derivation needs to be actually built: ;; XXX: store-lift and this construct is undocumented ,run-in-store (mlet* %store-monad ((drv (gexp->derivation "x" #~(pk #$outpu= t)))) ((store-lift build-derivations) (list drv))) building path(s) `/gnu/store/kgidgrxjhg8w3hy3fhzjngwbix40nm8v-x' ;;; ("/gnu/store/kgidgrxjhg8w3hy3fhzjngwbix40nm8v-x") builder for `/gnu/store/2s5gfk7a41v7ianfw5qv88y6336mvkw4-x.drv' failed to produce output path `/gnu/store/kgidgrxjhg8w3hy3fhzjngwbix40nm8v-x' While executing meta-command: ERROR: 1. &store-protocol-error: message: "build of `/gnu/store/2s5gfk7a41v7ianfw5qv88y6336mvkw4-x.drv= ' failed" status: 1 Maybe there's an easier way to do it -- maybe there could be a monadic lower-to-store-item (like lower-object, but lowers to the store item and not just the derivation). Greetings, Maxime. --=-zXJ644Q72bFwnmz7TSkK Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmBiKhccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7iFTAQDP91WQLHxnQfo1/S3rD+Vf1xvT 3QXp63yxdfeItcVsUwEA1B6ROlfG54G3nqJobhgMVih1gacOnyotT/CJ4l98Xwo= =CeQ8 -----END PGP SIGNATURE----- --=-zXJ644Q72bFwnmz7TSkK--