From patchwork Mon Jun 19 22:07:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 51082 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 5AC8027BBE2; Mon, 19 Jun 2023 23:08:43 +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.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS 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 9139227BBF0 for ; Mon, 19 Jun 2023 23:08:38 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qBN2b-0007Tx-A2; Mon, 19 Jun 2023 18:08:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBN2Z-0007TP-4F for guix-patches@gnu.org; Mon, 19 Jun 2023 18:08:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qBN2Y-0004Tp-SA for guix-patches@gnu.org; Mon, 19 Jun 2023 18:08:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qBN2Y-0005k8-NY for guix-patches@gnu.org; Mon, 19 Jun 2023 18:08:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#60826] [PATCH gnome-team v3 2/5] build: gnu: Export a %gnu-default-modules variable. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 19 Jun 2023 22:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60826 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60826@debbugs.gnu.org Cc: Bruno Victal , liliana.prikler@gmail.com Received: via spool by 60826-submit@debbugs.gnu.org id=B60826.168721245622006 (code B ref 60826); Mon, 19 Jun 2023 22:08:02 +0000 Received: (at 60826) by debbugs.gnu.org; 19 Jun 2023 22:07:36 +0000 Received: from localhost ([127.0.0.1]:57477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBN28-0005is-IB for submit@debbugs.gnu.org; Mon, 19 Jun 2023 18:07:36 -0400 Received: from smtpm3.myservices.hosting ([185.26.105.234]:44806) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBN26-0005ij-FG for 60826@debbugs.gnu.org; Mon, 19 Jun 2023 18:07:34 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm3.myservices.hosting (Postfix) with ESMTP id 3E32720D81; Tue, 20 Jun 2023 00:07:32 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 8FD318009D; Tue, 20 Jun 2023 00:07:32 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 5pRMI1LnRS76; Tue, 20 Jun 2023 00:07:32 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id EF76580098; Tue, 20 Jun 2023 00:07:31 +0200 (CEST) From: Bruno Victal Date: Mon, 19 Jun 2023 23:07:05 +0100 Message-Id: <788ffede0cb9cdab9d7b7573de321dfd554caa0b.1687212109.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This makes tweaking the #:module argument less reliant on the programmers astral wisdom to divine the right module imports. * guix/build-system/gnu.scm (%default-modules): Rename to … (%gnu-default-modules): … this and export it as well. --- guix/build-system/gnu.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm index 3308302472..448a2b2a44 100644 --- a/guix/build-system/gnu.scm +++ b/guix/build-system/gnu.scm @@ -28,6 +28,7 @@ (define-module (guix build-system gnu) #:use-module (srfi srfi-1) #:use-module (ice-9 match) #:export (%gnu-build-system-modules + %gnu-default-modules %strip-flags %strip-directories gnu-build @@ -55,7 +56,7 @@ (define %gnu-build-system-modules (guix build gremlin) (guix elf))) -(define %default-modules +(define %gnu-default-modules ;; Modules in scope in the build-side environment. '((guix build gnu-build-system) (guix build utils))) @@ -237,7 +238,7 @@ (define* (dist-package p source #:key (phases '%dist-phases)) (arguments ;; Use the right phases and modules. (substitute-keyword-arguments (package-arguments p) - ((#:modules modules %default-modules) + ((#:modules modules %gnu-default-modules) `((guix build gnu-dist) ,@modules)) ((#:imported-modules modules %gnu-build-system-modules) @@ -360,7 +361,7 @@ (define* (gnu-build name inputs (system (%current-system)) (build (nix-system->gnu-triplet system)) (imported-modules %gnu-build-system-modules) - (modules %default-modules) + (modules %gnu-default-modules) (substitutable? #t) allowed-references disallowed-references) @@ -500,7 +501,7 @@ (define* (gnu-cross-build name (system (%current-system)) (build (nix-system->gnu-triplet system)) (imported-modules %gnu-build-system-modules) - (modules %default-modules) + (modules %gnu-default-modules) (substitutable? #t) allowed-references disallowed-references)