From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id UDg3E1xIAmBIVwAA0tVLHw (envelope-from ) for ; Sat, 16 Jan 2021 01:58:52 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id kIX0DlxIAmDcLwAAbx9fmQ (envelope-from ) for ; Sat, 16 Jan 2021 01:58:52 +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 9B719940111 for ; Sat, 16 Jan 2021 01:58:51 +0000 (UTC) Received: from localhost ([::1]:43980 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0ara-00085Y-HG for larch@yhetil.org; Fri, 15 Jan 2021 20:58:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55860) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0arR-00085F-5x for guix-devel@gnu.org; Fri, 15 Jan 2021 20:58:41 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:44784) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0arP-0008Vx-8q for guix-devel@gnu.org; Fri, 15 Jan 2021 20:58:40 -0500 Received: by mail-wr1-x42f.google.com with SMTP id w5so11017755wrm.11 for ; Fri, 15 Jan 2021 17:58:38 -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 :disposition-notification-to:date:message-id:mime-version; bh=3RJ0FQxvODh9eI5EUY/3aKa9BxNjUxylAWOm3K7WaBY=; b=MNHdL4A1RKGRtEwRplMah976foCdNUz7XQ4sITzGGiTxlSzMI+ZB8S5JEdWMGRTkqS YobyrMD7XRgo++jYuus9job8v8EJhsqvIv+R7yZVuZFIIjkdRciEn036ypLi/n2YO2qF HRq4AAYTmznIttvT59xYNAf6DnpJMvJDz6Fjyue3gpVqyesvF488LkyINmSD31qDSJuf PVmNPdhK7/xJ8IQO9RcDzrqjo+da3bbbrimP/4CnkIgUL194Z94MRPEFYrZxXENrbqMV u4vcEs5zYyPnKZ9rs7ca6ihhEPmRJijA/x7sv7lp2v9/f6Pb4iOXB8fdOANzLu64drco e25g== 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 :disposition-notification-to:date:message-id:mime-version; bh=3RJ0FQxvODh9eI5EUY/3aKa9BxNjUxylAWOm3K7WaBY=; b=biW4Hj6hnBx5Vlbd1bvB12yYa82DiIFBM/as88YrtVOD4bpqVXklRydbYfbCvFiIUW eyR/hBW9tgVpCOvhmPjRYxc5WZIXf0t31lfVi1aH+TMDYk0WPz0Q5vik5Zl/ArT0zXn/ IFnGlQs/KeTTNJ6W7bd0oxRoZ5R/lCtcEwOs6ofCdTLTNOuwhCXWQs4JRK1CsUSiMWqv knAZua4sYA9DtsR33iV37KghbruEoNGDuT28DD40npDlfKj+IgmSaequ+iJ58KUzCGa1 FV+jPtESeJAaxsnINDB6EMDBVzIPlaxsy2xIXo+76aXsnsjIxkHXZnrtiiMx8MpsYMv3 pivg== X-Gm-Message-State: AOAM532caPKCKe/1zR6lOKe7aLYDWBAu/mK91xCaLUGx0P8IkHcsjexw 88RfdZprxoWMKEX71lhMaYZJLvt/oSc= X-Google-Smtp-Source: ABdhPJwsqwU1XszpmMGaGGXC1ischyjilUFMtNfOJGA5/nrJTvRvOMEDAeCxjzM3ia9ZsyhsTJG9jQ== X-Received: by 2002:a5d:4bc2:: with SMTP id l2mr16071555wrt.204.1610762317534; Fri, 15 Jan 2021 17:58:37 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id a17sm16646748wrs.20.2021.01.15.17.58.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 17:58:36 -0800 (PST) From: zimoun To: Ricardo Wurmus Subject: Re: GUIX_EXTENSIONS_PATH error? In-Reply-To: <87turhbz54.fsf@elephly.net> References: <86k0sekkj8.fsf@gmail.com> <87zh1aapzi.fsf@elephly.net> <86eeilly1y.fsf@gmail.com> <87wnwdbzyn.fsf@elephly.net> <87turhbz54.fsf@elephly.net> Date: Sat, 16 Jan 2021 02:49:40 +0100 Message-ID: <86zh19k5vv.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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, GB_FREEMAIL_DISPTO=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: -0.26 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=MNHdL4A1; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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: 9B719940111 X-Spam-Score: -0.26 X-Migadu-Scanner: scn0.migadu.com X-TUID: 7fVBeNGlwWaX --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ricardo, About the precedence, i.e., extension that overrides default command, see patch#45910. On Fri, 15 Jan 2021 at 23:42, Ricardo Wurmus wrote: > zimoun writes: > We can change this, but we=E2=80=99d need to agree on an as yet unused di= rectory > as the root for extensions. I do not know, maybe I will change my mind after a good ol=E2=80=99 black coffee. :-) 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 The patch attached does that. But, the definition of the package =E2=80=99= guix=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--- >> 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-directories= =E2=80=99. :-) > I have added a search path specification to the =E2=80=9Cguix=E2=80=9D pa= ckage itself, > so that it will set GUIX_EXTENSIONS_PATH to > $profile/share/guix/extensions automatically. The idea is to update the > format of the =E2=80=9Cchannels.scm=E2=80=9D file to allow for the instal= lation of extra > packages into the =E2=80=9Cguix pull=E2=80=9D profile (by default that=E2= =80=99s > ~/.config/guix/current). I see. Well, I need to fail myself to really understand=E2=80=A6 > This way I could say that I want the freshly pulled Guix to also install > the =E2=80=9Cgwl=E2=80=9D package in the same profile, and that new Guix = would > automatically have the =E2=80=9Cgwl=E2=80=9D extension=E2=80=99s =E2=80= =9Cworkflow=E2=80=9D sub-command. I agree. Cheers, simon -- --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=trivial-extension-path.patch Content-Description: trivial.patch diff --git a/guix/ui.scm b/guix/ui.scm index ad78d5cedd..e918b5b64f 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -2066,8 +2066,10 @@ contain a 'define-command' form." (define (extension-directories) "Return the list of directories containing Guix extensions." (filter file-exists? - (parse-path - (getenv "GUIX_EXTENSIONS_PATH")))) + (map (cut string-append <> "/extensions") + (parse-path + (string-append (config-directory) ":" + (getenv "GUIX_EXTENSIONS_PATH")))))) (define (commands) "Return the list of commands, alphabetically sorted." --=-=-=--