| Message ID | 20220821131222.12411-1-paren@disroot.org |
|---|---|
| Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org>
X-Original-To: patchwork@mira.cbaines.net
Delivered-To: patchwork@mira.cbaines.net
Received: by mira.cbaines.net (Postfix, from userid 113)
id 982E027BBEA; Sun, 21 Aug 2022 14:14:11 +0100 (BST)
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net
X-Spam-Level:
X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID,
DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED
autolearn=unavailable autolearn_force=no version=3.4.6
Received: from lists.gnu.org (lists.gnu.org [209.51.188.17])
by mira.cbaines.net (Postfix) with ESMTPS id 60CE927BBE9
for <patchwork@mira.cbaines.net>; Sun, 21 Aug 2022 14:14:11 +0100 (BST)
Received: from localhost ([::1]:36500 helo=lists1p.gnu.org)
by lists.gnu.org with esmtp (Exim 4.90_1)
(envelope-from <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org>)
id 1oPkmI-0006BT-GI
for patchwork@mira.cbaines.net; Sun, 21 Aug 2022 09:14:10 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:34972)
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
id 1oPkmB-00069Y-3x
for guix-patches@gnu.org; Sun, 21 Aug 2022 09:14:03 -0400
Received: from debbugs.gnu.org ([209.51.188.43]:44300)
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
id 1oPkmA-0006iM-RR
for guix-patches@gnu.org; Sun, 21 Aug 2022 09:14:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1oPkmA-0008PE-Mg
for guix-patches@gnu.org; Sun, 21 Aug 2022 09:14:02 -0400
X-Loop: help-debbugs@gnu.org
Subject: [bug#57317] [PATCH 0/2] Implicitly set GUIX_EXTENSIONS_PATH in
profiles.
Resent-From: "(" <paren@disroot.org>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: guix-patches@gnu.org
Resent-Date: Sun, 21 Aug 2022 13:14:02 +0000
Resent-Message-ID: <handler.57317.B.166108759432231@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: report 57317
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 57317@debbugs.gnu.org
Cc: "\(" <paren@disroot.org>
X-Debbugs-Original-To: guix-patches@gnu.org
Received: via spool by submit@debbugs.gnu.org id=B.166108759432231
(code B ref -1); Sun, 21 Aug 2022 13:14:02 +0000
Received: (at submit) by debbugs.gnu.org; 21 Aug 2022 13:13:14 +0000
Received: from localhost ([127.0.0.1]:34048 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
id 1oPklO-0008Nn-Bv
for submit@debbugs.gnu.org; Sun, 21 Aug 2022 09:13:14 -0400
Received: from lists.gnu.org ([209.51.188.17]:59816)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <paren@disroot.org>) id 1oPklL-0008Ne-1L
for submit@debbugs.gnu.org; Sun, 21 Aug 2022 09:13:12 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:37398)
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <paren@disroot.org>) id 1oPklK-00059Q-OO
for guix-patches@gnu.org; Sun, 21 Aug 2022 09:13:10 -0400
Received: from knopi.disroot.org ([178.21.23.139]:57104)
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <paren@disroot.org>) id 1oPklI-0006ck-LP
for guix-patches@gnu.org; Sun, 21 Aug 2022 09:13:10 -0400
Received: from localhost (localhost [127.0.0.1])
by disroot.org (Postfix) with ESMTP id B72DE4006B;
Sun, 21 Aug 2022 15:13:04 +0200 (CEST)
X-Virus-Scanned: SPAM Filter at disroot.org
Received: from knopi.disroot.org ([127.0.0.1])
by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id 3NrVlN3nSdsz; Sun, 21 Aug 2022 15:13:03 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
t=1661087548; bh=J0ih20JPOSwDjEtuN0Ac40f3S4vsO4Z+ym92wls2Zb8=;
h=From:To:Cc:Subject:Date;
b=WZyfxeTQ/aA+vijztDMsLHvybAZ+PJYyb9qooRfzQEcMph1/M22ob4nEPayFmNjRr
OTIlsGmgXB3lxMIVHRWqbQcITkXwle0bJCNqYYauxarXkYfFLZVSoE5Hxff6hr2oPF
A9bjkrWO6cUFYJtx1TJsZM9DkC9Sukqw/8Jnzifg/4D89y95r0UitU3nQyR9TyCQvx
3hE3tKrmbE8DYuNdJnw0k4vYsYXn0WoUDgFGaLs6G6Dsyh/KWvwTqokep4wsg/exKj
7IQFo2cfM1J4TndqK4DyK2uJ0nI+/9wcyousZUKJbmSrfUJgT53OPajvo+9B2o1hmu
mmkjdWXNLEEXg==
Date: Sun, 21 Aug 2022 14:12:22 +0100
Message-Id: <20220821131222.12411-1-paren@disroot.org>
Mime-Version: 1.0
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=178.21.23.139; envelope-from=paren@disroot.org;
helo=knopi.disroot.org
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, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-BeenThere: guix-patches@gnu.org
List-Id: <guix-patches.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>,
<mailto:guix-patches-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/guix-patches>
List-Post: <mailto:guix-patches@gnu.org>
List-Help: <mailto:guix-patches-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>,
<mailto:guix-patches-request@gnu.org?subject=subscribe>
Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org
Sender: "Guix-patches"
<guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org>
Reply-to: "\(" <paren@disroot.org>
X-ACL-Warn: , "\( via Guix-patches" <guix-patches@gnu.org>
From: "\( via Guix-patches" via <guix-patches@gnu.org>
X-getmail-retrieved-from-mailbox: Patches
|
| Series |
Implicitly set GUIX_EXTENSIONS_PATH in profiles.
|
|
Message
\(
Aug. 21, 2022, 1:12 p.m. UTC
Hi Guix! This patchset allows Guix to automatically find extensions installed in profiles. There's probably a more elegant way to do this, but this is the simplest and easiest way I can think of. ( (2): build: profiles: Always set GUIX_EXTENSIONS_PATH. gnu: package-management: Remove mentions of GUIX_EXTENSIONS_PATH. gnu/packages/package-management.scm | 11 +---------- guix/build/profiles.scm | 4 ++++ 2 files changed, 5 insertions(+), 10 deletions(-)
Comments
I agree with Maxime: this looks good, and I also think that other variables could be set unconditionally. Yes, it’s a little inelegant to set environment variables like this, but for GUIX_EXTENSIONS_PATH I think it’s warranted, because Guix is special anyway. So +1 from me. I’m CC’ing the maintainers to perhaps get a comment on the general approach for the record.
On Sun, Aug 21, 2022 at 09:41:41PM +0200, Ricardo Wurmus wrote: > I agree with Maxime: this looks good, and I also think that other > variables could be set unconditionally. > > Yes, it’s a little inelegant to set environment variables like this, but > for GUIX_EXTENSIONS_PATH I think it’s warranted, because Guix is special > anyway. > > So +1 from me. > > I’m CC’ing the maintainers to perhaps get a comment on the general > approach for the record. > Not with my maintainer hat on: I tried to create an extension a while ago and it wasn't entirely clear to me how to force loading extensions correctly when testing from a guix environment. By removing the notes about setting GUIX_EXTENSION_PATH to ~/.guix-profile/... we allow Guix to use actual search paths like we do with other environment variables so we can use it with guix-home or other alternate profiles, such as the OS config. I took a minute to look at my extension; I had to set GUIX_EXTENSION_PATH to an absolute location, not a relative one. Normally we'd tell people they have to install a package to make use of it's search paths, like reminding people to add python to their shell invocation, not just python-pip. In this case we DON'T want people installing the guix package, so we need to make the environment variable available another way.
On Sun, Aug 21, 2022 at 02:12:22PM +0100, ( via Guix-patches via wrote: > Hi Guix! > > This patchset allows Guix to automatically find extensions installed > in profiles. There's probably a more elegant way to do this, but this > is the simplest and easiest way I can think of. > > ( (2): > build: profiles: Always set GUIX_EXTENSIONS_PATH. > gnu: package-management: Remove mentions of GUIX_EXTENSIONS_PATH. > > gnu/packages/package-management.scm | 11 +---------- > guix/build/profiles.scm | 4 ++++ > 2 files changed, 5 insertions(+), 10 deletions(-) > I pushed the first patch from the second set to always set GUIX_EXTENSIONS_PATH and the second patch from the first set, which only modifies guix-modules but not the guix package itself. I'm pretty sure that Guix still needs the search path for the extensions. As a side note, should something be added to guix shell/environment so it finds the extensions too? Thanks for the patches! Now it should be easier to add extensions.