From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 2INdGc0Kw2I+0gAAbAwnHQ (envelope-from ) for ; Mon, 04 Jul 2022 17:44:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id SJBKGc0Kw2JuogAAauVa8A (envelope-from ) for ; Mon, 04 Jul 2022 17:44:13 +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 E589210D97 for ; Mon, 4 Jul 2022 17:44:12 +0200 (CEST) Received: from localhost ([::1]:51398 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8OF9-000477-Ld for larch@yhetil.org; Mon, 04 Jul 2022 11:44:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8OF0-00046O-JI for bug-guix@gnu.org; Mon, 04 Jul 2022 11:44:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54603) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o8OF0-0005ql-9w for bug-guix@gnu.org; Mon, 04 Jul 2022 11:44:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o8OF0-0007eX-4H for bug-guix@gnu.org; Mon, 04 Jul 2022 11:44:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#56114: Guix does not have a documented general and practical procedure for lowering a single lowerable object to the /gnu/store/... string. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 04 Jul 2022 15:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56114 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Maxime Devos , 56114@debbugs.gnu.org Received: via spool by 56114-submit@debbugs.gnu.org id=B56114.165694941629376 (code B ref 56114); Mon, 04 Jul 2022 15:44:02 +0000 Received: (at 56114) by debbugs.gnu.org; 4 Jul 2022 15:43:36 +0000 Received: from localhost ([127.0.0.1]:48500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8OEZ-0007dk-JJ for submit@debbugs.gnu.org; Mon, 04 Jul 2022 11:43:35 -0400 Received: from mail-wr1-f46.google.com ([209.85.221.46]:41919) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8OEW-0007dT-1O for 56114@debbugs.gnu.org; Mon, 04 Jul 2022 11:43:34 -0400 Received: by mail-wr1-f46.google.com with SMTP id q9so14022632wrd.8 for <56114@debbugs.gnu.org>; Mon, 04 Jul 2022 08:43:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=2iT8LkBlf9LWU2MVVyoWCTXKacBj8Ycg/gGO6DGwcFA=; b=cGh6ovVwCG4MZHHzvdpL+LGkLzqgxPFJXU1lBF8/pBXaxFwscJPltUftb7NuuNu61O Vm19m44FTE/s5Lscsy0TAcYShl4YgE0VoIq5a7euu506riux8xYfB/lPcKxHiCBFK9EA seoC98+jG7j3kl+3NLr2G7iD/NvBNfNG7dMV1HDqpNWSnqm/JFrQ40/3F4odQVJ+RWU5 NXl5O1Eu+onAqsjt9aYmas3jv2ZPgU3qyT78UQAKLWZVWiy151WsGaPPmF8d1VD5Br12 dFwghXUFL61uutWEjTmc0IpacmHoQth7/yQP4swMSX9st+rOzWOY6u8BbGJqpOxJgjDh uu3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=2iT8LkBlf9LWU2MVVyoWCTXKacBj8Ycg/gGO6DGwcFA=; b=NkJjelFY/X0+EQQhQ700+xe9BQC/3TB66q1bAkHffkjRqiu29lKV0eeBhW2uTNdrXP mSOcdnpOA0ZhG2FcKCEgkSDpvHu2WfHlQW/eb6WVqLWipI9XiSahv/LMRQpdmdNCy1AN m9k2e/z5lCZ3Vvo7Mtzj2NhyhtPzHW/4gWeC2VZFACiZbnMYzHsFvkRvDeSIjua5WQIA 0mjDuClJd9a+1V5H+HAbqu45LPujmSH9H3njI8SXXt7MtudUZc/Qg84zpzEiD78VaQAF +BWfOunGySiy8ttNJquNb4Jdl+/yM1v0Fr1TOOOZGChg+IdLmvPe0auPveQ3Tg/amm1z 1SQg== X-Gm-Message-State: AJIora+Kv6FdPRNZVJjv4QluUFEEfInwkzMFhEGAUs8GTpylVgF5NLAu oykCvc9ciJU2PpTo3pavPoWfezNrO9E= X-Google-Smtp-Source: AGRyM1uNXMGOHP31nSMVChivBdYy3XPFknwa80IfvNYSt5WjXpKFcgrSlDIQSMCYt0tkoze9UsZk5A== X-Received: by 2002:adf:ed83:0:b0:21d:6c97:b4 with SMTP id c3-20020adfed83000000b0021d6c9700b4mr3756621wro.205.1656949405948; Mon, 04 Jul 2022 08:43:25 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id w8-20020a1cf608000000b0039c5a765388sm20288509wmc.28.2022.07.04.08.43.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 08:43:25 -0700 (PDT) From: zimoun References: <1652a111d71c3e74c61904f89120ea45631c7013.camel@telenet.be> <87edz1zzrz.fsf@gnu.org> Date: Mon, 04 Jul 2022 17:43:22 +0200 In-Reply-To: <87edz1zzrz.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Sun, 03 Jul 2022 22:50:40 +0200") Message-ID: <87y1x8nasl.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" 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=1656949453; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=2iT8LkBlf9LWU2MVVyoWCTXKacBj8Ycg/gGO6DGwcFA=; b=rGD+ONlws1lK0lYe+szg7CTdHc9EFJbg0hZ4bpEDIOb2MKRrUClrHwRDnRux/HWbuTeyYo 20ss5S18wl4mjg8YIPRPjrTqdBPiaycpuJOjg6wqu1PYWaM7C1TE2lVZdW39Q8kdVP9sBI 2Lgg/bf4T8zs/gpqVuKIhH1YPFLzBlr+jEpmIbDSMz9Bc5CzKEz+ILnKlq2qVrPkcVt6MX ziA8azuGXawLovytd/PNvEzWZwLzxllxajE1+9JO8MrQv4JREsY3xjDOernFu3FJ4YYrUj pWM4oIN/V+kL3p8T56WRv2tu946IfTHtExJ3MFOSyV+0LIm5/q2HNXMKIKT7uQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1656949453; a=rsa-sha256; cv=none; b=AMO+Lto8XOymdYUqV9eFgHXf80MVD0xUFLOCoRyLqTb4AZ8A5C5KeqDVHfdqU+zaMOWmW5 LtDrz+sWNECh43r6v6Iwp7O+sdKqUDSAQt+0AJH8/VQ2IqhAP15isx7FrNk7Iy/pWgEt3v PEtUnqIwM+BuCoADaqQ1oTERelnDSIIhXEM0BNtRSBdleClpMRL18cUsReEPytNRWWnc8T 1ATvGv8jdPt6lCpmHaJhiZeiS4bb12YYBrhVHeAjAM0fU33KF4QDgZQkKXY8j51f/3qIM9 FZFdSvvtr+fq8bLFJOeEbHqowXk5q2NavCu/W4wSN1UPfl+lxO0MliEMDJsC5A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=cGh6ovVw; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 6.05 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=cGh6ovVw; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: E589210D97 X-Spam-Score: 6.05 X-Migadu-Scanner: scn1.migadu.com X-TUID: Cxek9LA7t1MX Hi, If I read correctly, this snippet from the manual, >> scheme@(guile-user)> ,run-in-store (package->derivation hello) >> $1 =3D # ...> becomes scheme@(guile-user)> ,lower hello and this snippet, > scheme@(guix-user)> ,run-in-store (lower-object (plain-file "foo" "bar")) > $15 =3D "/gnu/store/798sxvdgr0680czdggbls7rd3sfwk2yx-foo" becomes scheme@(guile-user)> ,build (plain-file "foo" "bar") However, note that, --8<---------------cut here---------------start------------->8--- scheme@(guix-user)> ,build (plain-file "foo" "bar") $1 =3D "/gnu/store/798sxvdgr0680czdggbls7rd3sfwk2yx-foo" scheme@(guix-user)> ,lower (plain-file "foo" "bar") $2 =3D "/gnu/store/798sxvdgr0680czdggbls7rd3sfwk2yx-foo" --8<---------------cut here---------------end--------------->8--- which is confusing, especially when, --8<---------------cut here---------------start------------->8--- scheme@(guix-user)> ,lower (mixed-text-file "foo" "bar") $6 =3D # /gnu/store/raihpcxdz6wmdpyj67bwd4bjk02xq0x3-foo 7f6f9bc5cd20> scheme@(guix-user)> ,build (mixed-text-file "foo" "bar") $7 =3D "/gnu/store/raihpcxdz6wmdpyj67bwd4bjk02xq0x3-foo" --8<---------------cut here---------------end--------------->8--- The issue =E2=80=93 unrelated to the nice patch =E2=80=93 is a potential = =E2=80=9Cinconsistency=E2=80=9D between =E2=80=99=E2=80=99 and =E2=80=99=E2=80= =99; =E2=80=99plain-file=E2=80=99 refers to =E2=80=99text-file=E2=80=99 and =E2=80=99mixed-text-file=E2=80=99 refers to= =E2=80=99text-file*=E2=80=99; and both are really different despite close names around. :-) Maybe the docstring of =E2=80=99plain-file=E2=80=99 and of =E2=80=99mixed-t= ext-file=E2=80=99 could be extended. For instance, --8<---------------cut here---------------start------------->8--- (define (plain-file name content) "Return an lowered object representing a text file called NAME with the g= iven CONTENT (a string) to be added to the store. This is the declarative counterpart of 'text-file'." --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- (define* (mixed-text-file name #:key guile #:rest text) "Return an object representing store file NAME containing TEXT. TEXT is a sequence of strings and file-like objects, as in: (mixed-text-file \"profile\" \"export PATH=3D\" coreutils \"/bin:\" grep \"/bin\") This is the declarative counterpart of 'text-file*' but note that a 'computed-file' object is returned." --8<---------------cut here---------------end--------------->8--- > diff --git a/guix/monad-repl.scm b/guix/monad-repl.scm > index aefabdeebb..15c10efe01 100644 > --- a/guix/monad-repl.scm > +++ b/guix/monad-repl.scm > @@ -1,5 +1,5 @@ All LGTM. > +(define* (evaluate/print-with-store mvalue #:key build?) > + "Run monadic value MVALUE in the store monad and print its value." I do not know if it makes sense to have a list of monadic values, allowing something like: ,build hello coreutils Cheers, simon