Subject: [bug#66425] [PATCH core-updates] gnu: Avoid over-importing modules.

From: Bruno Victal <[email-masked]>
Date: Mon, 9 Oct 2023 16:54:03 +0100

The %gnu-build-system-modules variable is intended for the #:imported-modules
parameter.

* gnu/packages/acl.scm (acl)[arguments]<#:modules>: Replace incorrect use of
%gnu-build-system-modules.
* gnu/packages/backup.scm (dirvish)[arguments]<#:modules>: Ditto.
* gnu/packages/benchmark.scm (fio)[arguments]<#:modules>: Ditto.
* gnu/packages/bioinformatics.scm (ccwl)[arguments]<#:modules>: Ditto.
* gnu/packages/boost.scm (boost)[arguments]<#:modules>: Ditto.
* gnu/packages/bootloaders.scm (dtc)[arguments]<#:modules>: Ditto.
* gnu/packages/commencement.scm (gcc-final)[arguments]<#:modules>: Ditto.
* gnu/packages/cups.scm
(epson-inkjet-printer-escpr, splix)[arguments]<#:modules>: Ditto.
* gnu/packages/curl.scm (guile-curl)[arguments]<#:modules>: Ditto.
* gnu/packages/debian.scm (dpkg)[arguments]<#:modules>: Ditto.
* gnu/packages/dezyne.scm (dezyne)[arguments]<#:modules>: Ditto.
* gnu/packages/emacs-xyz.scm
(emacs-haskell-mode)[arguments]<#:modules>: Ditto.
* gnu/packages/engineering.scm
(fastcap, fasthenry)[arguments]<#:modules>: Ditto.
* gnu/packages/fonts.scm (font-amiri)[arguments]<#:modules>: Ditto.
* gnu/packages/freedesktop.scm (xdg-utils)[arguments]<#:modules>: Ditto.
* gnu/packages/game-development.scm (tsukundere)[arguments]<#:modules>: Ditto.
* gnu/packages/gcc.scm (make-libstdc++)[arguments]<#:modules>: Ditto.
* gnu/packages/gdb.scm (gdb/pinned)[arguments]<#:modules>: Ditto.
* gnu/packages/genimage.scm (genimage)[arguments]<#:modules>: Ditto.
* gnu/packages/gimp.scm (gimp)[arguments]<#:modules>: Ditto.
* gnu/packages/gnupg.scm (pinentry-rofi)[arguments]<#:modules>: Ditto.
* gnu/packages/gnuzilla.scm
(mozjs, icedove-minimal)[arguments]<#:modules>: Ditto.
* gnu/packages/graph.scm (python-graph-tool)[arguments]<#:modules>: Ditto.
* gnu/packages/guile-xyz.scm (artanis, guilescript, guile-dsv, guile-dbi)
(guile-hall, haunt, guile-studio, guile-libyaml, guile-gitlab)
(guile-smc)[arguments]<#:modules>: Ditto.
* gnu/packages/ibus.scm (rime-data)[arguments]<#:modules>: Ditto.
* gnu/packages/image.scm (jbigkit)[arguments]<#:modules>: Ditto.
* gnu/packages/instrumentation.scm (uftrace)[arguments]<#:modules>: Ditto.
* gnu/packages/linux.scm
(mdadm-static, ecryptfs-utils)[arguments]<#:modules>: Ditto.
* gnu/packages/machine-learning.scm (ghmm)[arguments]<#:modules>: Ditto.
* gnu/packages/maths.scm (mumps, hypre)[arguments]<#:modules>: Ditto.
* gnu/packages/package-management.scm
(guix-build-coordinator, nar-herder)[arguments]<#:modules>: Ditto.
* gnu/packages/qt.scm (python-sip-4)[arguments]<#:modules>: Ditto.
* gnu/packages/ratpoison.scm (ratpoison)[arguments]<#:modules>: Ditto.
* gnu/packages/scheme.scm (stklos)[arguments]<#:modules>: Ditto.
* gnu/packages/shellutils.scm (boxes)[arguments]<#:modules>: Ditto.
* gnu/packages/simh.scm (simh)[arguments]<#:modules>: Ditto.
* gnu/packages/stb.scm (stb)[arguments]<#:modules>: Ditto.
* gnu/packages/texinfo.scm (info-reader)[arguments]<#:modules>: Ditto.
* gnu/packages/virtualization.scm
(qemu, ganeti, criu)[arguments]<#:modules>: Ditto.
---
 gnu/packages/acl.scm                |  5 ++-
 gnu/packages/backup.scm             |  6 ++-
 gnu/packages/benchmark.scm          |  3 +-
 gnu/packages/bioinformatics.scm     |  7 +--
 gnu/packages/boost.scm              |  5 ++-
 gnu/packages/bootloaders.scm        |  4 +-
 gnu/packages/commencement.scm       |  7 +--
 gnu/packages/cups.scm               | 10 +++--
 gnu/packages/curl.scm               |  7 +--
 gnu/packages/debian.scm             |  5 ++-
 gnu/packages/dezyne.scm             |  5 ++-
 gnu/packages/emacs-xyz.scm          |  7 +--
 gnu/packages/engineering.scm        | 10 +++--
 gnu/packages/fonts.scm              |  3 +-
 gnu/packages/freedesktop.scm        |  5 ++-
 gnu/packages/game-development.scm   |  7 +--
 gnu/packages/gcc.scm                |  7 +--
 gnu/packages/gdb.scm                |  5 ++-
 gnu/packages/genimage.scm           |  5 ++-
 gnu/packages/gimp.scm               |  7 +--
 gnu/packages/gnupg.scm              |  7 +--
 gnu/packages/gnuzilla.scm           | 11 ++---
 gnu/packages/graph.scm              |  3 +-
 gnu/packages/guile-xyz.scm          | 69 +++++++++++++++++------------
 gnu/packages/ibus.scm               |  5 ++-
 gnu/packages/image.scm              |  5 ++-
 gnu/packages/instrumentation.scm    |  5 ++-
 gnu/packages/linux.scm              |  6 ++-
 gnu/packages/machine-learning.scm   |  3 +-
 gnu/packages/maths.scm              | 12 ++---
 gnu/packages/package-management.scm | 14 +++---
 gnu/packages/qt.scm                 |  5 ++-
 gnu/packages/ratpoison.scm          |  5 ++-
 gnu/packages/scheme.scm             |  5 ++-
 gnu/packages/shellutils.scm         |  5 ++-
 gnu/packages/simh.scm               |  5 ++-
 gnu/packages/stb.scm                |  7 +--
 gnu/packages/texinfo.scm            |  6 ++-
 gnu/packages/virtualization.scm     | 15 ++++---
 39 files changed, 186 insertions(+), 127 deletions(-)

diff --git a/gnu/packages/acl.scm b/gnu/packages/acl.scm
index eb20fdd549..92b4b15d9b 100644
--- a/gnu/packages/acl.scm
+++ b/gnu/packages/acl.scm
@@ -51,8 +51,9 @@ (define-public acl
         "1bqi7hj0xkpivwg7lx5cv3yvs9ks1i6azvpgbvfpzcq1i736233n"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:modules ((ice-9 ftw)
-                  ,@%gnu-build-system-modules)
+     `(#:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  (ice-9 ftw))
        #:configure-flags '("--disable-static")
        #:tests? ,(not (or (%current-target-system)
                           (target-hurd?)))
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 12c4a45b9d..bd3db019f7 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -812,8 +812,10 @@ (define-public dirvish
                (base32
                 "1kbxa1irszp2zw8hd5qzqnrrzb4vxfivs1vn64yxnj0lak1jjzvb"))))
     (arguments
-     `(#:modules ((ice-9 match) (ice-9 rdelim)
-                  ,@%gnu-build-system-modules)
+     `(#:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  (ice-9 match)
+                  (ice-9 rdelim))
        #:phases
        ;; This mostly mirrors the steps taken in the install.sh that ships
        ;; with dirvish, but simplified because we aren't prompting interactively
diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm
index 4d92457e59..4187cde264 100644
--- a/gnu/packages/benchmark.scm
+++ b/gnu/packages/benchmark.scm
@@ -90,7 +90,8 @@ (define-public fio
     (build-system gnu-build-system)
     (arguments
      (list #:modules
-           `(,@%gnu-build-system-modules
+           `((guix build gnu-build-system)
+             (guix build utils)
              (ice-9 textual-ports))
            #:test-target "test"
            #:configure-flags
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index cb0bdf766e..40d8b1aab4 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -20419,9 +20419,10 @@ (define-public ccwl
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags '("GUILE_AUTO_COMPILE=0") ; to prevent guild warnings
-       #:modules (((guix build guile-build-system)
-                   #:select (target-guile-effective-version))
-                  ,@%gnu-build-system-modules)
+       #:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  ((guix build guile-build-system)
+                   #:select (target-guile-effective-version)))
        #:imported-modules ((guix build guile-build-system)
                            ,@%gnu-build-system-modules)
        #:phases
diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm
index 98dccf7f16..f301283239 100644
--- a/gnu/packages/boost.scm
+++ b/gnu/packages/boost.scm
@@ -114,8 +114,9 @@ (define-public boost
      (list
       #:imported-modules `((guix build python-build-system)
                            ,@%gnu-build-system-modules)
-      #:modules `(((guix build python-build-system) #:select (python-version))
-                  ,@%gnu-build-system-modules)
+      #:modules `((guix build gnu-build-system)
+                  (guix build utils)
+                  ((guix build python-build-system) #:select (python-version)))
       #:tests? #f
       #:configure-flags
       #~(let ((icu (dirname (dirname (search-input-file
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 1124eca837..77f27d3935 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -577,7 +577,9 @@ (define-public dtc
     (build-system gnu-build-system)
     (arguments
      (list
-      #:modules `(,@%gnu-build-system-modules (srfi srfi-26))
+      #:modules `((guix build gnu-build-system)
+                  (guix build utils)
+                  (srfi srfi-26))
       #:make-flags
       #~(list (string-append "CC=" #$(cc-for-target))
               ;; /bin/fdt{get,overlay,put} need help finding libfdt.so.1.
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 80fdb5aed7..db651782fb 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -3234,9 +3234,10 @@ (define gcc-final
       #:validate-runpath? #f
 
       ;; Additional modules for the libstdc++ phase below.
-      #:modules `((srfi srfi-1)
-                  (srfi srfi-26)
-                  ,@%gnu-build-system-modules)
+      #:modules `((guix build gnu-build-system)
+                  (guix build utils)
+                  (srfi srfi-1)
+                  (srfi srfi-26))
 
       (substitute-keyword-arguments (package-arguments gcc)
         ((#:make-flags flags)
diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index c20b06b4db..dede9d55a8 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -879,8 +879,9 @@ (define-public epson-inkjet-printer-escpr
     (build-system gnu-build-system)
     (arguments
      (list #:modules
-           `((srfi srfi-26)
-             ,@%gnu-build-system-modules)
+           `((guix build gnu-build-system)
+             (guix build utils)
+             (srfi srfi-26))
            #:configure-flags
            #~(list "--disable-static"
                    (string-append "--prefix=" #$output)
@@ -940,8 +941,9 @@ (define-public splix
       (outputs (list "out" "ppd"))
       (arguments
        `(#:modules
-         ((srfi srfi-26)
-          ,@%gnu-build-system-modules)
+         ((guix build gnu-build-system)
+          (guix build utils)
+          (srfi srfi-26))
          #:make-flags
          (list (string-append "CUPSDRV="
                               (assoc-ref %outputs "out") "/share/cups/drv")
diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm
index cadf1ca361..d0ba3056a7 100644
--- a/gnu/packages/curl.scm
+++ b/gnu/packages/curl.scm
@@ -236,9 +236,10 @@ (define-public guile-curl
               "0y7wfhilfm6vzs0wyifrrc2pj9nsxfas905c7qa5cw4i6s74ypmi"))))
    (build-system gnu-build-system)
    (arguments
-    `(#:modules (((guix build guile-build-system)
-                  #:select (target-guile-effective-version))
-                 ,@%gnu-build-system-modules)
+    `(#:modules ((guix build gnu-build-system)
+                 (guix build utils)
+                 ((guix build guile-build-system)
+                  #:select (target-guile-effective-version)))
       #:imported-modules ((guix build guile-build-system)
                           ,@%gnu-build-system-modules)
       #:configure-flags (list (string-append
diff --git a/gnu/packages/debian.scm b/gnu/packages/debian.scm
index 6e40096199..a2c1737559 100644
--- a/gnu/packages/debian.scm
+++ b/gnu/packages/debian.scm
@@ -354,8 +354,9 @@ (define-public dpkg
     (build-system gnu-build-system)
     (arguments
      (list #:modules
-           `((srfi srfi-71)
-             ,@%gnu-build-system-modules)
+           `((guix build gnu-build-system)
+             (guix build utils)
+             (srfi srfi-71))
            #:phases
            #~(modify-phases %standard-phases
                (add-before 'bootstrap 'patch-version
diff --git a/gnu/packages/dezyne.scm b/gnu/packages/dezyne.scm
index db3523ac3e..43fb45e9fb 100644
--- a/gnu/packages/dezyne.scm
+++ b/gnu/packages/dezyne.scm
@@ -50,8 +50,9 @@ (define-public dezyne
     (build-system gnu-build-system)
     (arguments
      (list
-      #:modules `((ice-9 popen)
-                  ,@%gnu-build-system-modules)
+      #:modules `((guix build gnu-build-system)
+                  (guix build utils)
+                  (ice-9 popen))
       #:phases
       #~(modify-phases %standard-phases
           (add-before 'configure 'setenv
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index cf1542955c..2d74a38043 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -2350,10 +2350,11 @@ (define-public emacs-haskell-mode
      (list
       #:make-flags #~(list
                       (string-append "EMACS=" #$emacs-minimal "/bin/emacs"))
-      #:modules `((ice-9 match)
-                  (srfi srfi-26)
+      #:modules `((guix build gnu-build-system)
+                  (guix build utils)
                   ((guix build emacs-build-system) #:prefix emacs:)
-                  ,@%gnu-build-system-modules)
+                  (ice-9 match)
+                  (srfi srfi-26))
       #:imported-modules `(,@%gnu-build-system-modules
                            (guix build emacs-build-system)
                            (guix build emacs-utils))
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index a56f2ecff1..b7dee71cc1 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -588,8 +588,9 @@ (define-public fastcap
      `(#:make-flags '("CC=gcc" "RM=rm" "SHELL=sh" "all")
        #:parallel-build? #f
        #:tests? #f ;; no tests-suite
-       #:modules ((srfi srfi-1)
-                  ,@%gnu-build-system-modules)
+       #:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  (srfi srfi-1))
        #:phases
        (modify-phases %standard-phases
          (add-after 'build 'make-doc
@@ -685,8 +686,9 @@ (define-public fasthenry
      `(#:make-flags '("CC=gcc" "RM=rm" "SHELL=sh" "all")
        #:parallel-build? #f
        #:tests? #f ;; no tests-suite
-       #:modules ((srfi srfi-1)
-                  ,@%gnu-build-system-modules)
+       #:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  (srfi srfi-1))
        #:phases
        (modify-phases %standard-phases
          (delete 'configure)
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 0c380adaa8..8d09969c72 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -857,7 +857,8 @@ (define-public font-amiri
      (list
       #:imported-modules `(,@%gnu-build-system-modules
                            (guix build font-build-system))
-      #:modules `(,@%gnu-build-system-modules
+      #:modules `((guix build gnu-build-system)
+                  (guix build utils)
                   ((guix build font-build-system) #:prefix font:))
       #:phases #~(modify-phases %standard-phases
                    (add-after 'unpack 'patch-source
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index e4f8b16755..26be8f902a 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -497,8 +497,9 @@ (define-public xdg-utils
     (arguments
      (list
       #:tests? #f                       ;no check target
-      #:modules `((srfi srfi-26)
-                  ,@%gnu-build-system-modules)
+      #:modules `((guix build gnu-build-system)
+                  (guix build utils)
+                  (srfi srfi-26))
       #:phases
       #~(modify-phases %standard-phases
         (add-after 'unpack 'patch-hardcoded-paths
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index eb1d74d1e1..871f58c63e 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -645,11 +645,12 @@ (define-public tsukundere
                 "1lq2rs33s6l6y0hwwkv8pppgq2ki0q5kzj11s90yivi8g8g201af"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:modules ((ice-9 match)
-                  (srfi srfi-1)
+     `(#:modules ((guix build gnu-build-system)
+                  (guix build utils)
                   ((guix build guile-build-system)
                    #:select (target-guile-effective-version))
-                  ,@%gnu-build-system-modules)
+                  (ice-9 match)
+                  (srfi srfi-1))
        #:imported-modules ((guix build guile-build-system)
                            ,@%gnu-build-system-modules)
        #:phases
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 5c6ef8ccbf..1b872124bd 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -899,9 +899,10 @@ (define-public (make-libstdc++ gcc)
     (arguments
      (list
       #:out-of-source? #t
-      #:modules `((srfi srfi-1)
-                  (srfi srfi-26)
-                  ,@%gnu-build-system-modules)
+      #:modules `((guix build gnu-build-system)
+                  (guix build utils)
+                  (srfi srfi-1)
+                  (srfi srfi-26))
       #:phases
       #~(modify-phases %standard-phases
           #$@(if (version>=? (package-version gcc) "11")
diff --git a/gnu/packages/gdb.scm b/gnu/packages/gdb.scm
index d3881ed9d7..b84c3a695c 100644
--- a/gnu/packages/gdb.scm
+++ b/gnu/packages/gdb.scm
@@ -63,8 +63,9 @@ (define-public gdb/pinned
     (arguments
      `(#:tests? #f                      ;FIXME: 217 unexpected failures
        #:out-of-source? #t
-       #:modules ((srfi srfi-1)
-                  ,@%gnu-build-system-modules)
+       #:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  (srfi srfi-1))
        #:phases (modify-phases %standard-phases
                   (add-after 'unpack 'patch-paths
                     (lambda* (#:key inputs #:allow-other-keys)
diff --git a/gnu/packages/genimage.scm b/gnu/packages/genimage.scm
index 4a9d24fe78..d32659ff8b 100644
--- a/gnu/packages/genimage.scm
+++ b/gnu/packages/genimage.scm
@@ -60,8 +60,9 @@ (define-public genimage
       (build-system gnu-build-system)
       (arguments
        `(#:modules
-         ((ice-9 match)
-          ,@%gnu-build-system-modules)
+         ((guix build gnu-build-system)
+          (guix build utils)
+          (ice-9 match))
          #:phases
          (modify-phases %standard-phases
            (add-after 'unpack 'guixify
diff --git a/gnu/packages/gimp.scm b/gnu/packages/gimp.scm
index b1ff08d652..76b5ec49ce 100644
--- a/gnu/packages/gimp.scm
+++ b/gnu/packages/gimp.scm
@@ -302,9 +302,10 @@ (define-public gimp
                "doc"))                  ; 9 MiB of gtk-doc HTML
     (arguments
      (list
-      #:modules `((ice-9 popen)
-                  (ice-9 rdelim)
-                  ,@%gnu-build-system-modules)
+      #:modules `((guix build gnu-build-system)
+                  (guix build utils)
+                  (ice-9 popen)
+                  (ice-9 rdelim))
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'unpack 'remove-gcc-reference
diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index a5b8587a14..8b02196b22 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -928,9 +928,10 @@ (define-public pinentry-rofi
     (build-system gnu-build-system)
     (arguments
      `(#:modules
-       ((ice-9 match)
-        (ice-9 ftw)
-        ,@%gnu-build-system-modules)
+       ((guix build gnu-build-system)
+        (guix build utils)
+        (ice-9 match)
+        (ice-9 ftw))
        #:phases
        (modify-phases
            %standard-phases
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index ac96d7fb1f..effc614494 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -116,8 +116,9 @@ (define-public mozjs
     (arguments
      (list
       #:imported-modules %cargo-utils-modules ;for `generate-all-checksums'
-      #:modules `((guix build cargo-utils)
-                  ,@%gnu-build-system-modules)
+      #:modules `((guix build gnu-build-system)
+                  (guix build utils)
+                  (guix build cargo-utils))
       #:test-target "check-jstests"
       #:configure-flags
       #~(list
@@ -1622,10 +1623,10 @@ (define-public icedove-minimal
      (list
       #:tests? #f                             ;no check target
       #:imported-modules %cargo-utils-modules ;for `generate-all-checksums'
-      #:modules `((guix build utils)          ;find-files
+      #:modules `((guix build gnu-build-system)
+                  (guix build utils)
                   (sxml simple)
-                  (ice-9 regex)
-                  ,@%gnu-build-system-modules)
+                  (ice-9 regex))
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'patch-source-shebangs 'patch-cargo-checksums
diff --git a/gnu/packages/graph.scm b/gnu/packages/graph.scm
index 45a591b9f3..d9290b36a0 100644
--- a/gnu/packages/graph.scm
+++ b/gnu/packages/graph.scm
@@ -638,7 +638,8 @@ (define-public python-graph-tool
     (arguments
      `(#:imported-modules (,@%gnu-build-system-modules
                            (guix build python-build-system))
-       #:modules (,@%gnu-build-system-modules
+       #:modules ((guix build gnu-build-system)
+                  (guix build utils)
                   ((guix build python-build-system) #:select (site-packages)))
        #:configure-flags
        (list (string-append "--with-boost="
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 0adcb5b4f4..081edd9222 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -193,9 +193,10 @@ (define-public artanis
            pkg-config
            util-linux))                           ;for the `script' command
     (arguments
-     `(#:modules (((guix build guile-build-system)
-                   #:select (target-guile-effective-version))
-                  ,@%gnu-build-system-modules)
+     `(#:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  ((guix build guile-build-system)
+                   #:select (target-guile-effective-version)))
        #:imported-modules ((guix build guile-build-system)
                            ,@%gnu-build-system-modules)
        #:make-flags
@@ -282,9 +283,10 @@ (define-public guilescript
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags '("GUILE_AUTO_COMPILE=0")
-       #:modules (((guix build guile-build-system)
-                   #:select (target-guile-effective-version))
-                  ,@%gnu-build-system-modules)
+       #:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  ((guix build guile-build-system)
+                   #:select (target-guile-effective-version)))
        #:imported-modules ((guix build guile-build-system)
                            ,@%gnu-build-system-modules)
        #:phases (modify-phases %standard-phases
@@ -751,9 +753,10 @@ (define-public guile-dsv
     (inputs (list bash-minimal guile-3.0))
     (propagated-inputs (list guile-lib guile-smc))
     (arguments
-     `(#:modules (((guix build guile-build-system)
-                   #:select (target-guile-effective-version))
-                  ,@%gnu-build-system-modules)
+     `(#:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  ((guix build guile-build-system)
+                   #:select (target-guile-effective-version)))
        #:imported-modules ((guix build guile-build-system)
                            ,@%gnu-build-system-modules)
        #:phases (modify-phases %standard-phases
@@ -1797,9 +1800,10 @@ (define-public guile-dbi
                 "123m4j82bi60s1v95pjh4djb7bh6zdwmljbpyg7zq8ni2gyal7lw"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:modules (((guix build guile-build-system)
-                   #:select (target-guile-effective-version))
-                  ,@%gnu-build-system-modules)
+     `(#:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  ((guix build guile-build-system)
+                   #:select (target-guile-effective-version)))
        #:imported-modules ((guix build guile-build-system)
                            ,@%gnu-build-system-modules)
        #:configure-flags
@@ -1981,9 +1985,10 @@ (define-public guile-hall
     (build-system gnu-build-system)
     (arguments
       `(#:modules
-        ((ice-9 match)
-         (ice-9 ftw)
-         ,@%gnu-build-system-modules)
+        ((guix build gnu-build-system)
+         (guix build utils)
+         (ice-9 match)
+         (ice-9 ftw))
         #:phases
         (modify-phases
           %standard-phases
@@ -2812,8 +2817,10 @@ (define-public haunt
                 "1nwhwngx0gl2892vrvrzrxy5w6a5l08j1w0522kdh9a3v11qpwmw"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:modules ((ice-9 match) (ice-9 ftw)
-                  ,@%gnu-build-system-modules)
+     `(#:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  (ice-9 match)
+                  (ice-9 ftw))
        #:tests? #f ; test suite is non-deterministic :(
        #:phases (modify-phases %standard-phases
                   (add-after 'install 'wrap-haunt
@@ -3096,9 +3103,10 @@ (define-public guile-studio
       (build-system gnu-build-system)
       (arguments
        `(#:modules
-         ((ice-9 match)
-          (srfi srfi-1)
-          ,@%gnu-build-system-modules)
+         ((guix build gnu-build-system)
+          (guix build utils)
+          (ice-9 match)
+          (srfi srfi-1))
          #:tests? #f                    ; there are none
          #:make-flags
          (list (string-append "PICT_DIR="
@@ -5125,9 +5133,10 @@ (define-public guile-libyaml
            "1bssby1ri1vjll2rvi8b33xr2ghwjyxsd4yc15najj3h8n2ss87i"))))
       (build-system gnu-build-system)
       (arguments
-       `(#:modules (((guix build guile-build-system)
-                     #:prefix guile:)
-                    ,@%gnu-build-system-modules)
+       `(#:modules ((guix build gnu-build-system)
+                    (guix build utils)
+                    ((guix build guile-build-system)
+                     #:prefix guile:))
          #:imported-modules ((guix build guile-build-system)
                              ,@%gnu-build-system-modules)
          #:tests? #false ; there are none
@@ -5313,9 +5322,10 @@ (define-public guile-gitlab
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags '("GUILE_AUTO_COMPILE=0")     ;to prevent guild warnings
-       #:modules (((guix build guile-build-system)
-                   #:select (target-guile-effective-version))
-                  ,@%gnu-build-system-modules)
+       #:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  ((guix build guile-build-system)
+                   #:select (target-guile-effective-version)))
        #:imported-modules ((guix build guile-build-system)
                            ,@%gnu-build-system-modules)
        #:phases
@@ -5376,9 +5386,10 @@ (define-public guile-smc
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags '("GUILE_AUTO_COMPILE=0")     ;to prevent guild warnings
-       #:modules (((guix build guile-build-system)
-                   #:select (target-guile-effective-version))
-                  ,@%gnu-build-system-modules)
+       #:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  ((guix build guile-build-system)
+                   #:select (target-guile-effective-version)))
        #:imported-modules ((guix build guile-build-system)
                            ,@%gnu-build-system-modules)
        #:phases
diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm
index 1e01bb0ea3..230b7132c8 100644
--- a/gnu/packages/ibus.scm
+++ b/gnu/packages/ibus.scm
@@ -518,8 +518,9 @@ (define-public rime-data
         (base32 "0mja4wyazxdc6fr7pzij5ah4rzwxv4s12s64vfn5ikx1ias1f8ib"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:modules ((ice-9 match)
-                  ,@%gnu-build-system-modules)
+     `(#:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  (ice-9 match))
        #:tests? #f                  ; no tests
        #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
        #:phases
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index bd3bcf964d..92a028399f 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -881,8 +881,9 @@ (define-public jbigkit
     (build-system gnu-build-system)
     (outputs (list "out" "pbmtools"))
     (arguments
-     `(#:modules ((srfi srfi-26)
-                  ,@%gnu-build-system-modules)
+     `(#:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  (srfi srfi-26))
        #:phases
        (modify-phases %standard-phases
          (delete 'configure)            ; no configure script
diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm
index 7fa7b2f7ba..04cb170810 100644
--- a/gnu/packages/instrumentation.scm
+++ b/gnu/packages/instrumentation.scm
@@ -571,8 +571,9 @@ (define-public uftrace
     (arguments
      (list
       #:modules
-      `((ice-9 match)
-        ,@%gnu-build-system-modules)
+      `((guix build gnu-build-system)
+        (guix build utils)
+        (ice-9 match))
       #:make-flags
       #~(list
          (string-append "CC=" #$(cc-for-target)))
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 5830368a64..a22d281a4c 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -5636,7 +5636,8 @@ (define-public mdadm-static
                     (for-each delete-file-recursively directories)
                     (remove-store-references "sbin/mdadm")
                     (delete-file "sbin/mdmon")))))))
-       ((#:modules modules %gnu-build-system-modules)
+       ((#:modules modules '((guix build gnu-build-system)
+                             (guix build utils)))
         `((ice-9 ftw) ,@modules))
        ((#:strip-flags _ '())
         ''("--strip-all"))                        ;strip a few extra KiB
@@ -6994,7 +6995,8 @@ (define-public ecryptfs-utils
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags (list "--disable-pywrap")
-       #:modules (,@%gnu-build-system-modules
+       #:modules ((guix build gnu-build-system)
+                  (guix build utils)
                   (ice-9 binary-ports)
                   (rnrs bytevectors)
                   (srfi srfi-26))
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 16781b7aa1..7c3af6fb2b 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -282,7 +282,8 @@ (define-public ghmm
        `(#:imported-modules (,@%gnu-build-system-modules
                              (guix build python-build-system))
          #:modules          ((guix build python-build-system)
-                             ,@%gnu-build-system-modules)
+                             (guix build gnu-build-system)
+                             (guix build utils))
          #:phases
          (modify-phases %standard-phases
            (add-after 'unpack 'enter-dir
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 27ca2d5f18..f433a3bab2 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -3891,10 +3891,11 @@ (define-public mumps
            metis
            scotch))
     (arguments
-     `(#:modules ((ice-9 match)
+     `(#:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  (ice-9 match)
                   (ice-9 popen)
-                  (srfi srfi-1)
-                  ,@%gnu-build-system-modules)
+                  (srfi srfi-1))
        #:phases
        (modify-phases %standard-phases
          (replace 'configure
@@ -5882,8 +5883,9 @@ (define-public hypre
     (inputs
      (list openblas lapack))
     (arguments
-     `(#:modules ((srfi srfi-1)
-                  ,@%gnu-build-system-modules)
+     `(#:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  (srfi srfi-1))
        #:configure-flags '("--enable-shared"
                            "--disable-fortran"
                            "--without-MPI"
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 266b6dc352..bf3794a446 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -1527,9 +1527,10 @@ (define-public guix-build-coordinator
       (build-system gnu-build-system)
       (arguments
        (list
-        #:modules `(((guix build guile-build-system)
-                     #:select (target-guile-effective-version))
-                    ,@%gnu-build-system-modules)
+        #:modules `((guix build gnu-build-system)
+                    (guix build utils)
+                    ((guix build guile-build-system)
+                     #:select (target-guile-effective-version)))
         #:imported-modules `((guix build guile-build-system)
                              ,@%gnu-build-system-modules)
         #:phases
@@ -1771,9 +1772,10 @@ (define-public nar-herder
       (build-system gnu-build-system)
       (arguments
        (list
-        #:modules `(((guix build guile-build-system)
-                     #:select (target-guile-effective-version))
-                    ,@%gnu-build-system-modules)
+        #:modules `((guix build gnu-build-system)
+                    (guix build utils)
+                    ((guix build guile-build-system)
+                     #:select (target-guile-effective-version)))
         #:imported-modules `((guix build guile-build-system)
                              ,@%gnu-build-system-modules)
         #:phases
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index b7e394d663..d57feaac42 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -3525,9 +3525,10 @@ (define-public python-sip-4
      `(#:tests? #f ; no check target
        #:imported-modules ((guix build python-build-system)
                            ,@%gnu-build-system-modules)
-       #:modules ((srfi srfi-1)
+       #:modules ((guix build gnu-build-system)
+                  (guix build utils)
                   ((guix build python-build-system) #:select (python-version))
-                  ,@%gnu-build-system-modules)
+                  (srfi srfi-1))
        #:phases
        (modify-phases %standard-phases
          (replace 'configure
diff --git a/gnu/packages/ratpoison.scm b/gnu/packages/ratpoison.scm
index 14933da5a8..add082266f 100644
--- a/gnu/packages/ratpoison.scm
+++ b/gnu/packages/ratpoison.scm
@@ -47,8 +47,9 @@ (define-public ratpoison
     (build-system gnu-build-system)
     (arguments
      (list
-      #:modules `((ice-9 format)
-                  ,@%gnu-build-system-modules)
+      #:modules `((guix build gnu-build-system)
+                  (guix build utils)
+                  (ice-9 format))
       ;; Specify the absolute location of xterm, as the user experience sucks
       ;; when no terminal is available (can't consult help with 'C-t ?', for
       ;; example).
diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index ad06d7db06..657e5c83fa 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -1251,8 +1251,9 @@ (define-public stklos
     (build-system gnu-build-system)
     (arguments
      (list
-      #:modules `((ice-9 ftw)
-                  ,@%gnu-build-system-modules)
+      #:modules `((guix build gnu-build-system)
+                  (guix build utils)
+                  (ice-9 ftw))
       #:phases
       #~(modify-phases %standard-phases
           (add-before 'configure 'patch-sh-references
diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm
index 671848fd27..6f7c3815f6 100644
--- a/gnu/packages/shellutils.scm
+++ b/gnu/packages/shellutils.scm
@@ -121,8 +121,9 @@ (define-public boxes
                                          (assoc-ref %outputs "out")
                                          "/etc/boxes-config"))
        #:modules
-       ((ice-9 match)
-        ,@%gnu-build-system-modules)
+       ((guix build gnu-build-system)
+        (guix build utils)
+        (ice-9 match))
        #:phases
        (modify-phases %standard-phases
          (delete 'configure)
diff --git a/gnu/packages/simh.scm b/gnu/packages/simh.scm
index 9f5c04d8fb..8807d249f2 100644
--- a/gnu/packages/simh.scm
+++ b/gnu/packages/simh.scm
@@ -52,8 +52,9 @@ (define-public simh
      (list #:tests? #f
            #:make-flags
            #~(list (string-append "GCC=" #$(cc-for-target) " -fcommon"))
-           #:modules `((ice-9 string-fun)
-                       ,@%gnu-build-system-modules)
+           #:modules `((guix build gnu-build-system)
+                       (guix build utils)
+                       (ice-9 string-fun))
            #:phases
            #~(modify-phases %standard-phases
                (delete 'configure)
diff --git a/gnu/packages/stb.scm b/gnu/packages/stb.scm
index 4ee1b4ebd2..82511ea2bf 100644
--- a/gnu/packages/stb.scm
+++ b/gnu/packages/stb.scm
@@ -44,10 +44,11 @@ (define stb
                 (file-name (git-file-name name version))))
       (build-system gnu-build-system)
       (arguments
-       `(#:modules ((ice-9 ftw)
+       `(#:modules ((guix build gnu-build-system)
+                    (guix build utils)
+                    (ice-9 ftw)
                     (ice-9 regex)
-                    (srfi srfi-26)
-                    ,@%gnu-build-system-modules)
+                    (srfi srfi-26))
          #:phases (modify-phases %standard-phases
                     (delete 'configure)
                     (delete 'build)
diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm
index f45ae06810..6373fa46cc 100644
--- a/gnu/packages/texinfo.scm
+++ b/gnu/packages/texinfo.scm
@@ -229,8 +229,10 @@ (define-public info-reader
                      #t))))))
        #:disallowed-references ,(assoc-ref (package-inputs texinfo)
                                            "perl")
-       #:modules ((ice-9 ftw) (srfi srfi-1)
-                  ,@%gnu-build-system-modules)))
+       #:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  (ice-9 ftw)
+                  (srfi srfi-1))))
     (synopsis "Standalone Info documentation reader")
     (inputs (modify-inputs (package-inputs texinfo)
               (prepend gzip)))))
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 779164c53f..f4d4adc787 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -233,11 +233,12 @@ (define-public qemu
                 (string-append "--extra-ldflags=-lrt")))
       ;; Make build and test output verbose to facilitate investigation upon failure.
       #:make-flags #~'("V=1")
-      #:modules `((srfi srfi-1)
+      #:modules `((guix build gnu-build-system)
+                  (guix build utils)
+                  (srfi srfi-1)
                   (srfi srfi-26)
                   (ice-9 ftw)
-                  (ice-9 match)
-                  ,@%gnu-build-system-modules)
+                  (ice-9 match))
       #:phases
       #~(modify-phases %standard-phases
           ;; Since we removed the bundled firmwares above, many tests
@@ -681,7 +682,8 @@ (define-public ganeti
      `(#:imported-modules (,@%gnu-build-system-modules
                            (guix build haskell-build-system)
                            (guix build python-build-system))
-       #:modules (,@%gnu-build-system-modules
+       #:modules ((guix build gnu-build-system)
+                  (guix build utils)
                   ((guix build haskell-build-system) #:prefix haskell:)
                   ((guix build python-build-system) #:select (site-packages))
                   (srfi srfi-1)
@@ -1752,8 +1754,9 @@ (define-public criu
              (string-append "XMLTO="
                             (search-input-file %build-inputs
                                                "/bin/xmlto")))
-       #:modules ((ice-9 ftw)
-                  ,@%gnu-build-system-modules)
+       #:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  (ice-9 ftw))
        #:phases
        (modify-phases %standard-phases
          (delete 'configure)            ; no configure script

base-commit: dc455b6dfb28cf4ca7b1ab5deabeb0adf0ea2d20
-- 
2.41.0