From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id mI45CS/RIWDsPAAA0tVLHw (envelope-from ) for ; Tue, 09 Feb 2021 00:02:55 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id YPoJBS/RIWBVEQAAB5/wlQ (envelope-from ) for ; Tue, 09 Feb 2021 00:02:55 +0000 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 67F9C940274 for ; Tue, 9 Feb 2021 00:02:54 +0000 (UTC) Received: from localhost ([::1]:55926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9GUX-0004zW-8U for larch@yhetil.org; Mon, 08 Feb 2021 19:02:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56184) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9FAF-00029T-TS for guix-devel@gnu.org; Mon, 08 Feb 2021 17:37:51 -0500 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21196) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9FAD-0005H3-6C for guix-devel@gnu.org; Mon, 08 Feb 2021 17:37:51 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1612823863; cv=none; d=zohomail.com; s=zohoarc; b=aPZj/kKiXkhGdpDASgl/6dJlju6qzyXrQZen8GeAThTBO2OT2dHy73f3LEmvj4Zh4QTfA4Y5tRiTyLtVDDd1eTjykrfnIEfYb845PcSxawWcz8KfZ1Qh0eJpehPrU7Abg1cA8f5sgF/Pz/p5rOiSjPLOAXGQpifrjmdiP4lC3z0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612823863; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=UaOxQtlvc4pF59WpoRldcLcPPJ0fueKBTDi3h1Kl0rA=; b=cvGlL0Yw9nigjoLRaH4AmJV/hb5erK+sL9QtvKJ59SwIlX7XRd97hMLZbhyvGhky3HQmBsVhzba0AszxItY8ZigZHQh+6Z4Dbp5DHAq/QEgbps7GyuvxxGA3gFVixDGvJwvO/L3gwwaol6vmZ4CfVMej7qF+eoDg7dj9L5PyQig= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1612823863; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=UaOxQtlvc4pF59WpoRldcLcPPJ0fueKBTDi3h1Kl0rA=; b=FcUyikG6D/26d4jwYVdH93HbvYHYruDupSxtlyClV7S2EO5c/GGRPYKz+5stIKoO 6YPYNyopk1I7jnYk+QKsKnk3nWu3JLyOknczH0Tfd/gSaDeWviWSAT1mqjxtS/TkmHO 2bco1gWqRkZ1AoTFzaVO5HThoFvVjv53q2ECxVaY= Received: from localhost (p54ad4b10.dip0.t-ipconnect.de [84.173.75.16]) by mx.zohomail.com with SMTPS id 1612823860452997.6063907108867; Mon, 8 Feb 2021 14:37:40 -0800 (PST) References: <86k0sekkj8.fsf@gmail.com> <87zh1aapzi.fsf@elephly.net> <86eeilly1y.fsf@gmail.com> <87wnwdbzyn.fsf@elephly.net> <87turhbz54.fsf@elephly.net> <86zh19k5vv.fsf@gmail.com> <86k0rsdylk.fsf@gmail.com> User-agent: mu4e 1.4.14; emacs 27.1 From: Ricardo Wurmus To: zimoun Subject: Re: GUIX_EXTENSIONS_PATH pattern In-reply-to: <86k0rsdylk.fsf@gmail.com> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Mon, 08 Feb 2021 23:37:37 +0100 Message-ID: <875z32rxse.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.51; envelope-from=rekado@elephly.net; helo=sender4-of-o51.zoho.com 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guix Devel Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.56 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b=FcUyikG6; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 67F9C940274 X-Spam-Score: -3.56 X-Migadu-Scanner: scn1.migadu.com X-TUID: UZRrMaoYGyog Hi, sorry for the delay! zimoun writes: >>> We can change this, but we=E2=80=99d need to agree on an as yet unused = directory >>> as the root for extensions. > >> We could say that: >> >> 1. the prototype of GUIX_EXTENSIONS_PATH is path/to/guix >> 2. the folder /extensions is implicitly appended=20 >> 3. ~/.config/guix is implicitly appended > > Do we agree on this default? Which implies=E2=80=A6 I=E2=80=99m really not sure. 1. do you mean =E2=80=9Cshare/guix=E2=80=9D here? 2. I don=E2=80=99t know if this is a good idea, because the extensions real= ly are in the =E2=80=9Cextensions=E2=80=9D sub-directory. Why would the varia= ble refer to a more generic parent directory? 3. My opinion is that ~/.config/guix should not get special treatment. People can use different profiles for =E2=80=9Cguix pull=E2=80=9D. >> The patch attached does that. But, the definition of the package =E2=80= =99guix=E2=80=99 >> needs to be tweaked (not done) in agreement, especially: >> >> --8<---------------cut here---------------start------------->8--- >> (native-search-paths >> (list (search-path-specification >> (variable "GUIX_EXTENSIONS_PATH") >> (files '("share/guix/extensions"))))) >> --8<---------------cut here---------------end--------------->8--- > > =E2=80=A6and=E2=80=A6 > >>>> Moreover, it could nice to have GUIX_EXTENSIONS_PATH look by default >>>> in ~/.config/guix/extensions, i.e., by default >>>> GUIX_EXTENSIONS_PATH=3D~/.config. >>> >>> The last part of this sentence is what I meant above: we need to avoid >>> that, because that would cause >>> ~/.config/guix/current/share/guile/site/3.0/guix/scripts/ to be included >>> in the search for extensions. >> >> It is easy to filter out by adding rules in =E2=80=99extensions-director= ies=E2=80=99. :-) > > =E2=80=A6that. > > To me, the easiest is to fix the module name as =E2=80=99(guix extensions= foo)=E2=80=99 > and since that is fixed, GUIX_EXTENSIONS_PATH should not declare > explicitly =E2=80=99/extensions=E2=80=99. Perhaps we can invite some other people to comment on this. I have become confused about what is the best way forward (which is one of the reasons why it took me so long to reply). > BTW, I have not tried to adapt and makes it work for extension as > subcommand. I have in mind: =E2=80=9Cguix git log=E2=80=9D or =E2=80=9Cg= uix system foo=E2=80=9D. Well, > these subcommands are not defined as =E2=80=99define-command=E2=80=99 but= we could take > this road. WDYT? I haven=E2=80=99t really thought about this, but extensions for sub-command= s of sub-commands currently only work by replacing the parent command, so they cannot be composed. We probably could add a mechanism to that (guix extensions system foo) would extend the =E2=80=9Cguix system=E2=80=9D command, but this would requ= ire more work as the =E2=80=9Csystem=E2=80=9D command is responsible for dispatching to t= he sub-command. I don=E2=80=99t know if there=E2=80=99s a good generic way to= implement this. =E2=80=9Cguix system foo=E2=80=9D could bypass the =E2=80=9Cguix sys= tem=E2=80=9D entry point if (guix extensions system foo) exists, but this may have unwanted consequences. --=20 Ricardo