Subject: [PATCH gnome-team v3 2/5] build: gnu: Export a %gnu-default-modules variable.

From: Bruno Victal <[email-masked]>
Date: Mon, 19 Jun 2023 23:07:05 +0100

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)
-- 
2.39.2