From patchwork Sun Aug 21 15:43:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\\(" X-Patchwork-Id: 41798 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 51DD627BBE9; Sun, 21 Aug 2022 16:45:48 +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 D04DA27BBEA for ; Sun, 21 Aug 2022 16:45:47 +0100 (BST) Received: from localhost ([::1]:55412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oPn91-0007Uh-06 for patchwork@mira.cbaines.net; Sun, 21 Aug 2022 11:45:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39060) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPn8J-0007U5-0M for guix-patches@gnu.org; Sun, 21 Aug 2022 11:45:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46858) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oPn8I-0004Ed-Mr for guix-patches@gnu.org; Sun, 21 Aug 2022 11:45:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oPn8I-0004ep-Gk for guix-patches@gnu.org; Sun, 21 Aug 2022 11:45:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57317] [PATCH v2 1/2] build: profiles: Implicitly set GUIX_EXTENSIONS_PATH. References: <20220821131222.12411-1-paren@disroot.org> In-Reply-To: <20220821131222.12411-1-paren@disroot.org> Resent-From: "(" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 21 Aug 2022 15:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57317 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57317@debbugs.gnu.org Cc: "\(" Received: via spool by 57317-submit@debbugs.gnu.org id=B57317.166109664817806 (code B ref 57317); Sun, 21 Aug 2022 15:45:02 +0000 Received: (at 57317) by debbugs.gnu.org; 21 Aug 2022 15:44:08 +0000 Received: from localhost ([127.0.0.1]:36606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPn7Q-0004d8-39 for submit@debbugs.gnu.org; Sun, 21 Aug 2022 11:44:08 -0400 Received: from knopi.disroot.org ([178.21.23.139]:46270) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPn7L-0004cX-55 for 57317@debbugs.gnu.org; Sun, 21 Aug 2022 11:44:05 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id A7DF640078; Sun, 21 Aug 2022 17:44:01 +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 A0n7h969ayGV; Sun, 21 Aug 2022 17:44:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1661096638; bh=80i6CoqDLY4n76IiImXME1nEIjO0k18vrYUJ8hwQ2R8=; h=From:To:Cc:Subject:Date; b=SBAEzCzpziatcqSScYucJUtbMoAAsytCqUigWc5X2xL+QKBMCX5/UF0IszRJppo/R f4C1FQDHAHz+CAtdKWb0UiD/ETPMX3XbcIrZByrt59zL2zcEhEZv6N0RCfRd04kt6p GCs3r6kqbrFqY+rbbbFD+GE4bA46lJzViyVwCsBGpwti52zH6E9qQpEPNPPcxjYKDc lEi2nC4DxpEy5lrBcoUPLAMc7at3R2OJFhgNr6W/s1RC5YfGe/EoTx+MyrD6oOJrvd 6YYoLlxzdfcSKo6Y9M/LXvbmckG0A7Td5UTqJo6+lHGHSAUN+l01DvVRODkkGudGeZ wXqVszzaLj/ww== Date: Sun, 21 Aug 2022 16:43:48 +0100 Message-Id: <20220821154349.22575-1-paren@disroot.org> 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: "\(" X-ACL-Warn: , "\( via Guix-patches" X-Patchwork-Original-From: "\( via Guix-patches" via From: "\\(" X-getmail-retrieved-from-mailbox: Patches * guix/build/profiles.scm (manifest-sexp->inputs+search-paths): Always return a search path for GUIX_EXTENSIONS_PATH. * guix/search-paths.scm ($GUIX_EXTENSIONS_PATH): New variable. This allows Guix to find extensions without any need for users to set GUIX_EXTENSIONS_PATH manually. --- guix/build/profiles.scm | 7 ++++--- guix/search-paths.scm | 11 +++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/guix/build/profiles.scm b/guix/build/profiles.scm index 0c92f222b4..b19d93f971 100644 --- a/guix/build/profiles.scm +++ b/guix/build/profiles.scm @@ -179,9 +179,10 @@ (define-syntax let-fields (() (values (reverse inputs) (delete-duplicates - (cons $PATH - (map sexp->search-path-specification - (reverse search-paths))))))))))) + (cons* $PATH + $GUIX_EXTENSIONS_PATH + (map sexp->search-path-specification + (reverse search-paths))))))))))) (define* (build-profile output manifest #:key (extra-inputs '()) (symlink symlink)) diff --git a/guix/search-paths.scm b/guix/search-paths.scm index 6b13a98946..5a0cddac8f 100644 --- a/guix/search-paths.scm +++ b/guix/search-paths.scm @@ -33,6 +33,7 @@ (define-module (guix search-paths) search-path-specification-file-pattern $PATH + $GUIX_EXTENSIONS_PATH $SSL_CERT_DIR $SSL_CERT_FILE @@ -73,6 +74,16 @@ (define $PATH (variable "PATH") (files '("bin" "sbin")))) +(define-public $GUIX_EXTENSIONS_PATH + ;; 'GUIX_EXTENSIONS_PATH' is used by Guix to locate extension commands. + ;; Like 'PATH', it's not attached to any package, so that users don't have + ;; to install the 'guix' package (which is not supposed to be installed, + ;; as it will mess up the 'guix pull' installation) or set the variable + ;; manually. + (search-path-specification + (variable "GUIX_EXTENSIONS_PATH") + (files '("share/guix/extensions")))) + ;; Two variables for certificates (see (guix)X.509 Certificates), ;; respected by 'openssl', possibly GnuTLS in the future ;; (https://gitlab.com/gnutls/gnutls/-/merge_requests/1541)