Subject: bug#71618: closed (Re: [bug#71618] [PATCH] guix: gnu-build-system: Add %gnu-build-system-default-modules.)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 19 Jun 2024 01:06:01 +0000

Your bug report

#71618: [PATCH] guix: gnu-build-system: Add %gnu-build-system-default-modules.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
71618: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71618
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#71618] [PATCH] guix: gnu-build-system: Add %gnu-build-system-default-modules.
From: Maxim Cournoyer <[email-masked]>
To: Bruno Victal <[email-masked]>
Cc: Tomas Volf <[email-masked]>, Ludovic Courtès <[email-masked]>, [email-masked]
Date: Tue, 18 Jun 2024 21:04:18 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

Bruno Victal <[email-masked]> writes:

> Hi Tomas,
>
> On 2024-06-17 20:10, Tomas Volf wrote:
>> Since there is no exported variable containing the list of default modules,
>> every place that needs it (in #:modules for example) needs to copy&paste it
>> and pray it never changes.
>
> I believe this has been addressed with [1].
>
> [1]: <https://issues.guix.gnu.org/66426>

Indeed, thanks for the heads-up.  That's on the core-updates branch.

Closing.

-- 
Thanks,
Maxim

Subject: [PATCH] guix: gnu-build-system: Add %gnu-build-system-default-modules.
From: Tomas Volf <[email-masked]>
To: [email-masked]
Cc: Tomas Volf <[email-masked]>
Date: Mon, 17 Jun 2024 21:10:35 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Since there is no exported variable containing the list of default modules,
every place that needs it (in #:modules for example) needs to copy&paste it
and pray it never changes.

This commit provides new variable exposing the default list, allowing
constructs like this:

    #:modules
    `((srfi srfi-34)
      ,@%gnu-build-system-default-modules)

* guix/build-system/gnu.scm (%gnu-build-system-default-modules): New variable.
(define-module)[#:export]: Export it.

Change-Id: I1da392019a95aea5edeac0301db26266efbeee9e
---
 guix/build-system/gnu.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index cdbb547773..53ac2f8cbd 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-build-system-default-modules
             %strip-flags
             %strip-directories
             gnu-build
@@ -60,6 +61,8 @@ (define %default-modules
   '((guix build gnu-build-system)
     (guix build utils)))
 
+(define %gnu-build-system-default-modules %default-modules)
+
 (define* (package-with-explicit-inputs/deprecated p inputs
                                                   #:optional
                                                   (loc (current-source-location))
-- 
2.45.1