From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id iB7RCsDbIWBXBgAA0tVLHw (envelope-from ) for ; Tue, 09 Feb 2021 00:48:00 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id uOmxBsDbIWB+JwAA1q6Kng (envelope-from ) for ; Tue, 09 Feb 2021 00:48:00 +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 9E625940105 for ; Tue, 9 Feb 2021 00:47:59 +0000 (UTC) Received: from localhost ([::1]:47434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9HCA-0007He-Ik for larch@yhetil.org; Mon, 08 Feb 2021 19:47:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36906) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9HBz-0007Fw-Oq for guix-devel@gnu.org; Mon, 08 Feb 2021 19:47:47 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:43132) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l9HBx-0000A5-Sw for guix-devel@gnu.org; Mon, 08 Feb 2021 19:47:47 -0500 Received: by mail-wr1-x42f.google.com with SMTP id z6so19455525wrq.10 for ; Mon, 08 Feb 2021 16:47:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=38FJ7snTOL6gT1t+It2pVBZFYh2qlsa7w0kp/rGGi94=; b=hNwrmd3VU20BWVby5PcfXaDYqFVnlMoa/0Ww53naRSEu9sCthRzFlxHElSb5pQP/0a oEs2/EL0K2fgRfDfRb7TgfAndgj5hqRypRfHarVReZ/8GJOUfEjlBGxZFaXIBOuVYXa+ IvqftZGiFFJSr9pg8OUO1R9hT+N/UqL7MXZKhnZ0KWBhoXEQxYkUss/2T0eQiCGxs/13 t6JYzRzFvKaHhdIlIdtLOiI558mfAR0YRwiVMTgMXNc+MdyZbbs5gtQAQoPSkUo5qt1t bVdk8/2ugXcsZ2t1Wj8f9+/Rjsv3lL5I3GXzvqqSgM0wo7S4bjCSyBGSid1GDEDXu6ti bu5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=38FJ7snTOL6gT1t+It2pVBZFYh2qlsa7w0kp/rGGi94=; b=HwnBXg+NyB976yX5xfbXmCN8NVQK2+N2VuzbPuszasaY5vIkMXrRnDERGEhjo0u/Zd +qqM0GYVmN7ErLTUEdbMOFrQoUJRuoulVnrHFzEfcQwcKgXCqGeCMRo4sZoMSezvYWcv U6pTPgsRy96BX31Pz5P6iF6eXf7QINGhpGtLd6wOGt/2C+1ZbyBMpxcrF/JYfBJZVJVK O2+SDf1TICTg5EF8cHfVQeeqScAeExmMzMBJR5BavOCg1nRNl+QBHQ5fKxQqWmmAnLjp BdwIRDFdMVpPBcjBL8GGEnOj0PmXo0EYKMbFcXxzU9A1hy6MRG17heHmM7yZxNltg3kV p7XQ== X-Gm-Message-State: AOAM532MbUDRAyuy3HLhO6yfE9FM838jWRgMOpRMH0eLN5j7yjwUmSrb Oh3FBeSt2dh/S0gP21rIts2XvF7MJQw= X-Google-Smtp-Source: ABdhPJxEOgU2y0zJvz8kki1g3yRlQHc5BW3NfucxPgz//YzISER58GZvkcCQSmPfEgsMtVc6+0rYrA== X-Received: by 2002:adf:a196:: with SMTP id u22mr4040428wru.416.1612831664110; Mon, 08 Feb 2021 16:47:44 -0800 (PST) Received: from lili ([88.126.110.68]) by smtp.gmail.com with ESMTPSA id i10sm8029720wrp.0.2021.02.08.16.47.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Feb 2021 16:47:43 -0800 (PST) From: zimoun To: Ricardo Wurmus Subject: Re: GUIX_EXTENSIONS_PATH pattern In-Reply-To: <875z32rxse.fsf@elephly.net> 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> <875z32rxse.fsf@elephly.net> Date: Tue, 09 Feb 2021 01:40:37 +0100 Message-ID: <864kimkr96.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x42f.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.06 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=hNwrmd3V; dmarc=pass (policy=none) header.from=gmail.com; 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: 9E625940105 X-Spam-Score: -3.06 X-Migadu-Scanner: scn1.migadu.com X-TUID: yM16AP4EYszf Hi Ricardo, On Mon, 08 Feb 2021 at 23:37, Ricardo Wurmus wrote: > 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 re= ally > are in the =E2=80=9Cextensions=E2=80=9D sub-directory. Why would the var= iable refer to > a more generic parent directory? Let take an example, the recent Ludo=E2=80=99s explorer. It is easy to transform it as an extension and then use =E2=80=9Cguix explo= re=E2=80=9D. But 2 things are strict: - user side: GUIX_EXTENSIONS_PATH - extensioner side: define-module Maybe I am wrong and I miss something. From my understanding, - the file must be located at $GUIX_EXTENSIONS_PATH - the module must be defined as (guix extension explore) because of: --8<---------------cut here---------------start------------->8--- (match (search-path (extension-directories) (format #f "~a.scm" command)) [...] (resolve-interface `(guix extensions ,command))))) --8<---------------cut here---------------end--------------->8--- So, taking the previous example, it would be easy to say: hey, clone this, export GUIX_EXTENSIONS_PATH as /path/to/checkout and run =E2=80=9Cguix explore=E2=80=9D. But, to work, the repo must have the structure: - guix-explorer - guix - extensions - explore.scm because the module and in the same time $GUIX_EXTENSIONS_PATH must be =E2=80=9Cguix-explore/guix/extensions=E2=80=9C. I feel something is wrong.= And I initially proposed to append =E2=80=99/guix/extensions=E2=80=99 by default = to GUIX_EXTENSIONS_PATH in =E2=80=99extension-directories=E2=80=99. I do not understand why it should be a problem. BTW, for packages as GWL, it does not change. It is just an agreement between the two sides, right? > 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. Ok, fine with me. It is reasonable to have GUIX_EXTENSIONS_PATH defined by user preference in their ~/.bash_profile or whatever. > 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). For sure! Even if we are already on guix-devel. :-) >> 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=9C= guix system foo=E2=80=9D. Well, >> these subcommands are not defined as =E2=80=99define-command=E2=80=99 bu= t we could take >> this road. WDYT? > > I haven=E2=80=99t really thought about this, but extensions for sub-comma= nds of > sub-commands currently only work by replacing the parent command, so > they cannot be composed. Indeed, it is a separated topic. :-) First, the subcommand should use something like =E2=80=99define-command=E2=80=99. > 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 re= quire more work > as the =E2=80=9Csystem=E2=80=9D command is responsible for dispatching to= the > 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 s= ystem=E2=80=9D entry point if > (guix extensions system foo) exists, but this may have unwanted > consequences. Yeah, you have right. It needs more thoughts and discussions. Cheers, simon