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 GKwMB61GQWOkbQAAbAwnHQ (envelope-from ) for ; Sat, 08 Oct 2022 11:45:17 +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 sO7hBq1GQWPHeQAAauVa8A (envelope-from ) for ; Sat, 08 Oct 2022 11:45:17 +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 E8D40377AB for ; Sat, 8 Oct 2022 11:45:15 +0200 (CEST) Received: from localhost ([::1]:36198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oh6OP-0001H3-Qv for larch@yhetil.org; Sat, 08 Oct 2022 05:45:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oh6OE-0001Fr-9a for guix-patches@gnu.org; Sat, 08 Oct 2022 05:45:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39192) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oh6OD-0006JK-W4 for guix-patches@gnu.org; Sat, 08 Oct 2022 05:45:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oh6OD-0002rd-My for guix-patches@gnu.org; Sat, 08 Oct 2022 05:45:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58339] =?UTF-8?Q?=E2=80=99guix_?= =?UTF-8?Q?shell=E2=80=99?= not working with GUIX_EXTENSIONS_PATH Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 08 Oct 2022 09:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58339 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun Cc: 58339@debbugs.gnu.org Received: via spool by 58339-submit@debbugs.gnu.org id=B58339.166522224510926 (code B ref 58339); Sat, 08 Oct 2022 09:45:01 +0000 Received: (at 58339) by debbugs.gnu.org; 8 Oct 2022 09:44:05 +0000 Received: from localhost ([127.0.0.1]:38268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oh6NI-0002q9-Rq for submit@debbugs.gnu.org; Sat, 08 Oct 2022 05:44:05 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:43615) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oh6NG-0002pX-LS for 58339@debbugs.gnu.org; Sat, 08 Oct 2022 05:44:03 -0400 Received: by mail-ed1-f66.google.com with SMTP id z3so8936524edc.10 for <58339@debbugs.gnu.org>; Sat, 08 Oct 2022 02:44:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=dMxrVXR20xQII6WdyLL4bGeqSBd8QQqTH/wd6+ZoZIQ=; b=RGrWg38OYZLi9bmye8sRxAV7rRKzvZTkUPmQg56t1KbDFWGJGkGdH1t6PljVTR4uBv YSYWe3v/+z7UvJOy+e+hBAhmdOrw+0K7GTHZGZKwaMbp4jjJ7nxMco9BgTGcuVyoUlLw ndyronDVHIUOQBkiTg0mVkGkdnObXB90LENEm29dik2MyCctzxRvT1zoezSiNFg56Z8Z r0hEvkUaN8COiru+Urh2jvWAGpzBHEIYzkOWk1AQZ8VN4yr1d0WjTxjDDyAvsj77wUMn 02iD64t3fDkF5x697/MuBxm6cgXSAzQD4JmiBle5J0nX0kfiOEPeZQAqZfPMM7Ruhgwi xQ2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=dMxrVXR20xQII6WdyLL4bGeqSBd8QQqTH/wd6+ZoZIQ=; b=xNfix/lwWDTSO1v4ca2YuIDNTXdZeQTXRAAsiyGa/FYLzfhuYsPYx7ViKxZ4lwDEIA okOcwgq7G91B3PtuXuEpMONo10fnEvcqb0iV5lw4+vaVg+WIuqr87qVF7XFQqBhG1kkl FUTdySKk+0crkVOrEZfeoSBvxAJvBVCTXcnvwmNhypL1gONdDJdSXBYcYH1aSyiAlIxn BMTUome/yYXH20mN1QcuEhUgxHqbH5jmIDjLt9aer1j6OGptPFRfeiEknt9LmR4VL3zx 1rKj0BPPPqYfPcSq7ZvDL3CD5MQLu8cuKg+Sk7ar6B3D52hGwrVzcyTyEkEzSZQDufMW Qwvg== X-Gm-Message-State: ACrzQf1gYsNjwzleymWtx/cFbB8q2OkOv/FhyS5+UkUr7wYHGT2SD7Nx 1h6M062tEDLA0hQfA4pTCls= X-Google-Smtp-Source: AMsMyM4Ll/11Pj+phRpxD9PRu7BLlq7w0JpxKRsgUFyED1s6048onr5U56ZI3yKw2m2nfqEL6CJ75A== X-Received: by 2002:a05:6402:440c:b0:43a:1124:e56a with SMTP id y12-20020a056402440c00b0043a1124e56amr8567688eda.134.1665222236608; Sat, 08 Oct 2022 02:43:56 -0700 (PDT) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id l26-20020a170906415a00b0078116c361d9sm2582269ejk.10.2022.10.08.02.43.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Oct 2022 02:43:56 -0700 (PDT) Message-ID: From: Liliana Marie Prikler Date: Sat, 08 Oct 2022 11:43:54 +0200 In-Reply-To: <86v8ouu301.fsf@gmail.com> References: <20221006163935.2282212-1-zimon.toutoune@gmail.com> <20221006163935.2282212-2-zimon.toutoune@gmail.com> <871qrkujrh.fsf@gmail.com> <00943eca15a92b5985361d14b12b6ffe9794c187.camel@gmail.com> <86v8ouu301.fsf@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.0 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1665222316; 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=dMxrVXR20xQII6WdyLL4bGeqSBd8QQqTH/wd6+ZoZIQ=; b=gVOWfK6iHIV7I+UCVLB/XDrePjphKwE0P0zY/CezEKLhrYPbjJesc/fhT796CQxmEvqAH6 CioaSynFZxFHkoJsBbC4Z5usO3f1SQWRn0gSMdF5AtTp6twBtqgJ3D9HqPWUc4tr1Q8Nur fQsjrpseAcD1e4xobc+zYFib1I1CqYT+ZoGl/J2mTfoQIZlRl06gC2y5rbSrEDRoeFlvdM KaN4Eka/kKMeDN+ciFgs16eEgtQnqfuhfgI3J7Axelbjn9ZrCR+wJQ5eX/i040zLUvbLrY j5AB2Ed5OiIRyH2ApYLm6YmXJVd+ufqDxfPsGiiJtCzfW3YTrr3MbAU136h2Qw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665222316; a=rsa-sha256; cv=none; b=Bz1940k4TUsO0uwu+6/6AzffqqcGTa0/d2t2J75iRSBPQKKyEkGvlcmRY6yRPrI9cONCTF gE2DpBc9YFn35r5ga79i7iabT3OlijCnYFH3TQLwb6yTSRL/P5zWB1JUjWLIqcMU2N+Vmh K1HFOLWtVSO8tW8TKB7FkRQsoT5UQa5YS7z6X8kdRiY457CzKyxlE3PKguYUz5CvC6QNp2 ieXeu6kjcta8ZjFbcCaWsC0EY23AGclmjqLg2agub3GODn47Ly21c7xpDzHlmObVQdS4jh P4GSeySK3PJ87CZTxkZulbrluDe5ecFhpDlDBxdMy90pTpHN58hWAxmKSpqYcw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=RGrWg38O; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 4.52 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=RGrWg38O; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: E8D40377AB X-Spam-Score: 4.52 X-Migadu-Scanner: scn0.migadu.com X-TUID: NZdJVLGg8t4D Am Samstag, dem 08.10.2022 um 10:35 +0200 schrieb zimoun: > Hi Liliana, >=20 > What are we discussing if we are agreeing? ;-) >=20 > Well, from my understanding, we are miscommunicating and somehow just > saying the same thing using a different point of view. >=20 >=20 > On Fri, 07 Oct 2022 at 21:28, Liliana Marie Prikler > wrote: > > Am Freitag, dem 07.10.2022 um 20:49 +0200 schrieb zimoun: >=20 > > > Let start to have a simple extension that we can improve by > > > incremental changes, > >=20 > > My point is that we already have proper extensions in both guix and > > other channels.=C2=A0 It's a little late to "start with a simple [one]"= . >=20 > What others do I miss?=C2=A0 I am only aware of gwl and guix-modules. >=20 > What are the other extensions and from which channels? Oh, guix-modules is included in Guix proper. I thought it was part of an HPC channel, my bad. > > > The already included extension 'guix-modules' is usable using the > > > snippet above.=C2=A0 And we teach people via a blog post on > > > hpc.guix.info. > >=20 > > A manual is clearly more visible than a blog post.=C2=A0 Also, even if > > that blog post had everything, we've added blog posts to the > > cookbook already, so it wouldn't even be that hard in this case. >=20 > We agree, I guess.=C2=A0 Maybe it was poorly worded but I was saying that > the current situation is not satisfying and these patches are a tiny > first step in improving the situation.=C2=A0 Yes the manual is the > location for the documentation and that=E2=80=99s some coming patches. :-= ) >=20 > From my understanding, we are saying the same thing. :-) >From my understanding we are not. Or at least not under the assumption that you're saying that adding example extensions will somehow improve the situation. Again, we already have actual extensions packaged, I don't see what the point would be in having an example one. > > > > > --8<---------------cut here---------------start------------- > > > > > >8--- > > > > > $ guix shell guix-modules -- guix module -h > > > > > guix: module: command not found > > > > > Try `guix --help' for more information. > > > > >=20 > > > > > $ guix shell guix-modules > > > > > [env]$ guix module -h > > > > > guix: module: command not found > > > > > Try `guix --help' for more information. > > > > > --8<---------------cut here---------------end--------------- > > > > > >8--- > > >=20 > > > > In case you really didn't know how to use extensions with guix > > > > shell, it's guix shell guix your-extension -- guix blah, > > > > assuming > > > > your extension works with a slightly older guix. > > >=20 > > > As shown by my snippet above, it does not work; at least on > > > foreign distro. > >=20 > > Look at your snippet, then back to mine, now back to your snippet, > > now back to mine.=C2=A0 Sadly, your snippet isn't mine, but it could be > > mine if you added "guix" to the the packages listed before the --. >=20 > Maybe I am wrong or maybe I miss a point but rely on the package > =E2=80=99guix=E2=80=99 is not an option for an extension.=C2=A0 We had so= me discussions > [1] about that on gwl-devel some time ago =E2=80=93 which leads to > GUIX_EXTENSION_PATH. :-) IIUC this discussion is only tangentially related to what we're discussing now. At the time of writing, only the guix package provides GUIX_EXTENSION_PATH as a search path -- similar to how glib is one of the few packages to provide XDG_DATA_DIRS. =20 > Consider, >=20 > =C2=A0=C2=A0=C2=A0 guix shell guix -- guix >=20 > then two revisions of Guix are involved: >=20 > =C2=A0 1. one by ~/.config/current/bin/guix calling the subcommand =E2=80= =99shell=E2=80=99 > =C2=A0 2. one by =E2=80=99-- guix =E2=80=99 provided here by t= he package =E2=80=99guix=E2=80=99 >=20 > When an user runs an extension, they expect to run their current > Guix. For instance, consider that =E2=80=99name-version=E2=80=99 is an e= xtension > displaying name and version. >=20 > --8<---------------cut here---------------start------------->8--- > (define-module (guix extensions name-version) > =C2=A0 #:use-module (guix scripts) > =C2=A0 #:use-module (guix ui) > =C2=A0 #:use-module (guix packages) > =C2=A0 #:use-module (gnu packages) > =C2=A0 #:export (guix-name-version)) >=20 > (define-command (guix-name-version . args) > =C2=A0 (category extension) > =C2=A0 (synopsis "show name and version") >=20 > =C2=A0 (let* ((pkg (car args)) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (package (specification-= >package pkg)) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (name (package-name pack= age)) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (version (package-versio= n package))) > =C2=A0=C2=A0=C2=A0 (format #t (G_ "name: ~a~%version: ~a~%") name version= ))) > --8<---------------cut here---------------end--------------->8--- >=20 > Using Guix 65cabb0, the use of this extension reads, >=20 > --8<---------------cut here---------------start------------->8--- > $ GUIX_EXTENSIONS_PATH=3D/tmp/name-version/guix/extensions guix name- > version parallel > name: parallel > version: 20220722 >=20 > $ guix shell guix > [env]$ GUIX_EXTENSIONS_PATH=3D/tmp/name-version/guix/extensions guix > name-version parallel > name: parallel > version: 20220522 > --8<---------------cut here---------------end--------------->8--- >=20 > There is no difference with an extension and a proper module once > configured GUIX_EXTENSIONS_PATH adequately.=C2=A0 So, equivalently: >=20 > --8<---------------cut here---------------start------------->8--- > $ guix show parallel | recsel -p name,version > name: parallel > version: 20220722 >=20 > $ guix shell guix -- guix show parallel | recsel -p name,version > name: parallel > version: 20220522 > --8<---------------cut here---------------end--------------->8--- >=20 > That=E2=80=99s why the package guix is not provided (before --) by the > snippets above.=C2=A0 It is not a mistake and I still maintain there is a= n > unexpected behaviour (bug?) for the extensions and =E2=80=99guix shell=E2= =80=99 =E2=80=93 the > fix you are proposing does not match the idea behind the extensions, > IMHO. >=20 > BTW, shell+extension is a corner case from my point of view.=C2=A0 I also > maintain it is unrelated to this patch submission. :-) To be fair, the actual bug here is -- as I've said in a number of patches already -- that manifests don't have first-class search paths. Were it not for that, you could do guix shell normally. However, this difference in package versions, while visible, should not be something a *simple* extension needs to care about. Plus, I think people have mentioned the "extensions as channels" pattern, which I believe is what Andrew was using for Guix Home before it became upstreamed (and might still be using). > From the feedback I got at the lightening talk in 10 years event, I > assume the feature is barely known.=C2=A0 I still miss what is the > concrete objection with these patches.=C2=A0 Could you elaborate?=C2=A0 D= o they > break something?=C2=A0 Are they not compliant? >=20 > I got it, you find them useless. :-) But as I said, maybe I or > someone else will improve next =E2=80=93 is perfection not the enemy of t= he > good? >=20 > The two only Guix extensions I am aware of are =E2=80=99gwl=E2=80=99 and = =E2=80=99guix- > modules=E2=80=99. Both are complex and difficult starters, IMHO.=C2=A0 H= ence > these tiny starter examples, for what they are worth. >=20 > I am fine to expand =E2=80=99guix-example=E2=80=99, write a section to th= e manual, > etc. That=E2=80=99s the general idea with the submission of this patch. = :-) > Well, I am just missing the objections because these patches appears > to me complementary and a first tiny step. I reject the idea of including examples that are strictly less explanatory than GNU hello -- which imho all the hitherto proposed ones are -- as packages to install solely on the ground that gwl and guix- modules are "complex and difficult starters". Of course, they are complex by the nature of the real-world problems they are trying to solve, but that doesn't mean there are no real-world problems with simpler solutions. The work a novice user would have to do to understand all of guix- example would be to `guix build -S guix-example', then understand its code, followed by `guix edit guix-example', understand that, and finally apply it to their use case. Note how this includes commands that are typically more on the contributor side. Also note how the code is splintered in two segments so they have to switch between the two (or it's tangled as in the case of guix-hello, which also has its issues). The cookbook on the other hand can be read with the info reader (or browser) of their choice, and is thus imho preferable. It also offers a better way of putting the code together without literally writing the extension code inside the package itself. Cheers