[PATCH 0/6] Start breaking up import cycles

OpenSubmitted by Maxime Devos.
Details
5 participants
  • Leo Famulari
  • Liliana Marie Prikler
  • Ludovic Courtès
  • Maxime Devos
  • zimoun
Owner
unassigned
Severity
normal
M
M
Maxime Devos wrote on 23 Mar 19:46 +0100
(address . guix-patches@gnu.org)
5a87d6f772ff7424cb6fccea7c45276bef7797aa.camel@telenet.be
Import cycles make some packaging things harder and prevent some
proposed optimisations to "guix pull", let's start eliminating them.
TBC ...
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYjtrIRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7li0AP98/ho0PuUq8YYRyiOtjRyDpCUD
BAWS1GEvkOUMkl6MiQEAobYmoMUCMyqmlkXPQ/iZ6XaONdrD0CUi0s4f41mGeQg=
=SK03
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 23 Mar 19:48 +0100
[PATCH 2/6] gnu: xsensors: Move to (gnu packages xorg) to break cycles.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220323184855.25241-2-maximedevos@telenet.be
This partially breaks a cycle between (gnu packages linux) and
(gnu packages gtk). It is not sufficient though, see next patch.

* gnu/packages/linux.scm (xensors): Move to ...
* gnu/packages/xorg.scm: ... this module.
---
gnu/packages/linux.scm | 38 --------------------------------------
gnu/packages/xorg.scm | 41 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 41 insertions(+), 38 deletions(-)

Toggle diff (110 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 8d9dc01839..dc4f91d48f 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -4502,44 +4502,6 @@ SMBus access.")
         #~(list (string-append "prefix=" #$output)
                 (string-append "CC=" #$(cc-for-target))))))))
 
-(define-public xsensors
-  (package
-    (name "xsensors")
-    (version "0.70")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append
-                    "http://www.linuxhardware.org/xsensors/xsensors-"
-                    version ".tar.gz"))
-              (sha256
-               (base32
-                "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
-    (build-system gnu-build-system)
-    (inputs `(("lm-sensors" ,lm-sensors "lib")
-              ("gtk" ,gtk+-2)))
-    (native-inputs (list pkg-config))
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'configure 'enable-deprecated
-           (lambda _
-             (substitute* "src/Makefile.in"
-               (("-DGDK_DISABLE_DEPRECATED") "")
-               (("-DGTK_DISABLE_DEPRECATED") ""))
-             #t))
-         (add-before 'configure 'remove-Werror
-           (lambda _
-             (substitute* '("configure" "src/Makefile.in")
-               (("-Werror") ""))
-             #t)))))
-    (home-page "http://www.linuxhardware.org/xsensors/")
-    (synopsis "Hardware health information viewer")
-    (description
-     "Xsensors reads data from the libsensors library regarding hardware
-health such as temperature, voltage and fan speed and displays the information
-in a digital read-out.")
-    (license license:gpl2+)))
-
 (define-public perf
   (package
     (name "perf")
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 14cd3bc789..7e905842be 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2016 Nikita <nikita@n0.is>
 ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
+;;; Copyright © 2017 Dave Love <fx@gnu.org>
 ;;; Copyright © 2016, 2017 John Darrington <jmd@gnu.org>
 ;;; Copyright © 2017, 2018, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
@@ -6131,6 +6132,46 @@ on a button to dismiss it or can select one of several buttons
 to answer a question.  Xmessage can also exit after a specified time.")
     (license license:x11)))
 
+;; Don't put this in (gnu packages linux) because that would create a
+;; cycle between (gnu packages linux) and (gnu packages gtk).
+(define-public xsensors
+  (package
+    (name "xsensors")
+    (version "0.70")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://www.linuxhardware.org/xsensors/xsensors-"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
+    (build-system gnu-build-system)
+    (inputs `(("lm-sensors" ,lm-sensors "lib")
+              ("gtk" ,gtk+-2)))
+    (native-inputs (list pkg-config))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'enable-deprecated
+           (lambda _
+             (substitute* "src/Makefile.in"
+               (("-DGDK_DISABLE_DEPRECATED") "")
+               (("-DGTK_DISABLE_DEPRECATED") ""))
+             #t))
+         (add-before 'configure 'remove-Werror
+           (lambda _
+             (substitute* '("configure" "src/Makefile.in")
+               (("-Werror") ""))
+             #t)))))
+    (home-page "http://www.linuxhardware.org/xsensors/")
+    (synopsis "Hardware health information viewer")
+    (description
+     "Xsensors reads data from the libsensors library regarding hardware
+health such as temperature, voltage and fan speed and displays the information
+in a digital read-out.")
+    (license license:gpl2+)))
+
 (define-public xterm
   (package
     (name "xterm")
-- 
2.30.2
M
M
Maxime Devos wrote on 23 Mar 19:48 +0100
[PATCH 1/6] gnu: audacity: Move into new module to break cycles.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220323184855.25241-1-maximedevos@telenet.be
Currently, there's a cycle between ncurses, linux, audio and music.
By moving audacity to its own module, 'audio' does not have to import
'music' and 'linux' anymore. Looking at the output of
"guix graph --type=module", there still appears to be cycles, so
this commit will not sufficient by itself.

* gnu/packages/audio.scm (audacity): Move to ...
* gnu/packages/audacity.scm: This new module. Remove unneeded imports
from the old module. Add a few comments to the old module to discourage
re-importing the 'linux' and 'music' module in the future.
* gnu/local.mk (GNU_SYSTEM_MODULES): Register new module.
---
gnu/local.mk | 1 +
gnu/packages/audio.scm | 140 ++---------------------------------------
2 files changed, 5 insertions(+), 136 deletions(-)

Toggle diff (188 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index ad39e648f7..aab22d32d4 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -112,6 +112,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/assembly.scm			\
   %D%/packages/astronomy.scm			\
   %D%/packages/attr.scm				\
+  %D%/packages/audacity.scm			\
   %D%/packages/audio.scm			\
   %D%/packages/augeas.scm			\
   %D%/packages/authentication.scm		\
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 13e0f02837..d74f8de1ab 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -90,14 +90,16 @@
   #:use-module (gnu packages libbsd)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libusb)
-  #:use-module (gnu packages linux)
   #:use-module (gnu packages llvm)
+  ;; Don't import that module here, otherwise a cycle would result.
+  ;; #:use-module (gnu packages linux)
   #:use-module (gnu packages machine-learning)
   #:use-module (gnu packages man)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages mp3) ;taglib
   #:use-module (gnu packages multiprecision)
-  #:use-module (gnu packages music)
+  ;; Don't import that module here, otherwise a cycle would result.
+  ;; #:use-module (gnu packages music)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages networking)
   #:use-module (gnu packages onc-rpc)
@@ -122,7 +124,6 @@
   #:use-module (gnu packages vim) ;xxd
   #:use-module (gnu packages web)
   #:use-module (gnu packages webkit)
-  #:use-module (gnu packages wxwidgets)
   #:use-module (gnu packages xiph)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
@@ -761,139 +762,6 @@ record, edit, mix and master audio and MIDI projects.  It is targeted at audio
 engineers, musicians, soundtrack editors and composers.")
     (license license:gpl2+)))
 
-(define-public audacity
-  (package
-    (name "audacity")
-    (version "3.1.3")
-    (source
-     (origin
-       ;; If built from the release tag, Audacity will describe itself
-       ;; as an "Alpha test version" and suggest to users that they use
-       ;; the "latest stable released version".
-       (method url-fetch)
-       (uri (string-append "https://github.com/audacity/audacity/releases/download/"
-                           "Audacity-" version "/audacity-" version
-                           "-source.tar.gz"))
-       (sha256
-        (base32
-         "189agx11361k9j958s6q5bngnnfx0rwaf0dwbjxy6fwvsb1wv3px"))
-       (patches (search-patches "audacity-ffmpeg-fallback.patch"))
-       (modules '((guix build utils)))
-       (snippet
-        ;; Remove bundled libraries.
-        '(begin
-           (for-each
-            (lambda (dir)
-              (delete-file-recursively (string-append "lib-src/" dir)))
-            '("libsoxr" "libvamp" "lv2" "soundtouch" "sqlite" "twolame"
-              ;; FIXME: these libraries have not been packaged yet:
-              ;; "libnyquist"
-              ;; "libscorealign"
-              ;; "portburn"
-              ;; "portsmf"
-              ;; "portmixer"
-
-              ;; FIXME: we have this library, but it differs in that the Slide
-              ;; class does not have a member "getInverseStretchedTime".
-              ;; "sbsms"
-              ))
-           #t))))
-    (build-system cmake-build-system)
-    (inputs
-     (list wxwidgets-3.1
-           gtk+
-           alsa-lib
-           jack-1
-           expat
-           lame
-           linux-libre-headers
-           flac
-           ffmpeg
-           libid3tag
-           libjpeg-turbo
-           libmad
-           ;;("libsbsms" ,libsbsms)         ;bundled version is modified
-           libsndfile
-           soundtouch
-           soxr ;replaces libsamplerate
-           sqlite
-           twolame
-           vamp
-           libvorbis
-           lv2
-           lilv ;for lv2
-           suil ;for lv2
-           portaudio
-           portmidi))
-    (native-inputs
-     `(("autoconf" ,autoconf)
-       ("automake" ,automake)
-       ("gettext" ,gettext-minimal)     ;for msgfmt
-       ("libtool" ,libtool)
-       ("pkg-config" ,pkg-config)
-       ("python" ,python)
-       ("which" ,which)))
-    (arguments
-     `(#:configure-flags
-       (list
-        "-Daudacity_conan_enabled=off"
-        "-Daudacity_lib_preference=system"
-        ;; TODO: enable this flag once we've packaged all dependencies
-        ;; "-Daudacity_obey_system_dependencies=on"
-        ;; disable crash reports, updates, ..., anything that phones home
-        "-Daudacity_has_networking=off")
-       #:imported-modules ((guix build glib-or-gtk-build-system)
-                           ,@%cmake-build-system-modules)
-       #:modules
-       ((guix build utils)
-        (guix build cmake-build-system)
-        ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'fix-cmake-rpath
-           (lambda* (#:key outputs #:allow-other-keys)
-             (substitute* "CMakeLists.txt"
-               (("\\$ORIGIN/\\.\\./\\$\\{_PKGLIB\\}")
-                (string-append (assoc-ref outputs "out") "/lib/audacity"))
-               (("CMAKE_BUILD_WITH_INSTALL_RPATH [A-Z]*")
-                "CMAKE_BUILD_WITH_INSTALL_RPATH TRUE")
-               (("CMAKE_INSTALL_RPATH_USE_LINK_PATH [A-Z]*")
-                "CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE"))
-             (substitute* "src/CMakeLists.txt"
-               (("-Wl,--disable-new-dtags") "-Wl,--enable-new-dtags"))))
-         (add-after 'unpack 'comment-out-revision-ident
-           (lambda _
-             (substitute* "src/CMakeLists.txt"
-               (("file\\( TOUCH \".*RevisionIdent\\.h\" \\)" directive)
-                (string-append "# " directive)))
-             (substitute* "src/AboutDialog.cpp"
-               (("(.*RevisionIdent\\.h.*)" include-line)
-                (string-append "// " include-line)))))
-         (add-after 'unpack 'use-upstream-headers
-           (lambda* (#:key inputs #:allow-other-keys)
-             (substitute* '("libraries/lib-files/FileNames.cpp")
-               (("\"/usr/include/linux/magic.h\"") "<linux/magic.h>"))))
-         (add-after 'wrap-program 'glib-or-gtk-wrap
-           (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))
-       ;; The test suite is not "well exercised" according to the developers,
-       ;; and fails with various errors.  See
-       ;; <http://sourceforge.net/p/audacity/mailman/message/33524292/>.
-       #:tests? #f))
-    (native-search-paths
-     (list (search-path-specification
-            (variable "AUDACITY_MODULES_PATH")
-            (files '("lib/audacity/modules")))
-           (search-path-specification
-            (variable "AUDACITY_PATH")
-            (files '("share/audacity")))))
-    (home-page "https://www.audacityteam.org/")
-    (synopsis "Software for recording and editing sounds")
-    (description
-     "Audacity is a multi-track audio editor designed for recording, playing
-and editing digital audio.  It features digital effects and spectrum analysis
-tools.")
-    (license license:gpl2+)))
-
 (define-public audiofile
   (package
     (name "audiofile")

base-commit: 9a31942cabb5c73174aee96ecd873fcf89955a9d
prerequisite-patch-id: f64e340873270246660f566eabe4af5e20ede85f
-- 
2.30.2
M
M
Maxime Devos wrote on 23 Mar 19:48 +0100
[PATCH 4/6] gnu: go-netlink: Move to (gnu packages networking) to break cycles.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220323184855.25241-4-maximedevos@telenet.be
This (partially?) breaks a cycle between (gnu packages linux) and
(gnu packages networking).

* gnu/packages/linux.scm (go-netlink): Move to ...
* gnu/packages/networking.scm: ... this module.
---
gnu/packages/linux.scm | 30 ++----------------------------
gnu/packages/networking.scm | 28 ++++++++++++++++++++++++++++
2 files changed, 30 insertions(+), 28 deletions(-)

Toggle diff (96 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 6ce640ddf2..5a0c5650e4 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -125,7 +125,8 @@
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages netpbm)
-  #:use-module (gnu packages networking)
+  ;; Don't import that module here, otherwise a cycle would result.
+  ;; #:use-module (gnu packages networking)
   #:use-module (gnu packages ninja)
   #:use-module (gnu packages nss)
   #:use-module (gnu packages perl)
@@ -159,7 +160,6 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system copy)
   #:use-module (guix build-system gnu)
-  #:use-module (guix build-system go)
   #:use-module (guix build-system meson)
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
@@ -7620,32 +7620,6 @@ nfnetlink_queue, nfnetlink_conntrack) and their respective users and/or
 management tools in userspace.")
     (license license:gpl2)))
 
-(define-public go-netlink
-  (package
-    (name "go-netlink")
-    (version "1.0.0")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/vishvananda/netlink")
-                    (commit (string-append "v" version))))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "0hpzghf1a4cwawzhkiwdzin80h6hd09fskl77d5ppgc084yvj8x0"))))
-    (build-system go-build-system)
-    (arguments
-     `(#:import-path "github.com/vishvananda/netlink"))
-    (native-inputs
-     (list go-golang-org-x-sys go-netns))
-    (home-page "https://github.com/vishvananda/netlink")
-    (synopsis "Simple netlink library for Go")
-    (description "The netlink package provides a simple netlink library for
-Go.  Netlink is the interface a user-space program in Linux uses to
-communicate with the kernel.  It can be used to add and remove interfaces, set
-IP addresses and routes, and configure IPsec.")
-    (license license:asl2.0)))
-
 (define-public libinih
   (package
     (name "libinih")
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index b45f2f79f2..e8720e0faf 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -1663,6 +1663,34 @@ manage, and delete Internet resources from Gandi.net such as domain names,
 virtual machines, and certificates.")
     (license license:gpl3+)))
 
+;; Don't put this in (gnu packages linux) even though it is Linux-specific,
+;; because that would create cycles.
+(define-public go-netlink
+  (package
+    (name "go-netlink")
+    (version "1.0.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/vishvananda/netlink")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0hpzghf1a4cwawzhkiwdzin80h6hd09fskl77d5ppgc084yvj8x0"))))
+    (build-system go-build-system)
+    (arguments
+     `(#:import-path "github.com/vishvananda/netlink"))
+    (native-inputs
+     (list go-golang-org-x-sys go-netns))
+    (home-page "https://github.com/vishvananda/netlink")
+    (synopsis "Simple netlink library for Go")
+    (description "The netlink package provides a simple netlink library for
+Go.  Netlink is the interface a user-space program in Linux uses to
+communicate with the kernel.  It can be used to add and remove interfaces, set
+IP addresses and routes, and configure IPsec.")
+    (license license:asl2.0)))
+
 (define-public go-netns
   (let ((commit "13995c7128ccc8e51e9a6bd2b551020a27180abd")
         (revision "1"))
-- 
2.30.2
M
M
Maxime Devos wrote on 23 Mar 19:48 +0100
[PATCH 5/6] gnu: earlyoom: Avoid importing Goland and Haskelland to break cycles.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220323184855.25241-5-maximedevos@telenet.be
This (partially?) breaks a cycle between (gnu packages linux),
(gnu packages haskell-xyz) and (gnu packages golang).

It seems a bit cheaty to me but it works.

* gnu/packages/linux.scm (earlyoom): Use 'module-ref' and friends to access
'go' and 'pandoc'. Remove now unneeded imports.
---
gnu/packages/linux.scm | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)

Toggle diff (52 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 5a0c5650e4..c47204dc76 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -52,7 +52,7 @@
 ;;; Copyright © 2020 pukkamustard <pukkamustard@posteo.net>
 ;;; Copyright © 2021 B. Wilson <elaexuotee@wilsonb.com>
 ;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
-;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2021,2022 Maxime Devos <maximedevos@telenet.be>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
 ;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
@@ -110,12 +110,13 @@
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnupg)
-  #:use-module (gnu packages golang)
+  ;; Don't import these modules here, otherwise a cycle would result.
+  ;; #:use-module (gnu packages golang)
   #:use-module (gnu packages gperf)
   #:use-module (gnu packages gstreamer)
-  ;; Don't import that module here, otherwise a cycle would result.
+  ;; Don't import these modules here, otherwise a cycle would result.
   ;; #:use-module (gnu packages gtk)
-  #:use-module (gnu packages haskell-xyz)
+  ;; #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages llvm)
@@ -3771,12 +3772,17 @@ from the module-init-tools project.")
       (append
         ;; To generate the manpage.
         (if (or (target-x86-64?) (target-x86-32?))
-          (list pandoc)
+          ;; Avoid adding Haskelland to the module closure
+          ;; when all we need is util-linux.
+          (list (module-ref (resolve-interface '(gnu packages haskell-xyz))
+                            'pandoc))
           '())
         (list
           ;; For the test suite.
           cppcheck
-          go)))
+          ;; Avoid adding 'golang' and its dependencies Rubyland and
+          ;; Nodeland to the module closure when all we need is util-linux.
+          (module-ref (resolve-interface '(gnu packages golang)) 'go))))
     (home-page "https://github.com/rfjakob/earlyoom")
     (synopsis "Simple out of memory (OOM) daemon for the Linux kernel")
     (description "Early OOM is a minimalist out of memory (OOM) daemon that
-- 
2.30.2
M
M
Maxime Devos wrote on 23 Mar 19:48 +0100
[PATCH 6/6] gnu: linux: Avoid importing (gnu packages check) to break cycles.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220323184855.25241-6-maximedevos@telenet.be
This (partially?) breaks a cycle between (gnu packages linux)
and (gnu packages check). There's more work to be done though,
see future patches -- stay tuned!

* gnu/packages/linux.scm
(python-pamela,earlyoom,multipath-tools,mtd-utils,procenv):
Don't import (gnu packages check), instead access that module
via 'module-ref' + 'resolve-interface'.
---
gnu/packages/linux.scm | 31 +++++++++++++++++++++++++------
1 file changed, 25 insertions(+), 6 deletions(-)

Toggle diff (79 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index c47204dc76..8176533d68 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -92,7 +92,9 @@
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages calendar)
-  #:use-module (gnu packages check)
+  ;; Don't import these modules here, otherwise a cycle would result.
+  ;; If needed, use 'module-ref' + 'resolve-interface'.
+  ;; #:use-module (gnu packages check)
   #:use-module (gnu packages cpio)
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages cryptsetup)
@@ -1681,7 +1683,10 @@ at login.  Local and dynamic reconfiguration are its key features.")
     (inputs
      (list linux-pam))
     (native-inputs
-     (list python-pytest))
+     ;; Avoid adding Pythonland and GNOMEland to the module closure when
+     ;; all we need is util-linux.
+     (list (module-ref (resolve-interface '(gnu packages check))
+                       'python-pytest)))
     (home-page "https://github.com/minrk/pamela")
     (synopsis "PAM interface using ctypes")
     (description "This package provides a PAM interface using @code{ctypes}.")
@@ -3779,7 +3784,10 @@ from the module-init-tools project.")
           '())
         (list
           ;; For the test suite.
-          cppcheck
+          ;; Avoid adding Pythonland and GNOMEland to the module closure when
+          ;; all we need is util-linux.
+          (module-ref (resolve-interface '(gnu packages check))
+                      'cppcheck)
           ;; Avoid adding 'golang' and its dependencies Rubyland and
           ;; Nodeland to the module closure when all we need is util-linux.
           (module-ref (resolve-interface '(gnu packages golang)) 'go))))
@@ -5183,7 +5191,10 @@ arrays when needed.")
     (native-inputs
      (list perl pkg-config valgrind
            ;; For tests.
-           cmocka))
+           ;; Avoid adding Pythonland and GNOMEland to the module closure when
+           ;; all we need is util-linux.
+           (module-ref (resolve-interface '(gnu packages check))
+                       'cmocka)))
     (inputs
      `(("json-c" ,json-c)
        ("libaio" ,libaio)
@@ -6594,7 +6605,11 @@ exceeded.")
              #~(list)
              #~(list "--enable-unit-tests"))))
     (native-inputs
-     (list cmocka pkg-config))
+     (list ;; Avoid adding Pythonland and GNOMEland to the module closure when
+           ;; all we need is util-linux.
+           (module-ref (resolve-interface '(gnu packages check))
+                       'cmocka)
+           pkg-config))
     (inputs
      `(("acl" ,acl)                     ; extended attributes (xattr)
        ("libuuid" ,util-linux "lib")
@@ -7243,7 +7258,11 @@ the MTP device as a file system.")
    (native-inputs
     (list pkg-config
           ;; For tests.
-          check groff))
+          ;; Avoid adding Pythonland and GNOMEland to the module closure when
+          ;; all we need is util-linux.
+          (module-ref (resolve-interface '(gnu packages check))
+                      'check)
+          groff))
    (inputs
     (list expat libcap libselinux))
    (synopsis "Utility to show process environment")
-- 
2.30.2
M
M
Maxime Devos wrote on 23 Mar 19:48 +0100
[PATCH 3/6] gnu: tlp: Move tlp and friends to new module to break cycles.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220323184855.25241-3-maximedevos@telenet.be
This partially breaks a cycle between (gnu packages linux) and
(gnu packages gtk). It is not sufficient though, see next patch.

* gnu/packages/linux.scm (tlp,tlpui): Move to ...
* gnu/packages/tlp.scm: ... this new module.
* gnu/local.mk (GNU_SYSTEM_MODULES): Register new module.
---
gnu/local.mk | 1 +
gnu/packages/linux.scm | 192 +---------------------------------
gnu/packages/tlp.scm | 228 +++++++++++++++++++++++++++++++++++++++++
3 files changed, 231 insertions(+), 190 deletions(-)
create mode 100644 gnu/packages/tlp.scm

Toggle diff (458 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index aab22d32d4..ad24234ae5 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -582,6 +582,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/textutils.scm			\
   %D%/packages/text-editors.scm			\
   %D%/packages/time.scm				\
+  %D%/packages/tlp.scm				\
   %D%/packages/tls.scm				\
   %D%/packages/tmux.scm				\
   %D%/packages/toolkits.scm			\
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index dc4f91d48f..6ce640ddf2 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -113,8 +113,8 @@
   #:use-module (gnu packages golang)
   #:use-module (gnu packages gperf)
   #:use-module (gnu packages gstreamer)
-  #:use-module (gnu packages gtk)
-  #:use-module (gnu packages haskell-apps)
+  ;; Don't import that module here, otherwise a cycle would result.
+  ;; #:use-module (gnu packages gtk)
   #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
@@ -6897,194 +6897,6 @@ The appropriate permissions must be set on the backlight or LED control
 interface in sysfs, which can be accomplished with the included udev rules.")
     (license license:expat)))
 
-(define-public tlp
-  (package
-    (name "tlp")
-    (version "1.5.0")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/linrunner/TLP")
-             (commit version)))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32 "0cssclk2brhwvn9dm7h5snm2svwy0c8cfr4z2cgkdkac2pfaaxw4"))))
-    (native-inputs
-     (list shellcheck))
-    (inputs
-     `(("bash" ,bash)
-       ("dbus" ,dbus)
-       ("ethtool" ,ethtool)
-       ("eudev" ,eudev)
-       ("grep" ,grep)
-       ("hdparm" ,hdparm)
-       ("inetutils" ,inetutils)
-       ("iw" ,iw)
-       ("kmod" ,kmod)
-       ("pciutils" ,pciutils)
-       ("perl" ,perl)
-       ("rfkill" ,rfkill)
-       ("sed" ,sed)
-       ("usbutils" ,usbutils)
-       ("util-linux" ,util-linux)
-       ("wireless-tools" ,wireless-tools)
-       ,@(if (let ((system (or (%current-target-system)
-                               (%current-system))))
-               (or (string-prefix? "i686-" system)
-                   (string-prefix? "x86_64-" system)))
-             `(("x86-energy-perf-policy" ,x86-energy-perf-policy))
-             '())))
-    (build-system gnu-build-system)
-    (arguments
-     ;; XXX: The full test suite is run with "checkall" but it requires
-     ;; "checkbashisms" and "perlcritic", not yet packaged in Guix.
-     `(#:test-target "shellcheck"
-       #:modules ((guix build gnu-build-system)
-                  (guix build utils)
-                  (srfi srfi-1))
-       #:phases
-       (modify-phases %standard-phases
-         (delete 'configure)            ; no configure script
-         (add-before 'build 'setenv
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
-               (setenv "TLP_WITH_SYSTEMD" "0")
-               (setenv "TLP_NO_INIT" "1")
-               (setenv "TLP_NO_PMUTILS" "1")
-               (setenv "TLP_SBIN" (string-append out "/bin"))
-               (setenv "TLP_BATD" (string-append out "/share/tlp/bat.d"))
-               (setenv "TLP_BIN" (string-append out "/bin"))
-               (setenv "TLP_TLIB" (string-append out "/share/tlp"))
-               (setenv "TLP_FLIB" (string-append out "/share/tlp/func.d"))
-               (setenv "TLP_ULIB" (string-append out "/lib/udev"))
-               (setenv "TLP_CONFDEF"
-                       (string-append out "/share/tlp/defaults.conf"))
-               (setenv "TLP_CONFDIR" (string-append out "/etc/tlp.d"))
-               (setenv "TLP_CONFREN"
-                       (string-append out "/share/tlp/rename.conf"))
-               (setenv "TLP_ELOD"
-                       (string-append out "/lib/elogind/system-sleep"))
-               (setenv "TLP_SHCPL"
-                       (string-append out "/share/bash-completion/completions"))
-               (setenv "TLP_MAN" (string-append out "/share/man"))
-               (setenv "TLP_META" (string-append out "/share/metainfo")))))
-         (add-before 'install 'fix-installation
-           (lambda _
-             ;; Stop the Makefile from trying to create system directories.
-             (substitute* "Makefile"
-               (("\\[ -f \\$\\(_CONFUSR\\) \\]") "#")
-               (("install -d -m 755 \\$\\(_VAR\\)") "#"))))
-         (replace 'install
-           (lambda _ (invoke "make" "install-tlp" "install-man-tlp")))
-         (add-after 'install 'wrap
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
-                    (bin-files (find-files bin ".*")))
-               (define (bin-directory input-name)
-                 (let ((p (assoc-ref inputs input-name)))
-                   (and p (string-append p "/bin"))))
-               (define (sbin-directory input-name)
-                 (string-append (assoc-ref inputs input-name) "/sbin"))
-               (for-each (lambda (program)
-                           (wrap-program program
-                             `("PATH" ":" prefix
-                               ,(append
-                                 (filter-map bin-directory
-                                             '("bash"
-                                               "coreutils"
-                                               "dbus"
-                                               "eudev"
-                                               "grep"
-                                               "inetutils"
-                                               "kmod"
-                                               "perl"
-                                               "sed"
-                                               "usbutils"
-                                               "util-linux"
-                                               "x86-energy-perf-policy"))
-                                 (filter-map sbin-directory
-                                             '("ethtool"
-                                               "hdparm"
-                                               "iw"
-                                               "pciutils"
-                                               "rfkill"
-                                               "wireless-tools"))))))
-                         bin-files)))))))
-    (home-page "https://linrunner.de/en/tlp/tlp.html")
-    (synopsis "Power management tool for Linux")
-    (description "TLP is a power management tool for Linux.  It comes with
-a default configuration already optimized for battery life.  Nevertheless,
-TLP is customizable to fulfil system requirements.  TLP settings are applied
-every time the power supply source is changed.")
-    ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the
-    ;; rest is GPLv2+.
-    (license (list license:gpl2+ license:gpl3+))))
-
-(define-public tlpui
-  (package
-    (name "tlpui")
-    (version "1.5.0")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/d4nj1/TLPUI")
-             (commit (string-append "tlpui-" version))))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32 "0ca18hazxksx516nkh28f6rd0l1039nkn7mszqfy68c461061q1h"))))
-    (build-system python-build-system)
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'patch-setup.py
-           ;; Install data_files to $out/share instead of /usr/share.
-           (lambda _
-             (substitute* "setup.py"
-               (("/usr/") ""))))
-         (add-after 'unpack 'use-tlp-input
-           ;; Hard-code tlp-stat filename to avoid propagating "tlp".
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let ((tlp-stat (search-input-file inputs "/bin/tlp-stat")))
-               (with-directory-excursion "tlpui"
-                 (substitute* '("file.py" "settingshelper.py" "statui.py")
-                   (("which\\(\"tlp-stat\"\\)")
-                    (string-append "'" tlp-stat "'"))
-                   (("\"tlp-stat\"")
-                    (string-append "'" tlp-stat "'")))))))
-         (add-before 'check 'fix-home-directory
-           (lambda _
-             ;; Tests fail with "Permission denied:
-             ;; '/homeless-shelter'".
-             (setenv "HOME" "/tmp")))
-         ;; `sanity-check' phase errors out with the following
-         ;; messages: "Unable to init server: Could not connect:
-         ;; Connection refused" and "Error: cannot read user
-         ;; configuration from /etc/tlp.conf or /etc/default/tlp".
-         (delete 'sanity-check)
-         (replace 'check
-           (lambda _
-             (invoke "python" "-m" "discover")))
-         (add-after 'install 'wrap-gi-python
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out"))
-                   (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
-               (wrap-program (string-append out "/bin/tlpui")
-                 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))))))))
-    (native-inputs
-     (list `(,glib "bin") gobject-introspection python-discover))
-    (inputs
-     (list gtk+ python-pygobject tlp))
-    (home-page "https://github.com/d4nj1/TLPUI")
-    (synopsis "User interface for TLP written in Python")
-    (description
-     "The Python scripts in this project generate a GTK-UI to change
-TLP configuration files easily.  It aims to protect users from setting
-bad configuration and to deliver a basic overview of all the valid
-configuration values.")
-    (license license:gpl2+)))
-
 (define-public lshw
   (package
     (name "lshw")
diff --git a/gnu/packages/tlp.scm b/gnu/packages/tlp.scm
new file mode 100644
index 0000000000..dfe7d3616b
--- /dev/null
+++ b/gnu/packages/tlp.scm
@@ -0,0 +1,228 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2018-2022 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2019 Stefan Stefanović <stefanx2ovic@gmail.com>
+;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages tlp)
+  #:use-module (guix packages)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix build-system python)
+  #:use-module (guix git-download)
+  #:use-module (gnu packages admin) ;inetutils
+  #:use-module (gnu packages base) ;grep
+  #:use-module (gnu packages bash)
+  #:use-module (gnu packages check) ;python-discover
+  #:use-module (gnu packages glib) ;dbus
+  #:use-module (gnu packages haskell-apps) ;shellcheck
+  #:use-module (gnu packages gtk)
+  #:use-module (gnu packages linux) ;eudev
+  #:use-module (gnu packages networking) ;ethtool
+  #:use-module (gnu packages pciutils)
+  #:use-module (gnu packages perl) ;ethtool
+  #:use-module ((guix licenses) #:prefix license:))
+
+(define-public tlp
+  (package
+    (name "tlp")
+    (version "1.5.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/linrunner/TLP")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0cssclk2brhwvn9dm7h5snm2svwy0c8cfr4z2cgkdkac2pfaaxw4"))))
+    (native-inputs
+     (list shellcheck))
+    (inputs
+     `(("bash" ,bash)
+       ("dbus" ,dbus)
+       ("ethtool" ,ethtool)
+       ("eudev" ,eudev)
+       ("grep" ,grep)
+       ("hdparm" ,hdparm)
+       ("inetutils" ,inetutils)
+       ("iw" ,iw)
+       ("kmod" ,kmod)
+       ("pciutils" ,pciutils)
+       ("perl" ,perl)
+       ("rfkill" ,rfkill)
+       ("sed" ,sed)
+       ("usbutils" ,usbutils)
+       ("util-linux" ,util-linux)
+       ("wireless-tools" ,wireless-tools)
+       ,@(if (let ((system (or (%current-target-system)
+                               (%current-system))))
+               (or (string-prefix? "i686-" system)
+                   (string-prefix? "x86_64-" system)))
+             `(("x86-energy-perf-policy" ,x86-energy-perf-policy))
+             '())))
+    (build-system gnu-build-system)
+    (arguments
+     ;; XXX: The full test suite is run with "checkall" but it requires
+     ;; "checkbashisms" and "perlcritic", not yet packaged in Guix.
+     `(#:test-target "shellcheck"
+       #:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  (srfi srfi-1))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)            ; no configure script
+         (add-before 'build 'setenv
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (setenv "TLP_WITH_SYSTEMD" "0")
+               (setenv "TLP_NO_INIT" "1")
+               (setenv "TLP_NO_PMUTILS" "1")
+               (setenv "TLP_SBIN" (string-append out "/bin"))
+               (setenv "TLP_BATD" (string-append out "/share/tlp/bat.d"))
+               (setenv "TLP_BIN" (string-append out "/bin"))
+               (setenv "TLP_TLIB" (string-append out "/share/tlp"))
+               (setenv "TLP_FLIB" (string-append out "/share/tlp/func.d"))
+               (setenv "TLP_ULIB" (string-append out "/lib/udev"))
+               (setenv "TLP_CONFDEF"
+                       (string-append out "/share/tlp/defaults.conf"))
+               (setenv "TLP_CONFDIR" (string-append out "/etc/tlp.d"))
+               (setenv "TLP_CONFREN"
+                       (string-append out "/share/tlp/rename.conf"))
+               (setenv "TLP_ELOD"
+                       (string-append out "/lib/elogind/system-sleep"))
+               (setenv "TLP_SHCPL"
+                       (string-append out "/share/bash-completion/completions"))
+               (setenv "TLP_MAN" (string-append out "/share/man"))
+               (setenv "TLP_META" (string-append out "/share/metainfo")))))
+         (add-before 'install 'fix-installation
+           (lambda _
+             ;; Stop the Makefile from trying to create system directories.
+             (substitute* "Makefile"
+               (("\\[ -f \\$\\(_CONFUSR\\) \\]") "#")
+               (("install -d -m 755 \\$\\(_VAR\\)") "#"))))
+         (replace 'install
+           (lambda _ (invoke "make" "install-tlp" "install-man-tlp")))
+         (add-after 'install 'wrap
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
+                    (bin-files (find-files bin ".*")))
+               (define (bin-directory input-name)
+                 (let ((p (assoc-ref inputs input-name)))
+                   (and p (string-append p "/bin"))))
+               (define (sbin-directory input-name)
+                 (string-append (assoc-ref inputs input-name) "/sbin"))
+               (for-each (lambda (program)
+                           (wrap-program program
+                             `("PATH" ":" prefix
+                               ,(append
+                                 (filter-map bin-directory
+                                             '("bash"
+                                               "coreutils"
+                                               "dbus"
+                                               "eudev"
+                                               "grep"
+                                               "inetutils"
+                                               "kmod"
+                                               "perl"
+                                               "sed"
+                                               "usbutils"
+                                               "util-linux"
+                                               "x86-energy-perf-policy"))
+                                 (filter-map sbin-directory
+                                             '("ethtool"
+                                               "hdparm"
+                                               "iw"
+                                               "pciutils"
+                                               "rfkill"
+                                               "wireless-tools"))))))
+                         bin-files)))))))
+    (home-page "https://linrunner.de/en/tlp/tlp.html")
+    (synopsis "Power management tool for Linux")
+    (description "TLP is a power management tool for Linux.  It comes with
+a default configuration already optimized for battery life.  Nevertheless,
+TLP is customizable to fulfil system requirements.  TLP settings are applied
+every time the power supply source is changed.")
+    ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the
+    ;; rest is GPLv2+.
+    (license (list license:gpl2+ license:gpl3+))))
+
+(define-public tlpui
+  (package
+    (name "tlpui")
+    (version "1.5.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/d4nj1/TLPUI")
+             (commit (string-append "tlpui-" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0ca18hazxksx516nkh28f6rd0l1039nkn7mszqfy68c461061q1h"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-setup.py
+           ;; Install data_files to $out/share instead of /usr/share.
+           (lambda _
+             (substitute* "setup.py"
+               (("/usr/") ""))))
+         (add-after 'unpack 'use-tlp-input
+           ;; Hard-code tlp-stat filename to avoid propagating "tlp".
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((tlp-stat (search-input-file inputs "/bin/tlp-stat")))
+               (with-directory-excursion "tlpui"
+                 (substitute* '("file.py" "settingshelper.py" "statui.py")
+                   (("which\\(\"tlp-stat\"\\)")
+                    (string-append "'" tlp-stat "'"))
+                   (("\"tlp-stat\"")
+                    (string-append "'" tlp-stat "'")))))))
+         (add-before 'check 'fix-home-directory
+           (lambda _
+             ;; Tests fail with "Permission denied:
+             ;; '/homeless-shelter'".
+             (setenv "HOME" "/tmp")))
+         ;; `sanity-check' phase errors out with the following
+         ;; messages: "Unable to init server: Could not connect:
+         ;; Connection refused" and "Error: cannot read user
+         ;; configuration from /etc/tlp.conf or /etc/default/tlp".
+         (delete 'sanity-check)
+         (replace 'check
+           (lambda _
+             (invoke "python" "-m" "discover")))
+         (add-after 'install 'wrap-gi-python
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
+               (wrap-program (string-append out "/bin/tlpui")
+                 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))))))))
+    (native-inputs
+     (list `(,glib "bin") gobject-introspection python-discover))
+    (inputs
+     (list gtk+ python-pygobject tlp))
+    (home-page "https://github.com/d4nj1/TLPUI")
+    (synopsis "User interface for TLP written in Python")
+    (description
+     "The Python scripts in this project generate a GTK-UI to change
+TLP configuration files easily.  It aims to protect users from setting
+bad configuration and to deliver a basic overview of all the valid
+configuration values.")
+    (license license:gpl2+)))
-- 
2.30.2
M
M
Maxime Devos wrote on 23 Mar 19:49 +0100
Re: [bug#54539] [PATCH 0/6] Start breaking up import cycles
(address . 54539@debbugs.gnu.org)
a85be88402b840a95e3c57705a8554eacbd5789a.camel@telenet.be
Maxime Devos schreef op wo 23-03-2022 om 19:46 [+0100]:
Toggle quote (4 lines)
> Import cycles make some packaging things harder and prevent some
> proposed optimisations to "guix pull", let's start eliminating them.
> TBC ...

The copyright lines are based on a mix of "git blame" and "git log --
grep the-package"; I might have missed some people ...
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYjtryBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7ijJAQDEhgTDbPiupDFrHNRdfwDv38Do
zUrbbQdBf9fpsPSFHwEA53+d59PRmNQAb/eddh3vdXTKp+MJ38Rbq3sOMpgbGA8=
=tc+7
-----END PGP SIGNATURE-----


L
L
Liliana Marie Prikler wrote on 24 Mar 08:22 +0100
5ab234b577c15dd50c36aaf427cce593404b52dc.camel@ist.tugraz.at
Hi Maxime,

Am Mittwoch, dem 23.03.2022 um 19:49 +0100 schrieb Maxime Devos:
Toggle quote (8 lines)
> Maxime Devos schreef op wo 23-03-2022 om 19:46 [+0100]:
> > Import cycles make some packaging things harder and prevent some
> > proposed optimisations to "guix pull", let's start eliminating
> > them.
> > TBC ...
>
> The copyright lines are based on a mix of "git blame" and "git log --
> grep the-package"; I might have missed some people ...
I agree that breaking up cycles is a good thing, but I disagree with
some of the decisions you've made here. For instance, I oppose the use
of single-package modules, because those more often than not simply
clutter the file system.

I'm not sure if Guile's #:autoload could do anything to fix these
issues (I suppose not), but long term I think guile modules should
support a style that is basically (resolve-interface) + (module-ref) in
the manner Guix needs, but declaratively. While we do not have that in
place yet, I suggest something like the following:

(define (check-package-ref pkg)
(module-ref (resolve-interface '(gnu packages check)) pkg))
...

or

(define check-package-ref
(let ((iface (resolve-interface '(gnu packages check))))
(lambda (pkg) (resolve-interface iface pkg))))

I'm not sure if the second will have the intended effect. It appears
to me as though the key to breaking these cycles is moving them into a
context that is not evaluated on the top of the file, e.g. a thunked
field or in the case of my first suggestion a procedure.

In either case, declaring all these lazy dependencies near the module
definition would have the added benefit, that people could see them
being lazily imported and thus no longer need the #:use-modules
comment.

WDYT?
M
M
Maxime Devos wrote on 24 Mar 16:05 +0100
70b6c5f42bccf41a63acb38922e8d20d4eda3d8a.camel@telenet.be
Liliana Marie Prikler schreef op do 24-03-2022 om 08:22 [+0100]:
Toggle quote (5 lines)
> I agree that breaking up cycles is a good thing, but I disagree with
> some of the decisions you've made here.  For instance, I oppose the use
> of single-package modules, because those more often than not simply
> clutter the file system.

There are some other sound applications in (gnu packages audio)
and (gnu packages music), so maybe I can make a (gnu packages audio-
apps) module where 'audacity' and other applications like 'calf' can
reside?

For reducing the contribution of (gnu packages compression) on the
cycle issue, I've (in not yet submitted patched) separated many things
into (gnu packages compression-xyz), perhaps I can merge
(gnu packages patools) into (gnu packages compression-xyz)?

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYjyIvRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7rOTAP0YuDljFH70+2uWg1ghSjlV2CQa
cHtSUkp37fUrUPJ9WAD7B7OLNzXZQsprCTFB3CcxG+V/6Z92MK6HeSz75Y0yygo=
=nThe
-----END PGP SIGNATURE-----


L
L
Liliana Marie Prikler wrote on 24 Mar 16:38 +0100
232472b55b6237597e2e304741fd823d205d7972.camel@ist.tugraz.at
Am Donnerstag, dem 24.03.2022 um 16:05 +0100 schrieb Maxime Devos:
Toggle quote (10 lines)
> Liliana Marie Prikler schreef op do 24-03-2022 om 08:22 [+0100]:
> > I agree that breaking up cycles is a good thing, but I disagree
> > with some of the decisions you've made here.  For instance, I
> > oppose the use of single-package modules, because those more often
> > than not simply clutter the file system.
>
> There are some other sound applications in (gnu packages audio)
> and (gnu packages music), so maybe I can make a (gnu packages audio-
> apps) module where 'audacity' and other applications like 'calf' can
> reside?
I'm not sure. IIUC, audio should be for audio systems, codecs, etc.
whereas music sounds like a particular niche containing music players
etc. Perhaps the cycle could more appropriately been broken by moving
stuff from music to audio? Alternatively, declaring music as lazy
import as shown in my previous mail might help making these
interdependencies both "cycle-free" and visible. (I'm pretty sure we
also have "sound" lying around somewhere to put more oil into the
fire.)

Toggle quote (4 lines)
> For reducing the contribution of (gnu packages compression) on the
> cycle issue, I've (in not yet submitted patched) separated many
> things into (gnu packages compression-xyz), perhaps I can merge
> (gnu packages patools) into (gnu packages compression-xyz)?
Here too, I think a classification into compression algorithms in
compression and backup/archival tools in another file (we do have
backup IIRC) would make the most sense. Though obviously, we'd have to
do compression algorithms implemented in Rust in a special rust-
compression file to avoid circles or use the cycle killer lambda trick.
I'm not sure if "compression-xyz" would be a helpful label, and it
might just become the next root of circular dependencies if abused.

Cheers
M
M
Maxime Devos wrote on 24 Mar 16:46 +0100
6c9031840667a11465eeefed0a4f0769c3466578.camel@telenet.be
Liliana Marie Prikler schreef op do 24-03-2022 om 16:38 [+0100]:
Toggle quote (14 lines)
> > For reducing the contribution of (gnu packages compression) on the
> > cycle issue, I've (in not yet submitted patched) separated many
> > things into (gnu packages compression-xyz), perhaps I can merge
> > (gnu packages patools) into (gnu packages compression-xyz)?
> Here too, I think a classification into compression algorithms in
> compression and backup/archival tools in another file (we do have
> backup IIRC) would make the most sense.  Though obviously, we'd have
> to
> do compression algorithms implemented in Rust in a special rust-
> compression file to avoid circles or use the cycle killer lambda
> trick.
> I'm not sure if "compression-xyz" would be a helpful label, and it
> might just become the next root of circular dependencies if abused.

Except for zpaq, there don't appear to be any backup tools in (gnu
packages compression). There are no rust compression things in
(gnu packages compression) (yet!). But yes, there's some opportunity
for abuse here. There _are_ archival tools in (gnu packages
compression), e.g. tar and unzip. Moving them to (gnu packages
backup) wouldn't bring any benefit though, since they are used by
practically everything.

Anyway, I'll continue trying to break cycles ...

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYjySXRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7gPKAP923TsyKaWfv4R8Yqee7GAwOvjX
V65fuS5avwZk4RnpggD+LwgqR+fpaSDA787Wzjpk5ExVbhoVHCb664ExPEjMTgE=
=1yxR
-----END PGP SIGNATURE-----


Z
Z
zimoun wrote on 24 Mar 17:58 +0100
(name . Liliana Marie Prikler)(address . liliana.prikler@ist.tugraz.at)
CAJ3okZ0q9h=GnHfJ9ucb2Je0PhYuZ4U+V-nq8i8m_yinzO_RaA@mail.gmail.com
Hi,

On Thu, 24 Mar 2022 at 08:23, Liliana Marie Prikler
<liliana.prikler@ist.tugraz.at> wrote:

Toggle quote (5 lines)
> I agree that breaking up cycles is a good thing, but I disagree with
> some of the decisions you've made here. For instance, I oppose the use
> of single-package modules, because those more often than not simply
> clutter the file system.

Well, instead of opinions in the vacuum of matter, we need to profile
and decide on performance report. The number of files and the number
of package per file should consider the performance of:

- compilation by developer
- guix pull
- guix search (or any other)
- guix search --load-path
- etc.

Toggle quote (5 lines)
> In either case, declaring all these lazy dependencies near the module
> definition would have the added benefit, that people could see them
> being lazily imported and thus no longer need the #:use-modules
> comment.

I agree that lazyness is a good thing and a good direction. However,
let be pragmatic with what we have now. :-) What are the performance
comparison between breaking many cycles as Maxime is proposing vs
using many 'module-ref' + 'resolve-interface' instead of break?


Cheers,
simon
L
L
Leo Famulari wrote on 24 Mar 18:05 +0100
(name . Liliana Marie Prikler)(address . liliana.prikler@ist.tugraz.at)
Yjykw0ikvRY/V9N0@jasmine.lan
On Thu, Mar 24, 2022 at 08:22:09AM +0100, Liliana Marie Prikler wrote:
Toggle quote (5 lines)
> I agree that breaking up cycles is a good thing, but I disagree with
> some of the decisions you've made here. For instance, I oppose the use
> of single-package modules, because those more often than not simply
> clutter the file system.

The file system can hold many files. The Guix codebase is nowhere near
the limit...
M
M
Maxime Devos wrote on 24 Mar 19:07 +0100
(address . 54539@debbugs.gnu.org)
2b5a3af9bd4ea9ec79ad9f9636ed344a51ba7a81.camel@telenet.be
zimoun schreef op do 24-03-2022 om 17:58 [+0100]:
Toggle quote (5 lines)
> I agree that lazyness is a good thing and a good direction.  However,
> let be pragmatic with what we have now. :-)  What are the performance
> comparison between breaking many cycles as Maxime is proposing vs
> using many 'module-ref' + 'resolve-interface' instead of break?

Currently this patch series does not improve anything much, according
to "guix graph --type=module hello | wc --lines". I'm now introducing
some module-ref+resolve-interface --- it's very convenient, but I'm not
yet at a significant result.

Anyway, restructuring modules and lazy loading can be complementary,
whatever's convenient.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYjyzWxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7qyvAQCMzjcLrTbp33oplqHjSbGykB3r
sxV5rKxCbdc6xq1+uwEAwsxLUPd1y8I7e73212q44Ly5wfpgFMlWFf/m0L6aWAs=
=lXjQ
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 24 Mar 22:49 +0100
(address . 54539@debbugs.gnu.org)
8a4250c11e8bc178dc5da8fe43497af4e0ee1293.camel@telenet.be
Maxime Devos schreef op wo 23-03-2022 om 19:46 [+0100]:
Toggle quote (4 lines)
> Import cycles make some packaging things harder and prevent some
> proposed optimisations to "guix pull", let's start eliminating them.
> TBC ...

Status update: previously the output of
"guix graph -t module hello --max-depth=9 |wc --lines" reports ~1040
lines. With WIP patches, it now reports 280 lines. I'm gradually
increasing the max-depth and each time investigating how to leave xorg,
gtk, ... out of the output.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYjznhBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7kQPAPwPlqj951BHz5xnsZvVlTbZ26MV
sdLCWR/HRu0UKlQsLgD/VadoZ3QysZwliEVcibei/XhkUPaaJuLUPaQ/AK8fOAk=
=UXBT
-----END PGP SIGNATURE-----


L
L
Liliana Marie Prikler wrote on 25 Mar 09:44 +0100
(address . 54539@debbugs.gnu.org)
84da9090d9dee87855ee4f5b2f5442ad919ea032.camel@ist.tugraz.at
Am Donnerstag, dem 24.03.2022 um 19:07 +0100 schrieb Maxime Devos:
Toggle quote (11 lines)
> zimoun schreef op do 24-03-2022 om 17:58 [+0100]:
> > I agree that lazyness is a good thing and a good direction. 
> > However, let be pragmatic with what we have now. :-)  What are the
> > performance comparison between breaking many cycles as Maxime is
> > proposing vs using many 'module-ref' + 'resolve-interface' instead
> > of break?
>
> Currently this patch series does not improve anything much, according
> to "guix graph --type=module hello | wc --lines".  I'm now
> introducing some module-ref+resolve-interface --- it's very
> convenient, but I'm not yet at a significant result.
For the record, my suggestion to declare lazily loaded modules near the
top is based on the fact that Maxime's current patch set uses them to
break up cycles in a manner that also requires a comment in the define-
module clause for the sake of clarity. As a nice side effect, it makes
it so that two-liners in the inputs field become one-liners.

The question is (on a per-module basis) whether we consider this cheat
fine or whether we want to move things into different files (and
which). I so far haven't heard a good argument for the case of
audacity I raised. "It breaks cycles" is not good enough when we
consider the potential existence of other cuts (e.g. "audio-apps",
although perhaps a more specific "audio-editors" similar to how we have
"image-viewers" might make more sense), as well as the cheat of lazy
imports.

simon, you raise some important performance metrics, but there is such
a thing as optimizing for the wrong metric. There are other variables
to consider, like time to grep, "does it make sense that X belongs to Y
and Z doesn't", etc., when it comes to ease of contributing. Declaring
some modules banned for a given other module has an adverse effect
here, in my opinion, and thus I claim that we need easily accessible
ways of using those supposedly banned modules.

Btw. regarding style, I think declaring a function @PACKAGE_MODULE,
i.e. a literal '@ followed by the last symbol in the module's name,
would be the easiest, as one could read (@PACKAGE_MODULE arg) as a
shorthand for (@ (gnu packages PACKAGE_MODULE) arg). Somewhat off-
topic, what's the rationale behind not using @ syntax? Does @ have
different semantics from resolve-interface + module-ref?

Cheers
L
L
Liliana Marie Prikler wrote on 25 Mar 09:51 +0100
(name . Leo Famulari)(address . leo@famulari.name)
b678a54be5faee9b1ff739b73bd87036077b53e8.camel@ist.tugraz.at
Am Donnerstag, dem 24.03.2022 um 13:05 -0400 schrieb Leo Famulari:
Toggle quote (9 lines)
> On Thu, Mar 24, 2022 at 08:22:09AM +0100, Liliana Marie Prikler
> wrote:
> > I agree that breaking up cycles is a good thing, but I disagree
> > with some of the decisions you've made here.  For instance, I
> > oppose the use of single-package modules, because those more often
> > than not simply clutter the file system.
>
> The file system can hold many files. The Guix codebase is nowhere
> near the limit...
That's not a good argument, though. Theoretically, you could have one
file per package, or even one folder per package as the Gentoo folks
do. Clearly, this is not an appeal to file system limits, but to
limitations of humans and their tools. Have you tried exploring
/gnu/store? Merely loading it takes a considerable amount of time.

Cheers
M
M
Maxime Devos wrote on 25 Mar 11:26 +0100
9dc81d586944ac9cdd7505ed8e0cafdb95bceb7b.camel@telenet.be
Liliana Marie Prikler schreef op do 24-03-2022 om 16:38 [+0100]:
Toggle quote (16 lines)
> Am Donnerstag, dem 24.03.2022 um 16:05 +0100 schrieb Maxime Devos:
> > Liliana Marie Prikler schreef op do 24-03-2022 om 08:22 [+0100]:
> > > I agree that breaking up cycles is a good thing, but I disagree
> > > with some of the decisions you've made here.  For instance, I
> > > oppose the use of single-package modules, because those more often
> > > than not simply clutter the file system.
> >
> > There are some other sound applications in (gnu packages audio)
> > and (gnu packages music), so maybe I can make a (gnu packages audio-
> > apps) module where 'audacity' and other applications like 'calf' can
> > reside?
> I'm not sure. IIUC, audio should be for audio systems, codecs, etc.
> whereas music sounds like a particular niche containing music players
> etc.
> [...]

I'm not sure where the ‘I'm not sure’ comes from --- audacity is not an
audio system like pulseaudio or alsa, not a codec implementation like
libvorbis, and it is a sound player (and editor), so IIUC, audacity
does not fit into (gnu packages audio).

While it can be used for modifying and playing music, it is more
general than that, hence the suggestion of (gnu packages audio-apps)
(where some other packages can be moved to as well, maybe 'gnaural'?).

Though granted, it's difficult to make a strict distinction between
audio and music.

Toggle quote (3 lines)
> Perhaps the cycle could more appropriately been broken by moving
> stuff from music to audio?

(gnu packages music) is full of applications using gtk+ or gles or the
like. Moving them to (gnu packages audio) would make (gnu packages
audio) depend on (gnu packages gtk) and friends, which seems counter-
productive to me.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYj2Y7hccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7r9TAQDm2MtmjvUEkBqTQr1kj7QWr4Kd
Vsh3X1O2j42AfQ2/hgEAqaXwv3//EubdEfSmX+BGbeuRItDtJ3h6fI46WA3fBQM=
=T7AB
-----END PGP SIGNATURE-----


L
L
Liliana Marie Prikler wrote on 25 Mar 12:47 +0100
3e47544944b522f78002dd628a772216958e0ad9.camel@ist.tugraz.at
Am Freitag, dem 25.03.2022 um 11:26 +0100 schrieb Maxime Devos:
Toggle quote (22 lines)
> Liliana Marie Prikler schreef op do 24-03-2022 om 16:38 [+0100]:
> > Am Donnerstag, dem 24.03.2022 um 16:05 +0100 schrieb Maxime Devos:
> >
> > > Liliana Marie Prikler schreef op do 24-03-2022 om 08:22 [+0100]:
> > > > I agree that breaking up cycles is a good thing, but I disagree
> > > > with some of the decisions you've made here.  For instance, I
> > > > oppose the use of single-package modules, because those more
> > > > often than not simply clutter the file system.
> > >
> > > There are some other sound applications in (gnu packages audio)
> > > and (gnu packages music), so maybe I can make a (gnu packages
> > > audio-apps) module where 'audacity' and other applications like
> > > 'calf' can reside?
> > I'm not sure.  IIUC, audio should be for audio systems, codecs,
> > etc. whereas music sounds like a particular niche containing music
> > players etc.
> > [...]
>
> I'm not sure where the ‘I'm not sure’ comes from --- audacity is not
> an audio system like pulseaudio or alsa, not a codec implementation
> like libvorbis, and it is a sound player (and editor), so IIUC,
> audacity does not fit into (gnu packages audio).
It's not particularly specific to audacity in this case, it's that I
think that "-app" does not make for a useful distinction. Consider
fluidsynth. Is it an app, a library, something else? If fluidsynth
was causing circular imports and moving it to audio-synthesizers fixed
things, that'd be fine by me. gnaural could also fit into
synthesizers. However, putting both in the same file might still be an
issue from a cycle perspective, because the latter needs gtk, whereas
the former is content with having just glib (although that one appears
benign on surface, as at the very least gtk does not audio directly).

Toggle quote (15 lines)
> While it can be used for modifying and playing music, it is more
> general than that, hence the suggestion of (gnu packages audio-apps)
> (where some other packages can be moved to as well, maybe
> 'gnaural'?).
>
> Though granted, it's difficult to make a strict distinction between
> audio and music.
>
> >   Perhaps the cycle could more appropriately been broken by moving
> > stuff from music to audio?
>
> (gnu packages music) is full of applications using gtk+ or gles or
> the like.  Moving them to (gnu packages audio) would make (gnu
> packages audio) depend on (gnu packages gtk) and friends, which seems
> counter-productive to me.
That's the status quo (through gnaural and audacity for example). To
make a more educated guess, which cycle do we aim to address here? Is
there a meaningful cut that can be made (e.g. the offending packages
are all "audio editors", "audio synthesizers", etc.) or do we have to
separate good and bad based on their inputs?

Cheers
M
M
Maxime Devos wrote on 25 Mar 15:12 +0100
ff888453c3b11f0fe77e00d0d27d9854bddd22d9.camel@telenet.be
Liliana Marie Prikler schreef op vr 25-03-2022 om 12:47 [+0100]:
Toggle quote (6 lines)
> That's the status quo (through gnaural and audacity for example).  To
> make a more educated guess, which cycle do we aim to address here?  Is
> there a meaningful cut that can be made (e.g. the offending packages
> are all "audio editors", "audio synthesizers", etc.) or do we have to
> separate good and bad based on their inputs?

Some cycles:

(gnu packages pulseaudio) -> (gnu packages audio) -> (gnu packages gtk)
/(gnu packages qt)-> (gnu packages pulseaudio) + the world

(gnu packages pulseaudio) -> (gnu packages audio) -> (gnu packages
webkit) -> (gnu packages gstreamer) + the world -> (gnu packages
pulseaudio) + the world

Suggested cut: audio libraries like flac, libogg, libvorbis, opus,
wildmidi, vo-aacenc, tinyalsa ... can go in (gnu packages audio), other
things go somewhere else, especially if they need expensive imports.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYj3N6BccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7v6UAQCWtpEWEGHceh+JtnqhPF3r9XwX
4BmPQoQM871NI3vBxAD/ZJ+yNKPCI+Msfj+02dH3ROcdadLZkdaZktXRml+bcgc=
=zZCv
-----END PGP SIGNATURE-----


L
L
Liliana Marie Prikler wrote on 25 Mar 15:27 +0100
56df912130f0b984fd7193f1255a3674a043f028.camel@ist.tugraz.at
Am Freitag, dem 25.03.2022 um 15:12 +0100 schrieb Maxime Devos:
Toggle quote (22 lines)
> Liliana Marie Prikler schreef op vr 25-03-2022 om 12:47 [+0100]:
> > That's the status quo (through gnaural and audacity for example). 
> > To make a more educated guess, which cycle do we aim to address
> > here? 
> > Is there a meaningful cut that can be made (e.g. the offending
> > packages are all "audio editors", "audio synthesizers", etc.) or do
> > we have to separate good and bad based on their inputs?
>
> Some cycles:
>
> (gnu packages pulseaudio) -> (gnu packages audio) -> (gnu packages
> gtk)
> /(gnu packages qt)-> (gnu packages pulseaudio) + the world
>
> (gnu packages pulseaudio) -> (gnu packages audio) -> (gnu packages
> webkit) -> (gnu packages gstreamer) + the world -> (gnu packages
> pulseaudio) + the world
>
> Suggested cut: audio libraries like flac, libogg, libvorbis, opus,
> wildmidi, vo-aacenc, tinyalsa ... can go in (gnu packages audio),
> other things go somewhere else, especially if they need expensive
> imports.
Hmm, is it all codecs? In that case, I'd suggest making a smaller (gnu
packages audio-codecs), that can be used by (gnu packages audio-
systems) [including (tiny)alsa, pulseaudio, jack, ...] that can be used
by the rest of the world. Having that, we could move "the rest" into
audio-xyz (or let it simply remain "audio"). Would that be actionable?

(Note: There might still be debate w.r.t. the above split when
considering synthesizers, as they are technically not codecs, but we
still need to distinguish between low-level synths like fluidsynth and
wildmidi vs. full-on sound stations.)

(Note2: Of course, this assumes that neither audio-codecs nor audio-
systems will ever need to import any of the rust stuff. *sigh*)


Cheers
M
M
Maxime Devos wrote on 25 Mar 15:36 +0100
(address . 54539@debbugs.gnu.org)
13a80b63e826a8f77c87a6f2375751806cdb7cf2.camel@telenet.be
Maxime Devos schreef op wo 23-03-2022 om 19:46 [+0100]:
Toggle quote (4 lines)
> Import cycles make some packaging things harder and prevent some
> proposed optimisations to "guix pull", let's start eliminating them.
> TBC ...

I (locally) reverted the six patches I sent previously and I tried out
the 'module-ref'+'resolve-interface' strategy on (gnu packages linux)
(see attached patch). WDYT of repeating this with a few other
‘strategic’ modules, e.g. (gnu packages compression), (gnu packages
perl), (gnu packages version-control)?

Greetings,
Maxime.
From e64caee6518305e9a46588c569beff35ab54187c Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Fri, 25 Mar 2022 14:27:20 +0000
Subject: [PATCH] gnu: linux: Avoid importing often optional modules.

(gnu packages linux) is imported from many places, and in
turn it imported quite a few modules that import many things
on their own (e.g. gtk, haskell-apps, python-xyz). Avoid
doing that, in case all we need is 'util-linux'.

To actually have a significant effect, this needs to be
done for more package modules, see later patches.

* gnu/packages/linux.scm: Avoid importing the 'audio', 'avahi',
'backup', 'boost', 'calendar', 'check', 'crypto', 'cryptsetup',
'datastructures, 'docbook', 'documentation', 'freedesktop',
'gnupg', 'golang', 'gstreamer', 'gtk', 'haskell-apps',
'haskell-xyz', 'lua', 'maths', 'netpbm', 'networking',
'pulseaudio', 'python-xyz', 'rrdtool', 'samba', 'sdl',
'serialization', 'tls,' 'valgrind', 'video', 'vulkan', 'web',
'xiph', 'xdisorg' and 'xorg'. Add a TODO about moving 'bc'
to a more practical place.
---
gnu/packages/linux.scm | 237 +++++++++++++++++++++++------------------
1 file changed, 133 insertions(+), 104 deletions(-)

Toggle diff (606 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 8d9dc01839..ef0c0f861e 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -52,7 +52,7 @@
 ;;; Copyright © 2020 pukkamustard <pukkamustard@posteo.net>
 ;;; Copyright © 2021 B. Wilson <elaexuotee@wilsonb.com>
 ;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
-;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2021, 2022 Maxime Devos <maximedevos@telenet.be>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
 ;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
@@ -82,77 +82,42 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages acl)
   #:use-module (gnu packages admin)
+  ;; TODO: move 'bc' to 'base' to avoid this import
   #:use-module (gnu packages algebra)
-  #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
-  #:use-module (gnu packages avahi)
-  #:use-module (gnu packages backup)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages bison)
-  #:use-module (gnu packages boost)
-  #:use-module (gnu packages calendar)
-  #:use-module (gnu packages check)
   #:use-module (gnu packages cpio)
-  #:use-module (gnu packages crypto)
-  #:use-module (gnu packages cryptsetup)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages dbm)
-  #:use-module (gnu packages datastructures)
-  #:use-module (gnu packages docbook)
-  #:use-module (gnu packages documentation)
   #:use-module (gnu packages elf)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages file)
-  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gawk)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
-  #:use-module (gnu packages gnupg)
-  #:use-module (gnu packages golang)
   #:use-module (gnu packages gperf)
-  #:use-module (gnu packages gstreamer)
-  #:use-module (gnu packages gtk)
-  #:use-module (gnu packages haskell-apps)
-  #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages llvm)
-  #:use-module (gnu packages lua)
   #:use-module (gnu packages man)
-  #:use-module (gnu packages maths)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
-  #:use-module (gnu packages netpbm)
-  #:use-module (gnu packages networking)
   #:use-module (gnu packages ninja)
   #:use-module (gnu packages nss)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pciutils)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages popt)
-  #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
-  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages readline)
-  #:use-module (gnu packages rrdtool)
-  #:use-module (gnu packages samba)
-  #:use-module (gnu packages sdl)
-  #:use-module (gnu packages serialization)
   #:use-module (gnu packages slang)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages textutils)
-  #:use-module (gnu packages tls)
-  #:use-module (gnu packages valgrind)
-  #:use-module (gnu packages video)
-  #:use-module (gnu packages vulkan)
-  #:use-module (gnu packages web)
-  #:use-module (gnu packages xiph)
   #:use-module (gnu packages xml)
-  #:use-module (gnu packages xdisorg)
-  #:use-module (gnu packages xorg)
   #:use-module (gnu packages groff)
   #:use-module (gnu packages selinux)
   #:use-module (gnu packages swig)
@@ -179,6 +144,60 @@
   #:use-module (ice-9 match)
   #:use-module (ice-9 regex))
 
+;; Avoid importing (gnu packages audio) to avoid increasing
+;; the module closure when all we need is 'linux-libre-headers'.
+(define (module-variable-resolver module)
+  (lambda (variable)
+    (module-ref (resolve-interface module) variable)))
+
+(define audio-package (module-variable-resolver '(gnu packages audio)))
+(define avahi-package (module-variable-resolver '(gnu packages avahi)))
+(define backup-package (module-variable-resolver '(gnu packages backup)))
+(define boost-package (module-variable-resolver '(gnu packages boost)))
+(define calendar-package (module-variable-resolver '(gnu packages calendar)))
+(define check-package (module-variable-resolver '(gnu packages check)))
+(define crypto-package (module-variable-resolver '(gnu packages crypto)))
+(define cryptsetup-package
+  (module-variable-resolver '(gnu packages cryptsetup)))
+(define datastructures-package
+  (module-variable-resolver '(gnu packages datastructures)))
+(define docbook-package
+  (module-variable-resolver '(gnu packages docbook)))
+(define documentation-package
+  (module-variable-resolver '(gnu packages documentation)))
+(define freedesktop-package
+  (module-variable-resolver '(gnu packages freedesktop)))
+(define gnupg-package (module-variable-resolver '(gnu packages gnupg)))
+(define golang-package (module-variable-resolver '(gnu packages golang)))
+(define gstreamer-package (module-variable-resolver '(gnu packages gstreamer)))
+(define gtk-package (module-variable-resolver '(gnu packages gtk)))
+(define haskell-apps-package
+  (module-variable-resolver '(gnu packages haskell-apps)))
+(define haskell-xyz-package
+  (module-variable-resolver '(gnu packages haskell-xyz)))
+(define lua-package (module-variable-resolver '(gnu packages lua)))
+(define maths-package (module-variable-resolver '(gnu packages maths)))
+(define netpbm-package
+  (module-variable-resolver '(gnu packages netpbm)))
+(define networking-package
+  (module-variable-resolver '(gnu packages networking)))
+(define pulseaudio-package
+  (module-variable-resolver '(gnu packages pulseaudio)))
+(define python-xyz-package
+  (module-variable-resolver '(gnu packages python-xyz)))
+(define samba-package (module-variable-resolver '(gnu packages samba)))
+(define rrdtool-package (module-variable-resolver '(gnu packages rrdtool)))
+(define sdl-package (module-variable-resolver '(gnu packages sdl)))
+(define serialization-package
+  (module-variable-resolver '(gnu packages serialization)))
+(define tls-package (module-variable-resolver '(gnu packages tls)))
+(define valgrind-package (module-variable-resolver '(gnu packages valgrind)))
+(define video-package (module-variable-resolver '(gnu packages video)))
+(define xdisorg-package (module-variable-resolver '(gnu packages xdisorg)))
+(define xorg-package (module-variable-resolver '(gnu packages xorg)))
+(define vulkan-package (module-variable-resolver '(gnu packages vulkan)))
+(define web-package (module-variable-resolver '(gnu packages web)))
+
 (define-public (system->linux-architecture arch)
   "Return the Linux architecture name for ARCH, a Guix system name such as
 \"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"."
@@ -791,7 +810,7 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
     (native-inputs
      `(("perl" ,perl)
        ("bc" ,bc)
-       ("openssl" ,openssl)
+       ("openssl" ,(tls-package 'openssl))
        ("elfutils" ,elfutils)  ; Needed to enable CONFIG_STACK_VALIDATION
        ("flex" ,flex)
        ("bison" ,bison)
@@ -1680,7 +1699,7 @@ at login.  Local and dynamic reconfiguration are its key features.")
     (inputs
      (list linux-pam))
     (native-inputs
-     (list python-pytest))
+     (list (check-package 'python-pytest)))
     (home-page "https://github.com/minrk/pamela")
     (synopsis "PAM interface using ctypes")
     (description "This package provides a PAM interface using @code{ctypes}.")
@@ -1701,7 +1720,7 @@ at login.  Local and dynamic reconfiguration are its key features.")
                 "1bf91gi6zmfzzmczxm7pajxdlgnikasvg5xsd3j0a368rcr7lf9l"))))
     (build-system gnu-build-system)
     (inputs
-     (list gnupg linux-pam))
+     (list (gnupg-package 'gnupg) linux-pam))
     (native-inputs
      (list autoconf automake libtool))
     (arguments
@@ -2562,7 +2581,7 @@ MIDI functionality to the Linux-based operating system.")
     (native-inputs
      `(("gettext" ,gettext-minimal)))
     (inputs
-     (list libsamplerate ncurses alsa-lib xmlto))
+     (list (pulseaudio-package 'libsamplerate) ncurses alsa-lib xmlto))
     (home-page "http://www.alsa-project.org/")
     (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
     (description
@@ -2625,11 +2644,11 @@ MIDI functionality to the Linux-based operating system.")
                #t))))))
     (inputs
      (list alsa-lib
-           jack-1
-           speex ; libspeexdsp resampling plugin
-           libsamplerate ; libsamplerate resampling plugin
-           ffmpeg ; libavcodec resampling plugin, a52 plugin
-           pulseaudio)) ; PulseAudio plugin
+           (audio-package 'jack-1)
+           (pulseaudio-package 'speex) ; libspeexdsp resampling plugin
+           (pulseaudio-package 'libsamplerate) ; libsamplerate resampling plugin
+           (video-package 'ffmpeg) ; libavcodec resampling plugin, a52 plugin
+           (pulseaudio-package 'pulseaudio))) ; PulseAudio plugin
     (native-inputs
      (list pkg-config))
     (home-page "http://www.alsa-project.org/")
@@ -3469,7 +3488,7 @@ file system is as easy as logging into the server with an SSH client.")
        (sha256
         (base32 "1cy5b6qril9c3ry6fv7ir87s8iyy5vxxmbyx90dm86fbra0vjaf5"))))
     (build-system gnu-build-system)
-    (inputs (list fuse libarchive))
+    (inputs (list fuse (backup-package 'libarchive)))
     (native-inputs (list pkg-config))
     (home-page "https://www.cybernoia.de/software/archivemount.html")
     (synopsis "Tool for mounting archive files with FUSE")
@@ -3771,12 +3790,12 @@ from the module-init-tools project.")
       (append
         ;; To generate the manpage.
         (if (or (target-x86-64?) (target-x86-32?))
-          (list pandoc)
+          (list (haskell-xyz-package 'pandoc))
           '())
         (list
           ;; For the test suite.
-          cppcheck
-          go)))
+          (check-package 'cppcheck)
+          (golang-package 'go))))
     (home-page "https://github.com/rfjakob/earlyoom")
     (synopsis "Simple out of memory (OOM) daemon for the Linux kernel")
     (description "Early OOM is a minimalist out of memory (OOM) daemon that
@@ -3846,8 +3865,8 @@ to the in-kernel OOM killer.")
        ("perl" ,perl)
        ("python" ,python-wrapper)
        ;; For documentation.
-       ("docbook-xml" ,docbook-xml-4.2)
-       ("docbook-xsl" ,docbook-xsl)
+       ("docbook-xml" ,(docbook-package 'docbook-xml-4.2))
+       ("docbook-xsl" ,(docbook-package 'docbook-xsl))
        ("libxml2" ,libxml2)             ;for $XML_CATALOG_FILES
        ("xsltproc" ,libxslt)))
     (inputs
@@ -3917,7 +3936,8 @@ devices that can inject events directly into the input subsystem.")
     (native-inputs
      (list pkg-config))
     (inputs
-     (list boost libevdev eudev yaml-cpp))
+     (list (boost-package 'boost) (xorg-package 'libevdev) eudev
+           (serialization-package 'yaml-cpp)))
     (arguments
      `(#:tests? #f))                    ; no test suite
     (synopsis "Utilities for operating on input events of evdev devices")
@@ -3951,7 +3971,7 @@ devices that can inject events directly into the input subsystem.")
                 "0s49vbg3j4rwh78i8rx8qr7myql09p7b3lhrjl0p7dd98xp6ann6"))))
     (build-system gnu-build-system)
     (inputs
-     (list libevdev yaml-cpp))
+     (list (xorg-package 'libevdev) (serialization-package 'yaml-cpp)))
     (arguments
      `(#:make-flags (list ,(string-append "CC=" (cc-for-target))
                           ,(string-append "CXX=" (cxx-for-target))
@@ -4121,7 +4141,7 @@ mapper.  Kernel components are part of Linux-libre.")
      `(("automake" ,automake)
        ("autoreconf" ,autoconf)))
     (inputs
-     (list boost expat libaio))
+     (list (boost-package 'boost) expat libaio))
     (synopsis "Tools for manipulating the metadata of device-mapper targets")
     (description "A suite of tools for manipulating the metadata of the
 dm-thin, dm-cache and dm-era device-mapper targets.")
@@ -4372,7 +4392,8 @@ country-specific regulations for the wireless spectrum.")
         (base32 "1ipf6wjx037sqyhy0r5jh4983h216anq9l68ckn2x5c3qc4wfmzn"))
        (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
     (build-system gnu-build-system)
-    (inputs (list rrdtool perl kmod gnuplot))
+    (inputs (list (rrdtool-package 'rrdtool) perl kmod
+                  (maths-package 'gnuplot)))
     (native-inputs (list pkg-config flex bison which))
     (outputs '("lib"                    ; avoid perl in closure
                "out"))
@@ -4516,7 +4537,7 @@ SMBus access.")
                 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
     (build-system gnu-build-system)
     (inputs `(("lm-sensors" ,lm-sensors "lib")
-              ("gtk" ,gtk+-2)))
+              ("gtk" ,(gtk-package 'gtk+-2))))
     (native-inputs (list pkg-config))
     (arguments
      `(#:phases
@@ -4589,9 +4610,9 @@ in a digital read-out.")
            numactl                   ;for 'perf bench numa mem'
            ;; Documentation.
            libxml2                                ;for $XML_CATALOG_FILES
-           docbook-xsl
+           (docbook-package 'docbook-xsl)
            xmlto
-           asciidoc))
+           (documentation-package 'asciidoc)))
     (home-page "https://perf.wiki.kernel.org/")
     (synopsis "Linux profiling with performance counters")
     (description
@@ -4699,7 +4720,7 @@ thanks to the use of namespaces.")
                                  out "/bin/singularity")))
                #t))))))
     (inputs
-     `(("libarchive" ,libarchive)
+     `(("libarchive" ,(backup-package 'libarchive))
        ("python" ,python-wrapper)
        ("zlib" ,zlib)
        ("squashfs-tools" ,squashfs-tools)))
@@ -5213,13 +5234,13 @@ arrays when needed.")
              #t))
          (delete 'configure))))         ; no configure script
     (native-inputs
-     (list perl pkg-config valgrind
+     (list perl pkg-config (valgrind-package 'valgrind)
            ;; For tests.
-           cmocka))
+           (check-package 'cmocka)))
     (inputs
-     `(("json-c" ,json-c)
+     `(("json-c" ,(web-package 'json-c))
        ("libaio" ,libaio)
-       ("liburcu" ,liburcu)
+       ("liburcu" ,(datastructures-package 'liburcu))
        ("lvm2" ,lvm2)
        ("readline" ,readline)
        ("udev" ,eudev)))
@@ -5323,7 +5344,7 @@ applications.")
                  #t))))))
       (inputs
        `(("libaio" ,libaio)
-         ("gnuplot" ,gnuplot)
+         ("gnuplot" ,(maths-package 'gnuplot))
          ("python" ,python-wrapper)))             ;for 'bno_plot.py'
       (synopsis "Block layer IO tracing mechanism")
       (description "Blktrace is a block layer IO tracing mechanism which provides
@@ -5345,7 +5366,7 @@ event traces from the kernel (via the relaying through the debug file system).")
                 "1liig5856crb331dps18mp0s13zbkv7yh007zqhq97m94fcddfhc"))))
     (build-system gnu-build-system)
     (inputs
-     (list libsndfile))
+     (list (pulseaudio-package 'libsndfile)))
     (native-inputs
      (list pkg-config))
     (home-page "https://www.kernel.org/pub/linux/bluetooth/")
@@ -5411,10 +5432,10 @@ Bluetooth audio output devices like headphones or loudspeakers.")
                #t))))))
     (native-inputs
      `(("pkg-config" ,pkg-config)
-       ("rst2man" ,python-docutils)
+       ("rst2man" ,(python-xyz-package 'python-docutils))
        ("gettext" ,gettext-minimal)))
     (inputs
-     (list glib dbus eudev libical readline))
+     (list glib dbus eudev (calendar-package 'libical) readline))
     (home-page "http://www.bluez.org/")
     (synopsis "Linux Bluetooth protocol stack")
     (description
@@ -5575,12 +5596,12 @@ and copy/paste text in the console and in xterm.")
               ("zstd" ,zstd "lib")
               ("zstd:static" ,zstd "static")))
     (native-inputs `(("pkg-config" ,pkg-config)
-                     ("asciidoc" ,asciidoc)
+                     ("asciidoc" ,(documentation-package 'asciidoc))
                      ("python" ,python)
                      ("xmlto" ,xmlto)
                      ;; For building documentation.
                      ("libxml2" ,libxml2)
-                     ("docbook-xsl" ,docbook-xsl)
+                     ("docbook-xsl" ,(docbook-package 'docbook-xsl))
                      ;; For tests.
                      ("acl" ,acl)
                      ("which" ,which)
@@ -5912,7 +5933,8 @@ feature, and a laptop with an accelerometer.  It has no effect on SSDs.")
     (native-inputs
      (list pkg-config))
     (inputs
-     (list libatasmart yaml-cpp))
+     (list (freedesktop-package 'libatasmart)
+           (serialization-package 'yaml-cpp)))
     (home-page "https://github.com/vmatare/thinkfan")
     (synopsis "Simple fan control program")
     (description
@@ -6204,7 +6226,8 @@ from the ntfs-3g package.  It is meant to be used in initrds.")
      `(("ninja" ,ninja)
        ("pkg-config" ,pkg-config)
        ("python" ,python-wrapper)
-       ("python-docutils" ,python-docutils)))     ;for 'rst2man'
+       ;; For 'rst2man'
+       ("python-docutils" ,(python-xyz-package 'python-docutils))))
     (inputs
      `(("libnl" ,libnl)
        ("udev" ,eudev)))
@@ -6304,7 +6327,7 @@ The collection contains a set of bandwidth and latency benchmark such as:
      (list autoconf automake pkg-config))
     (inputs
      `(("libsysfs" ,sysfsutils)
-       ("openssl" ,openssl)))
+       ("openssl" ,(tls-package 'openssl))))
     (synopsis "Random number generator daemon")
     (description
      "Monitor a hardware random number generator, and supply entropy
@@ -6345,7 +6368,7 @@ from that to the system kernel's @file{/dev/random} machinery.")
                             "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
        #:tests? #f)) ;no tests
     (native-inputs `(("gettext" ,gettext-minimal)))
-    (inputs (list pciutils))
+    (inputs (list (xorg-package 'pciutils)))
     (home-page (package-home-page linux-libre))
     (synopsis "CPU frequency and voltage scaling tools for Linux")
     (description
@@ -6484,10 +6507,10 @@ not as a replacement for it.")
      (list intltool perl ; for pod2man
            pkg-config))
     (inputs
-     `(("keyutils" ,keyutils)
+     `(("keyutils" ,(crypto-package 'keyutils))
        ("linux-pam" ,linux-pam)
        ("utils-linux" ,util-linux)
-       ("cryptsetup" ,cryptsetup)
+       ("cryptsetup" ,(cryptsetup-package 'cryptsetup))
        ("lvm2" ,lvm2)
        ("nss" ,nss)))
     (home-page "https://ecryptfs.org/")
@@ -6626,12 +6649,13 @@ exceeded.")
              #~(list)
              #~(list "--enable-unit-tests"))))
     (native-inputs
-     (list cmocka pkg-config))
+     (list (check-package 'cmocka)
+           pkg-config))
     (inputs
      `(("acl" ,acl)                     ; extended attributes (xattr)
        ("libuuid" ,util-linux "lib")
        ("lzo" ,lzo)
-       ("openssl" ,openssl)             ; optional crypto support
+       ("openssl" ,(tls-package 'openssl)) ; optional crypto support
        ("zlib" ,zlib)
        ("zstd" ,zstd "lib")))
     (build-system gnu-build-system)
@@ -6708,7 +6732,9 @@ developers.")
      `(("gettext" ,gettext-minimal)
        ("pkg-config" ,pkg-config)))
     (inputs
-     (list libdrm libpciaccess libxcb ncurses))
+     (list (xdisorg-package 'libdrm)
+           (xorg-package 'libpciaccess)
+           (xorg-package 'libxcb) ncurses))
     (home-page "https://github.com/clbr/radeontop/")
     (synopsis "Usage monitor for AMD Radeon graphics")
     (description "RadeonTop monitors resource consumption on supported AMD
@@ -6924,7 +6950,7 @@ set the screen to be pitch black at a value of 0 (or higher).
     (native-inputs
      (list pkg-config))
     (inputs
-     (list elogind))
+     (list (freedesktop-package 'elogind)))
     (synopsis "Backlight and LED brightness control")
     (description
      "This program allows you read and control device brightness.  Devices
@@ -6949,11 +6975,11 @@ interface in sysfs, which can be accomplished with the included udev rules.")
        (sha256
         (base32 "0cssclk2brhwvn9dm7h5snm2svwy0c8cfr4z2cgkdkac2pfaaxw4"))))
     (native-inputs
-     (list shellcheck))
+     (list (haskell-apps-package 'shellcheck)))
     (inputs
      `(("bash" ,bash)
        ("dbus" ,dbus)
-       ("ethtool" ,ethtool)
+       ("ethtool" ,(networking-package 'ethtool))
        ("eudev" ,eudev)
        ("grep" ,grep)
        ("hdparm" ,hdparm)
@@ -7111,9 +7137,10 @@ every time the power supply source is changed.")
                (wrap-program (string-append out "/bin/tlpui")
                  `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))))))))
     (native-inputs
-     (list `(,glib "bin") gobject-introspection python-discover))
+     (list `(,glib "bin") gobject-introspection
+           (check-package 'python-discover)))
     (inputs
-     (list gtk+ python-pygobject tlp))
+     (list (gtk-package 'gtk+) python-pygobject tlp))
     (home-page "https://github.com/d4nj1/TLPUI")
     (synopsis "User interface for TLP written in Python")
     (description
@@ -7349,8 +7376,8 @@ userspace queueing component and the logging subsystem.")
                          coreutils
                          pkg-config
                          ;; For rst2man, used to generate the manual page.
-                         python-docutils))
-    (inputs (list libarchive talloc))
+                         (python-xyz-package 'python-docutils)))
+    (inputs (list (backup-package 'libarchive) (samba-package 'talloc)))
     (home-page "https://github.com/proot-me/PRoot")
     (synopsis "Unprivileged chroot, bind mount, and binfmt_misc")
     (description
@@ -7371,7 +7398,7 @@ available in the kernel Linux.")
     (name "proot-static")
     (synopsis
      "Unprivileged chroot, bind mount, and binfmt_misc (statically linked)")
-    (inputs `(("talloc" ,talloc/static)))
+    (inputs `(("talloc" ,(samba-package 'talloc/static))))
     (arguments
      (substitute-keyword-arguments (package-arguments proot)
        ((#:make-flags flags)
@@ -7463,7 +7490,7 @@ the MTP device as a file system.")
    (native-inputs
     (list pkg-config
           ;; For tests.
-          check groff))
+          (check-package 'check) groff))
    (inputs
     (list expat libcap libselinux))
    (synopsis "Utility to show process environment")
@@ -7623,7 +7650,7 @@ relevant @file{/dev/vcs*} file(s).")
      ;; The ‘fbgrab’ wrapper can use one of several PPM-to-PNG converters.  We
      ;; choose netpbm simply because it's the smallest.  It still adds ~94 MiB
      ;; to an otherwise tiny package, so we put ‘fbgrab’ in its own output.
-     `(("pnmtopng" ,netpbm)))
+     `(("pnmtopng" ,(netpbm-package 'netpbm))))
     (outputs (list "out" "fbgrab"))
     (arguments
      `(#:make-flags
@@ -7863,7 +7890,8 @@ management tools in userspace.")
     (arguments
      `(#:import-path "github.com/vishvananda/netlink"))
     (native-inputs
-     (list go-golang-org-x-sys go-netns))
+     (list (golang-package 'go-golang-org-x-sys)
+           (networking-package 'go-netns)))
     (home-page "https://github.com/vishvananda/netlink")
     (synopsis "Simple netlink library for Go")
     (description "The netlink package provides a simple netlink library for
@@ -7952,7 +7980,7 @@ compatible with Python's ConfigParser style of .INI files, including RFC
      `(("gettext" ,gettext-minimal)))
     (inputs
      `(("libinih" ,libinih)
-       ("liburcu" ,liburcu)
+       ("liburcu" ,(datastructures-package 'liburcu))
        ("libuuid" ,util-linux "lib")
        ("python" ,python-wrapper)))
     (home-page "https://xfs.wiki.kernel.org/")
@@ -8257,12 +8285,12 @@ types and interfaces and translates so that the X server can use them.")
      (list alsa-lib
            dbus
            eudev
-           ffmpeg
-           gstreamer
-           gst-plugins-base
-           libva
+           (video-package 'ffmpeg)
+           (gstreamer-package 'gstreamer)
+           (gstreamer-package 'gst-plugins-base)
+           (video-package 'libva)
            sbc
-           sdl2))
+           (sdl-package 'sdl2)))
     (home-page "https://pipewire.org/")
     (synopsis "Server and user space API to deal with multimedia pipelines")
     (description
@@ -8301,13 +8329,13 @@ of Linux application development.")
          ;; Skip shrink-runpath, otherwise validate-runpath fails.
          (delete 'shrink-runpath))))
     (inputs (modify-inputs (package-inputs pipewire)
-              (prepend avahi
+              (prepend (avahi-package 'avahi)
                        bluez
-                       jack-2
-                       ldacbt
-                       pulseaudio
-                       vulkan-loader
-                       vulkan-headers)))))
+                       (audio-package 'jack-1)
+                       (audio-package 'ldacbt)
+                       (pulseaudio-package 'pulseaudio)
+                       (vulkan-package 'vulkan-loader)
+                       (vulkan-package 'vulkan-headers))))))
 
 (define-public wireplumber
   (package
@@ -8330,7 +8358,8 @@ of Linux application development.")
     (native-inputs
      (list `(,glib "bin")
            pkg-config))
-    (inputs (list dbus elogind glib lua pipewire-0.3))
+    (inputs (list dbus (freedesktop-package 'elogind) glib
+                  (lua-package 'lua) pipewire-0.3))
     (home-page "https://gitlab.freedesktop.org/pipewire/wireplumber")
     (synopsis "Session / policy manager implementation for PipeWire")
     (description "WirePlumber is a modular session / policy manager for
@@ -8499,7 +8528,7 @@ headers.")
        ;; archives, only object files.
        ;; https://github.com/iovisor/bcc/issues/504
        ("elfutils" ,elfutils)
-       ("luajit" ,luajit)
+       ("luajit" ,(lua-package 'luajit))
        ("python-wrapper" ,python-wrapper)))
     (arguments
      `(;; Tests all require root permissions and a "standard" file hierarchy.

base-commit: 9a31942cabb5c73174aee96ecd873fcf89955a9d
-- 
2.30.2
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYj3TaxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7iPUAP9uEaaVRA36BAxSjDptQCaai9yd
b5eTKOGk8e4enlMwrAD7BTa6VSlBUDcSxfXts5fHe7OfcCJwF7sWOTacCzfRKgM=
=VOYg
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 25 Mar 15:42 +0100
Re: [PATCH 1/6] gnu: audacity: Move into new module to break cycles.
(address . 54539@debbugs.gnu.org)
123ca2707f2c3ddacf080aae3d337553279d4dc9.camel@telenet.be
One of the things I've tried out, is moving 'bc' from (gnu packages
algebra) to (gnu packages base). It allowed removing (gnu packages
algebra) from the imports of many packages. Does this seem reasonable?
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYj3U6xccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7qOqAP410MfbwfGwJ6AlbEvhmuju0zEB
rhmnuuNk8vW0Lb6mhgEAksXmMExp2Lf5euSQ0Ghm6QVvYgH6eTNqrfsZs272vws=
=B61Z
-----END PGP SIGNATURE-----


Z
Z
zimoun wrote on 25 Mar 18:05 +0100
Re: [bug#54539] [PATCH 0/6] Start breaking up import cycles
(name . Liliana Marie Prikler)(address . liliana.prikler@ist.tugraz.at)
CAJ3okZ3VLMiv+Wji5iXOVe2xvFcRXNAifSzO=1n+6QfUgHqu6Q@mail.gmail.com
Hi Liliana and Maxime,

On Fri, 25 Mar 2022 at 09:44, Liliana Marie Prikler
<liliana.prikler@ist.tugraz.at> wrote:

Toggle quote (17 lines)
> The question is (on a per-module basis) whether we consider this cheat
> fine or whether we want to move things into different files (and
> which). I so far haven't heard a good argument for the case of
> audacity I raised. "It breaks cycles" is not good enough when we
> consider the potential existence of other cuts (e.g. "audio-apps",
> although perhaps a more specific "audio-editors" similar to how we have
> "image-viewers" might make more sense), as well as the cheat of lazy
> imports.
>
> simon, you raise some important performance metrics, but there is such
> a thing as optimizing for the wrong metric. There are other variables
> to consider, like time to grep, "does it make sense that X belongs to Y
> and Z doesn't", etc., when it comes to ease of contributing. Declaring
> some modules banned for a given other module has an adverse effect
> here, in my opinion, and thus I claim that we need easily accessible
> ways of using those supposedly banned modules.

To be honest, I am not sure to understand the aim of reorganizing the
modules... I mean, to me, the only important metrics is the
performance of the end-user. If there is no performance improvement
when cutting cycle, then it appears to me pointless to cut cycles. :-)

Moreover, set an arbitrary boundary between packages is... arbitrary.
You can spend close to eternity for discussing "does it make sense
that X belongs to Y and Z doesn't". To me, such activity is like
"tagging" (assign a specific word belonging to a finite set of words),
it is usually a lot of effort and energy for, at the end, few, if not
none, pragmatic outcomes.

Last, for classification (assign a package to one module depending on
the affinity with the other packages of that module), well, it could
almost arbitrary (manual depending of human choice) as it is now or it
could be self-organized depending on the data themself. From my point
of view, it could be interesting to apply some kind of self-organized
map (SOM) and other related things. It could be help for many other
issues as "search". Pointers for what they are worth:



Cheers,
simon
M
M
Maxime Devos wrote on 25 Mar 18:46 +0100
(address . 54539@debbugs.gnu.org)
ca9bff4c2fd315de6f840eb11ce3c9e0b7951fb8.camel@telenet.be
zimoun schreef op vr 25-03-2022 om 18:05 [+0100]:
Toggle quote (5 lines)
> To be honest, I am not sure to understand the aim of reorganizing the
> modules... I mean, to me, the only important metrics is the
> performance of the end-user.  If there is no performance improvement
> when cutting cycle, then it appears to me pointless to cut cycles. :-)

FWIW, there are three goals here:

* Allowing writing stuff like

(use-modules (gnu packages ncurses))
(package
(name "some-terminal-app")
[...]
;; Work-around the ‘search path of dependencies not propagated’ bug.
(native-search-paths (package-native-search-paths ncurses)))

without getting 'unbound variable' errors.
Alternatively, the search-path-specification could be defined in,
say, (guix search-paths) next to $PATH but that proposal seems
to have been rejected.

* Making "compute-guix-derivation" faster by reducing the number of
(uncompiled!) package module files it needs to load.
* Eventually making the ‘incremental compilation’ by fine-grained derivations
proposal from the ‘Faster "guix pull" by incremental compilation and
non-circular modules?’ thread [0] feasible.

As a side benefit, it makes the output of "guix graph --type=module foo"
less cluttered and presumably reduces the module closure (a likely
side-effect of breaking cycles), making "guix show foo" (*) a bit faster.

(*) FWIW, on my machine, "guix show guix" takes 1.6s.


Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYj4ADhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7g65APoDxmOgfnnTrf8Qmjv8ATV+eR8c
OfKnGhbNznvPtKMeVQD/RYvSnEXRm8qz/td+Va+OS5NsOYPj5uRmBNVvE6S39Ak=
=hu6y
-----END PGP SIGNATURE-----


Z
Z
zimoun wrote on 25 Mar 20:33 +0100
(name . Maxime Devos)(address . maximedevos@telenet.be)
CAJ3okZ2t3TsOZJNxst+AJ+YxkhBfi9apFnpAFAmU2UE41sObVA@mail.gmail.com
Hi Maxime,

On Fri, 25 Mar 2022 at 18:46, Maxime Devos <maximedevos@telenet.be> wrote:
Toggle quote (30 lines)
> zimoun schreef op vr 25-03-2022 om 18:05 [+0100]:

> > To be honest, I am not sure to understand the aim of reorganizing the
> > modules... I mean, to me, the only important metrics is the
> > performance of the end-user. If there is no performance improvement
> > when cutting cycle, then it appears to me pointless to cut cycles. :-)
>
> FWIW, there are three goals here:
>
> * Allowing writing stuff like
>
> (use-modules (gnu packages ncurses))
> (package
> (name "some-terminal-app")
> [...]
> ;; Work-around the ‘search path of dependencies not propagated’ bug.
> (native-search-paths (package-native-search-paths ncurses)))
>
> without getting 'unbound variable' errors.
> Alternatively, the search-path-specification could be defined in,
> say, (guix search-paths) next to $PATH but that proposal seems
> to have been rejected.
>
> * Making "compute-guix-derivation" faster by reducing the number of
> (uncompiled!) package module files it needs to load.
>
> * Eventually making the ‘incremental compilation’ by fine-grained derivations
> proposal from the ‘Faster "guix pull" by incremental compilation and
> non-circular modules?’ thread [0] feasible.

Thanks for the detailed and clear explanations. It was my initial
understanding that cutting cycles can improve the performances, and
IMHO, timings are required for comparing apple to apple; as I tried to
explain [1]. Then the thread have let me the impression that the
performance improvement was not the aim -- thanks for clarifying.


Toggle quote (2 lines)
> (*) FWIW, on my machine, "guix show guix" takes 1.6s.

To be precise, "guix show guix" could be drastically improved by
adapting the already existing package.cache, i.e., resume the lengthy

However, such cache would be useless for "guix show -L path/to/others
foo" where performance can be really poor; especially on spinning hard
disk. Well, thanks for working on that by trying to tackle the cycle
of modules.


Cheers,
simon
L
L
Ludovic Courtès wrote on 19 Apr 11:17 +0200
Re: bug#54539: [PATCH 0/6] Start breaking up import cycles
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 54539@debbugs.gnu.org)
875yn5totd.fsf@gnu.org
Hi Maxime,

Maxime Devos <maximedevos@telenet.be> skribis:

Toggle quote (4 lines)
> Import cycles make some packaging things harder and prevent some
> proposed optimisations to "guix pull", let's start eliminating them.
> TBC ...

Sorry for the late reply.

Some of the changes you propose may make sense (and should be applied),
but we shouldn’t overplay the role of such changes.

If you follow the logic, breaking up import cycles would mean, in the
end, having one file per package.

But would that be enough? Probably not, because low-level packages are
bound to depend on high-level packages—e.g., glibc depends on Python,
some other low-level tool might depend on Pandoc (GHC), librsvg depends
on Rust, and so on.

IOW, since the graph of build dependency really is a graph, and not a
tree, there’ll always be import cycles.

(guix self), the module that ‘guix pull’ uses, already automatically
splits package modules into two groups. It’s not as modular as we’d
like, but it’s a start. What would be useful is to come up with metrics
and tools to reduce the closure of the “guix-packages-base” group.

WDYT?

Thanks,
Ludo’.
M
M
Maxime Devos wrote on 19 Apr 11:40 +0200
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 54539@debbugs.gnu.org)
d88bcfc75a8e70ea9c85715bf4ccf14101a252ae.camel@telenet.be
Ludovic Courtès schreef op di 19-04-2022 om 11:17 [+0200]:
Toggle quote (3 lines)
> If you follow the logic, breaking up import cycles would mean, in the
> end, having one file per package.

Not necessarily, (gnu packages minetest) has multiple packages
(minetest and some of its mods) but it doesn't cause any cycles (no
other module, except sort-of (guix build-system minetest), imports it.)

That one appears to be, at least currently, a bit of a special case
though.

Toggle quote (8 lines)
> But would that be enough? Probably not, because low-level packages
> are bound to depend on high-level packages—e.g., glibc depends on
> Python, some other low-level tool might depend on Pandoc (GHC),
> librsvg depends on Rust, and so on.
>
> IOW, since the graph of build dependency really is a graph, and not a
> tree, there’ll always be import cycles.

The graph of build dependencies (in terms of derivations) is a tree,
the build daemon doesn't allow cyclic derivations. So I think that by
letting the module graph be a coarser version of the derivation graph
but still a tree (except for the bootstrap packages gcc, sed, ... whose
modules may import each other).

Toggle quote (7 lines)
> (guix self), the module that ‘guix pull’ uses, already automatically
> splits package modules into two groups.  It’s not as modular as we’d
> like, but it’s a start.  What would be useful is to come up with metrics
> and tools to reduce the closure of the “guix-packages-base” group.
>
> WDYT?

Maybe:

a tool that determines a minimal set of (importing module ->
imported module tuples) that needs to be lazified to reduce the
closure size (in number of modules) in guix-packages-base by N

and:

extend "guix style" to perform these changes

Maybe the ‘number of imports lazified -> number of modules in guix-
packages-base’ function has some sweet spot somewhere.

I think it would be easier though to work our way up before going to
"guix pull" -- first "hello", then "util-linux, then "guile-avahi",
then "guile-ssh", then "sqlite" ... and only eventually guix itself.

Also, even if the closure of "guix-packages-base" cannot be reduced,
making it (mostly) a tree would allow splitting the group into multiple
parts (see ‘Faster "guix pull" by incremental compilation and non-
circular modules?’).

Alternative:

* make _all_ package module imports lazy -- #:autoload everything!

guix-packages-base might then need to be set manually though ...

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYl6DlxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7uCKAP9AakyPVN5WEsiyo9aUZWB/g0fn
nYlZDEMAaoD83b5HnQEAu5Ubu6GcAK8hwD0KSRj/AECHY8juz25R8UCqKHJGWwo=
=xTeP
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 19 Apr 17:31 +0200
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 54539@debbugs.gnu.org)
8b494778be379c23209a0864c3a15be413f0143e.camel@telenet.be
Ludovic Courtès schreef op di 19-04-2022 om 11:17 [+0200]:
Toggle quote (7 lines)
> (guix self), the module that ‘guix pull’ uses, already automatically
> splits package modules into two groups.  It’s not as modular as we’d
> like, but it’s a start.  What would be useful is to come up with metrics
> and tools to reduce the closure of the “guix-packages-base” group.
>
> WDYT?

Maybe as a first step, "guix style" could be taught to trim unused
imports? When writing the patches it turned out that some imports were
unnecessary and could therefore be removed ...

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYl7VthccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7o31AQCZaSFOnmNueUvB6YmXLTx2bafZ
0n47qrHPV+dIc53gRwD/ec5htdWDKlv1BsA9CDDDSadR8FVjPYS4AYWojeB69gc=
=ACx9
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 27 Apr 22:59 +0200
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 54539@debbugs.gnu.org)
87r15ii6ou.fsf@gnu.org
Hi!

Maxime Devos <maximedevos@telenet.be> skribis:

Toggle quote (11 lines)
> Ludovic Courtès schreef op di 19-04-2022 om 11:17 [+0200]:
>> (guix self), the module that ‘guix pull’ uses, already automatically
>> splits package modules into two groups.  It’s not as modular as we’d
>> like, but it’s a start.  What would be useful is to come up with metrics
>> and tools to reduce the closure of the “guix-packages-base” group.
>>
>> WDYT?
>
> Maybe as a first step, "guix style" could be taught to trim unused
> imports?

Yes, that would be nice.

Ludo’.
L
L
Ludovic Courtès wrote on 27 Apr 23:04 +0200
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 54539@debbugs.gnu.org)
87h76ei6fk.fsf@gnu.org
Maxime Devos <maximedevos@telenet.be> skribis:

Toggle quote (11 lines)
> Ludovic Courtès schreef op di 19-04-2022 om 11:17 [+0200]:
>> If you follow the logic, breaking up import cycles would mean, in the
>> end, having one file per package.
>
> Not necessarily, (gnu packages minetest) has multiple packages
> (minetest and some of its mods) but it doesn't cause any cycles (no
> other module, except sort-of (guix build-system minetest), imports it.)
>
> That one appears to be, at least currently, a bit of a special case
> though.

I think so. All the historical package modules started that way.

Toggle quote (10 lines)
>> But would that be enough? Probably not, because low-level packages
>> are bound to depend on high-level packages—e.g., glibc depends on
>> Python, some other low-level tool might depend on Pandoc (GHC),
>> librsvg depends on Rust, and so on.
>>
>> IOW, since the graph of build dependency really is a graph, and not a
>> tree, there’ll always be import cycles.
>
> The graph of build dependencies (in terms of derivations) is a tree,

It’s a directed acyclic graph (DAG), not a tree.

Toggle quote (5 lines)
> the build daemon doesn't allow cyclic derivations. So I think that by
> letting the module graph be a coarser version of the derivation graph
> but still a tree (except for the bootstrap packages gcc, sed, ... whose
> modules may import each other).

I thought so, but came to the conclusion that it’s hardly feasible in
practice.

Toggle quote (13 lines)
>> (guix self), the module that ‘guix pull’ uses, already automatically
>> splits package modules into two groups.  It’s not as modular as we’d
>> like, but it’s a start.  What would be useful is to come up with metrics
>> and tools to reduce the closure of the “guix-packages-base” group.
>>
>> WDYT?
>
> Maybe:
>
> a tool that determines a minimal set of (importing module ->
> imported module tuples) that needs to be lazified to reduce the
> closure size (in number of modules) in guix-packages-base by N

Currently ‘source-module-closure’ considers #:autoloaded modules as part
of the closure; we could change that though and indeed, that might prove
helpful in this case.

Toggle quote (7 lines)
> and:
>
> extend "guix style" to perform these changes
>
> Maybe the ‘number of imports lazified -> number of modules in guix-
> packages-base’ function has some sweet spot somewhere.

Could be.

Toggle quote (15 lines)
> I think it would be easier though to work our way up before going to
> "guix pull" -- first "hello", then "util-linux, then "guile-avahi",
> then "guile-ssh", then "sqlite" ... and only eventually guix itself.
>
> Also, even if the closure of "guix-packages-base" cannot be reduced,
> making it (mostly) a tree would allow splitting the group into multiple
> parts (see ‘Faster "guix pull" by incremental compilation and non-
> circular modules?’).
>
> Alternative:
>
> * make _all_ package module imports lazy -- #:autoload everything!
>
> guix-packages-base might then need to be set manually though ...

I don’t know, having spent some time on this, I feel like there’s no
easy solution. But it could be that using autoloads at least in the
right places would help shrink ‘guix-packages-base’. Worth a try!

Ludo’.
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 23/30] gnu: fontutils: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-23-maximedevos@telenet.be
See first commit in the series for the procedure.
This helps with, but is not sufficient for, avoiding Java.
---
gnu/packages/fontutils.scm | 71 ++++++++++++++++++++------------------
1 file changed, 37 insertions(+), 34 deletions(-)

Toggle diff (84 lines)
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index da324a6a9d..0257fff32e 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -34,40 +34,43 @@
 
 (define-module (gnu packages fontutils)
   #:use-module (gnu packages)
-  #:use-module (gnu packages autotools)
-  #:use-module (gnu packages bison)
-  #:use-module (gnu packages check)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages datastructures)
-  #:use-module (gnu packages docbook)
-  #:use-module (gnu packages flex)
-  #:use-module (gnu packages fonts)
-  #:use-module (gnu packages freedesktop)
-  #:use-module (gnu packages fribidi)
-  #:use-module (gnu packages gcc)
-  #:use-module (gnu packages gettext)
-  #:use-module (gnu packages ghostscript)
-  #:use-module (gnu packages glib)
-  #:use-module (gnu packages gnome)
-  #:use-module (gnu packages gperf)
-  #:use-module (gnu packages graphics)
-  #:use-module (gnu packages gtk)
-  #:use-module (gnu packages image)
-  #:use-module (gnu packages java)
-  #:use-module (gnu packages linux)
-  #:use-module (gnu packages man)
-  #:use-module (gnu packages ninja)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages python)
-  #:use-module (gnu packages python-build)
-  #:use-module (gnu packages python-xyz)
-  #:use-module (gnu packages sqlite)
-  #:use-module (gnu packages webkit)
-  #:use-module (gnu packages xdisorg)
-  #:use-module (gnu packages xml)
-  #:use-module (gnu packages xorg)
-  #:use-module (gnu packages tex)
+  #:use-module (gnu packages autotools) ; required by "guix build -d guix"
+  #:autoload (gnu packages bison) (bison)
+  #:autoload (gnu packages check)
+  (check googletest python-pytest python-pytest-cov python-pytest-randomly
+         python-pytest-runner python-pytest-xdist)
+  #:use-module (gnu packages compression) ; required by "guix build -d guix"
+  #:autoload (gnu packages datastructures) (tllist)
+  #:autoload (gnu packages docbook) (docbook-utils)
+  #:autoload (gnu packages flex) (flex)
+  #:use-module (gnu packages fonts) ; required by "guix build -d guix"
+  #:autoload (gnu packages freedesktop) (desktop-file-utils)
+  #:autoload (gnu packages fribidi) (fribidi)
+  #:use-module (gnu packages gettext) ; required by "guix build -d guix"
+  #:use-module (gnu packages ghostscript) ; required by "guix build -d guix"
+  #:autoload (gnu packages glib) (glib gobject-introspection)
+  #:autoload (gnu packages gnome)
+  (gsettings-desktop-schemas json-glib libsoup-minimal-2 vala-0.52 yelp-tools)
+  #:use-module (gnu packages gperf) ; required by "guix build -d guix"
+  #:autoload (gnu packages graphics) (python-booleanoperations skia)
+  #:use-module (gnu packages gtk) ; required by "guix build -d guix"
+  #:use-module (gnu packages image) ; required by "guix build -d guix"
+  #:autoload (gnu packages java) (java-antlr4-runtime-cpp)
+  #:use-module (gnu packages linux) ; required by "guix build -d guix"
+  #:autoload (gnu packages man) (scdoc)
+  #:autoload (gnu packages ninja) (ninja)
+  #:use-module (gnu packages perl) ; required by "guix build -d guix"
+  #:use-module (gnu packages pkg-config) ; required by "guix build -d guix"
+  #:use-module (gnu packages python) ; required by "guix build -d guix"
+  #:autoload (gnu packages python-build)
+  (python-setuptools-scm python-poetry-core python-pypa-build python-wheel)
+  #:use-module (gnu packages python-xyz) ; required by "guix build -d guix"
+  #:autoload (gnu packages sqlite) (sqlite)
+  #:autoload (gnu packages webkit) (webkitgtk-with-libsoup2)
+  #:autoload (gnu packages xdisorg) (pixman)
+  #:use-module (gnu packages xml) ; required by "guix build -d guix"
+  #:use-module (gnu packages xorg) ; required by "guix build -d guix"
+  #:use-module (gnu packages tex) ; required by "guix build -d guix"
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix gexp)
   #:use-module (guix packages)
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 26/30] gnu: ruby: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-26-maximedevos@telenet.be
See first commit in the series for the procedure.
This helps with, but is not sufficient for, avoiding Java.
---
gnu/packages/ruby.scm | 64 +++++++++++++++++++++----------------------
1 file changed, 31 insertions(+), 33 deletions(-)

Toggle diff (83 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index cc95bd8d6e..f4883db0ab 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -48,45 +48,43 @@
 (define-module (gnu packages ruby)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (gnu packages)
-  #:use-module (gnu packages base)
-  #:use-module (gnu packages bison)
-  #:use-module (gnu packages c)
-  #:use-module (gnu packages check)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages crypto)
-  #:use-module (gnu packages curl)
-  #:use-module (gnu packages databases)
-  #:use-module (gnu packages dbm)
-  #:use-module (gnu packages rails)
-  #:use-module (gnu packages readline)
-  #:use-module (gnu packages autotools)
-  #:use-module (gnu packages haskell-xyz)
-  #:use-module (gnu packages java)
-  #:use-module (gnu packages libffi)
-  #:use-module (gnu packages libidn)
-  #:use-module (gnu packages linux)
-  #:use-module (gnu packages lsof)
-  #:use-module (gnu packages man)
-  #:use-module (gnu packages maths)
-  #:use-module (gnu packages ncurses)
-  #:use-module (gnu packages networking)
-  #:use-module (gnu packages node)
-  #:use-module (gnu packages protobuf)
-  #:use-module (gnu packages python)
-  #:use-module (gnu packages python-xyz)
-  #:use-module (gnu packages ragel)
-  #:use-module (gnu packages rsync)
-  #:use-module (gnu packages sqlite)
-  #:use-module (gnu packages tls)
-  #:use-module (gnu packages version-control)
+  #:use-module (gnu packages base) ; required by "guix build -d guix"
+  #:autoload (gnu packages bison) (bison)
+  #:autoload (gnu packages c) (unifdef)
+  #:use-module (gnu packages compression) ; required by "guix build -d guix"
+  #:autoload (gnu packages crypto) (libsodium)
+  #:autoload (gnu packages curl) (curl)
+  #:use-module (gnu packages databases) ; required by "guix build -d guix"
+  #:use-module (gnu packages dbm) ; required by "guix build -d guix"
+  #:use-module (gnu packages rails) ; required by "guix build -d guix"
+  #:use-module (gnu packages readline) ; required by "guix build -d guix"
+  #:use-module (gnu packages autotools) ; required by "guix build -d guix"
+  #:autoload (gnu packages haskell-xyz) (pandoc)
+  #:autoload (gnu packages java) (icedtea)
+  #:use-module (gnu packages libffi) ; required by "guix build -d guix"
+  #:use-module (gnu packages libidn) ; required by "guix build -d guix"
+  #:use-module (gnu packages linux) ; required by "guix build -d guix"
+  #:use-module (gnu packages lsof) ; required by "guix build -d guix"
+  #:autoload (gnu packages man) (txt2man)
+  #:autoload (gnu packages maths) (itex2mml ruby-asciimath)
+  #:autoload (gnu packages ncurses) (ncurses)
+  #:autoload (gnu packages networking) (czmq zeromq)
+  #:autoload (gnu packages node) (node)
+  #:autoload (gnu packages protobuf) (ruby-protobuf-cucumber)
+  #:autoload (gnu packages python-xyz) (python-ipython python-pygments)
+  #:use-module (gnu packages ragel) ; required by "guix build -d guix"
+  #:autoload (gnu packages rsync) (rsync)
+  #:use-module (gnu packages sqlite) ; required by "guix build -d guix"
+  #:use-module (gnu packages tls) ; required by "guix build -d guix"
+  #:autoload (gnu packages version-control) (git libgit2)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix gexp)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
-  #:use-module (gnu packages xml)
-  #:use-module (gnu packages web)
+  #:use-module (gnu packages xml) ; required by "guix build -d guix"
+  #:autoload (gnu packages web) (gumbo-parser libsass)
   #:use-module (guix build-system ruby)
   #:use-module ((srfi srfi-1) #:select (alist-delete)))
 
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:44 +0200
Re: [PATCH v2 30/30] gnu: Autoload more.
(address . 54539@debbugs.gnu.org)
c4e73ab0-175b-3081-1a7b-d7aa90474e47@telenet.be
On 03-09-2022 18:43, Maxime Devos wrote:
Toggle quote (2 lines)
> TODO: check that pulling still works and that
> "./pre-inst-env guix lint --checker=derivation" doesn't report porblems.
(The linter is currently running in the background)
Greetings,
Maxime.
Attachment: OpenPGP_signature
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 29/30] gnu: documentation: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-29-maximedevos@telenet.be
See first commit in the series for the procedure.
---
gnu/packages/documentation.scm | 43 +++++++++++++++++-----------------
1 file changed, 22 insertions(+), 21 deletions(-)

Toggle diff (56 lines)
diff --git a/gnu/packages/documentation.scm b/gnu/packages/documentation.scm
index 585a295fb4..c46db10a02 100644
--- a/gnu/packages/documentation.scm
+++ b/gnu/packages/documentation.scm
@@ -40,27 +40,28 @@ (define-module (gnu packages documentation)
   #:use-module (guix build-system qt)
   #:use-module (guix deprecation)
   #:use-module (gnu packages)
-  #:use-module (gnu packages autotools)
-  #:use-module (gnu packages backup)
-  #:use-module (gnu packages base)
-  #:use-module (gnu packages bash)
-  #:use-module (gnu packages check)
-  #:use-module (gnu packages python)
-  #:use-module (gnu packages python-xyz)
-  #:use-module (gnu packages bison)
-  #:use-module (gnu packages kde-frameworks)
-  #:use-module (gnu packages docbook)
-  #:use-module (gnu packages flex)
-  #:use-module (gnu packages graphviz)
-  #:use-module (gnu packages gettext)
-  #:use-module (gnu packages glib)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages qt)
-  #:use-module (gnu packages sqlite)
-  #:use-module (gnu packages sphinx)
-  #:use-module (gnu packages xml)
-  #:use-module (gnu packages xorg))
+  #:autoload (gnu packages autotools) (autoconf)
+  #:autoload (gnu packages backup) (libarchive)
+  #:use-module (gnu packages bash) ; required by "guix build -d guix"
+  #:autoload (gnu packages check) (python-pytest python-pytest-asyncio)
+  #:use-module (gnu packages python) ; required by "guix build -d guix"
+  #:autoload (gnu packages python-xyz)
+  (python-docutils python-ipython python-jinja2 python-matplotlib python-numpy)
+  #:use-module (gnu packages bison) ; required by "guix build -d guix"
+  #:autoload (gnu packages kde-frameworks) (extra-cmake-modules)
+  #:autoload (gnu packages docbook) (docbook-xml docbook-xml-4.2 docbook-xsl)
+  #:use-module (gnu packages flex) ; required by "guix build -d guix"
+  #:autoload (gnu packages gettext) (gettext-minimal)
+  #:autoload (gnu packages glib) (intltool)
+  #:autoload (gnu packages perl) (perl)
+  #:autoload (gnu packages pkg-config) (pkg-config)
+  #:autoload (gnu packages qt)
+  (qtbase-5 qtdeclarative-5 qtquickcontrols-5 qtwebchannel-5 qtwebengine-5
+            qtx11extras)
+  #:autoload (gnu packages sqlite) (sqlite)
+  #:autoload (gnu packages sphinx) (python-sphinx)
+  #:use-module (gnu packages xml) ; required by "guix build -d guix"
+  #:autoload (gnu packages xorg) (xcb-util-keysyms))
 
 (define-public latex2html
   (package
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 27/30] gnu: python-xyz: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-27-maximedevos@telenet.be
See first commit in the series for the procedure.
---
gnu/packages/python-xyz.scm | 282 +++++++++++++++++++++++-------------
1 file changed, 182 insertions(+), 100 deletions(-)

Toggle diff (295 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 30645fc4a0..61d6c32fb6 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -146,106 +146,188 @@
 (define-module (gnu packages python-xyz)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (gnu packages)
-  #:use-module (gnu packages algebra)
-  #:use-module (gnu packages adns)
-  #:use-module (gnu packages aidc)
-  #:use-module (gnu packages attr)
-  #:use-module (gnu packages backup)
-  #:use-module (gnu packages bash)
-  #:use-module (gnu packages check)
-  #:use-module (gnu packages cmake)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages crypto)
-  #:use-module (gnu packages databases)
-  #:use-module (gnu packages dbm)
-  #:use-module (gnu packages django)
-  #:use-module (gnu packages djvu)
-  #:use-module (gnu packages docker)
-  #:use-module (gnu packages documentation)
-  #:use-module (gnu packages enchant)
-  #:use-module (gnu packages file)
-  #:use-module (gnu packages fontutils)
-  #:use-module (gnu packages fonts)
-  #:use-module (gnu packages freedesktop)
-  #:use-module (gnu packages gdb)
-  #:use-module (gnu packages gcc)
-  #:use-module (gnu packages geo)
-  #:use-module (gnu packages ghostscript)
-  #:use-module (gnu packages gl)
-  #:use-module (gnu packages glib)
-  #:use-module (gnu packages gnome)
-  #:use-module (gnu packages gnupg)
-  #:use-module (gnu packages graphviz)
-  #:use-module (gnu packages graphics)
-  #:use-module (gnu packages gsasl)
-  #:use-module (gnu packages gstreamer)
-  #:use-module (gnu packages gtk)
-  #:use-module (gnu packages haskell-xyz)
-  #:use-module (gnu packages icu4c)
-  #:use-module (gnu packages inkscape)
-  #:use-module (gnu packages image)
-  #:use-module (gnu packages image-processing)
-  #:use-module (gnu packages imagemagick)
-  #:use-module (gnu packages jupyter)
-  #:use-module (gnu packages kerberos)
-  #:use-module (gnu packages libevent)
-  #:use-module (gnu packages libffi)
-  #:use-module (gnu packages libidn)
-  #:use-module (gnu packages libusb)
-  #:use-module (gnu packages linux)
-  #:use-module (gnu packages llvm)
-  #:use-module (gnu packages man)
-  #:use-module (gnu packages markup)
-  #:use-module (gnu packages maths)
-  #:use-module (gnu packages monitoring)
-  #:use-module (gnu packages multiprecision)
-  #:use-module (gnu packages networking)
-  #:use-module (gnu packages ncurses)
-  #:use-module (gnu packages node)
-  #:use-module (gnu packages ninja)
-  #:use-module (gnu packages openstack)
-  #:use-module (gnu packages pcre)
-  #:use-module (gnu packages pdf)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages photo)
-  #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages protobuf)
-  #:use-module (gnu packages python)
-  #:use-module (gnu packages python-build)
-  #:use-module (gnu packages python-check)
-  #:use-module (gnu packages python-compression)
-  #:use-module (gnu packages python-crypto)
-  #:use-module (gnu packages python-science)
-  #:use-module (gnu packages python-web)
-  #:use-module (gnu packages qt)
-  #:use-module (gnu packages rdf)
-  #:use-module (gnu packages readline)
-  #:use-module (gnu packages regex)
-  #:use-module (gnu packages sdl)
-  #:use-module (gnu packages scanner)
-  #:use-module (gnu packages search)
-  #:use-module (gnu packages serialization)
-  #:use-module (gnu packages shells)
-  #:use-module (gnu packages sphinx)
-  #:use-module (gnu packages ssh)
-  #:use-module (gnu packages swig)
-  #:use-module (gnu packages terminals)
-  #:use-module (gnu packages tex)
-  #:use-module (gnu packages texinfo)
-  #:use-module (gnu packages textutils)
-  #:use-module (gnu packages time)
-  #:use-module (gnu packages tls)
-  #:use-module (gnu packages version-control)
-  #:use-module (gnu packages video)
-  #:use-module (gnu packages web)
-  #:use-module (gnu packages wxwidgets)
-  #:use-module (gnu packages base)
-  #:use-module (gnu packages xml)
-  #:use-module (gnu packages xorg)
-  #:use-module (gnu packages xdisorg)
-  #:use-module (gnu packages tcl)
-  #:use-module (gnu packages bdw-gc)
-  #:use-module (gnu packages serialization)
+  #:autoload (gnu packages algebra) (eigen pari-gp symengine)
+  #:autoload (gnu packages adns) (c-ares)
+  #:autoload (gnu packages aidc) (zbar)
+  #:autoload (gnu packages attr) (attr)
+  #:autoload (gnu packages bash) (bash bash-minimal)
+  #:autoload (gnu packages backup) (libarchive)
+  #:autoload (gnu packages check)
+  (catch-framework2-1
+   check python-codecov python-coverage python-coverage-test-runner
+   python-fixtures python-fixtures-bootstrap python-flaky python-flexmock
+   python-freezegun python-hypothesis python-hypothesis-next
+   python-hypothesmith python-mock python-nose python-nose-random python-nose2
+   python-nosexcover python-parameterized python-pyfakefs python-pyhamcrest
+   python-pylint python-pytest python-pytest-6 python-pytest-asyncio
+   python-pytest-bootstrap python-pytest-cache python-pytest-catchlog
+   python-pytest-cov python-pytest-dependency python-pytest-enabler
+   python-pytest-enabler-bootstrap python-pytest-flakes python-pytest-forked
+   python-pytest-freezegun python-pytest-lazy-fixture python-pytest-localserver
+   python-pytest-mock python-pytest-mypy python-pytest-pep8 python-pytest-runner
+   python-pytest-sugar python-pytest-timeout python-pytest-xdist
+   python-pytest-xprocess python-rednose python-testpath python-testrepository
+   python-testrepository-bootstrap python-testresources-bootstrap
+   python-testscenarios python-testscenarios-bootstrap python-testtools
+   python-testtools-bootstrap python-unittest2)
+  #:autoload (gnu packages cmake) (cmake cmake-minimal)
+  #:use-module (gnu packages compression) ; required by "guix build -d guix"
+  #:autoload (gnu packages databases)
+  (memcached
+   postgresql python-fakeredis python-pickleshare python-redis
+   python-sqlalchemy python-sqlalchemy-utils python-sqlparse)
+  #:autoload (gnu packages dbm) (bdb)
+  #:autoload (gnu packages django) (python-django python-pytest-django)
+  #:autoload (gnu packages djvu) (djvulibre)
+  #:autoload (gnu packages docker) (python-docker tini)
+  #:autoload (gnu packages documentation) (python-docrepr)
+  #:autoload (gnu packages enchant) (python-pyenchant)
+  #:use-module (gnu packages file) ; required by "guix build -d guix"
+  #:autoload (gnu packages fontutils) (fontconfig fontforge freetype libraqm)
+  #:autoload (gnu packages fonts) (font-gnu-freefont)
+  #:autoload (gnu packages freedesktop) (libappindicator python-pyxdg)
+  #:autoload (gnu packages gdb) (gdb)
+  #:autoload (gnu packages gcc) (gfortran)
+  #:autoload (gnu packages geo) (geos)
+  #:autoload (gnu packages ghostscript) (ghostscript lcms)
+  #:autoload (gnu packages gl) (freeglut glew glu mesa)
+  #:autoload (gnu packages glib)
+  (dbus dbus-glib glib gobject-introspection python-pygobject)
+  #:autoload (gnu packages gnome)
+  (gsettings-desktop-schemas libnotify python-pyatspi zenity)
+  #:autoload (gnu packages gnupg) (gnupg python-gpg)
+  #:autoload (gnu packages graphics) (coin3D-4 python-pastel)
+  #:autoload (gnu packages graphviz) (graphviz python-graphviz python-pydot)
+  #:autoload (gnu packages gstreamer) (gstreamer)
+  #:autoload (gnu packages gtk)
+  (cairo gdk-pixbuf gtk+ gtksourceview-3 python-pycairo)
+  #:autoload (gnu packages haskell-xyz) (pandoc)
+  #:autoload (gnu packages icu4c) (icu4c)
+  #:autoload (gnu packages inkscape) (inkscape/stable)
+  #:autoload (gnu packages image)
+  (giflib libimagequant libjpeg-turbo libpng libtiff libwebp openjpeg)
+  #:autoload (gnu packages image-processing) (vips)
+  #:autoload (gnu packages imagemagick) (imagemagick)
+  #:autoload (gnu packages jupyter)
+  (python-jupyterlab-pygments python-jupyterlab-widgets python-nbclient)
+  #:autoload (gnu packages kerberos) (mit-krb5)
+  #:autoload (gnu packages libevent) (libev)
+  #:autoload (gnu packages libffi) (python-cffi)
+  #:autoload (gnu packages libidn) (libidn)
+  #:autoload (gnu packages libusb) (libusb)
+  #:autoload (gnu packages linux)
+  (alsa-lib fuse fuse-3 iproute procps wireless-tools)
+  #:autoload (gnu packages llvm) (python-llvmlite)
+  #:autoload (gnu packages man) (man-db)
+  #:autoload (gnu packages markup) (md4c python-cmarkgfm)
+  #:autoload (gnu packages maths)
+  (double-conversion hdf4 hdf5 hdf5-1.10 netcdf openblas python-kiwisolver
+                     qhull)
+  #:autoload (gnu packages monitoring) (python-prometheus-client)
+  #:autoload (gnu packages multiprecision) (mpfr)
+  #:autoload (gnu packages networking) (librdkafka zeromq)
+  #:autoload (gnu packages ncurses) (dialog ncurses)
+  #:autoload (gnu packages node) (node-lts)
+  #:autoload (gnu packages ninja) (ninja)
+  #:autoload (gnu packages openstack) (python-os-testr python-stevedore)
+  #:autoload (gnu packages pdf) (poppler qpdf)
+  #:autoload (gnu packages perl) (perl)
+  #:autoload (gnu packages photo) (libgphoto2 libraw)
+  #:autoload (gnu packages pkg-config) (pkg-config)
+  #:autoload (gnu packages protobuf) (python-protobuf)
+  #:autoload (gnu packages python) (python python-2 python-wrapper)
+  #:use-module (gnu packages python-build) ; required by "guix build -d guix"
+  #:autoload (gnu packages python-check)
+  (python-allpairspy
+   python-atpublic python-covdefaults python-coveralls python-mypy
+   python-mypy-extensions python-nbval python-pylama python-pytest-aiohttp
+   python-pytest-astropy python-pytest-benchmark python-pytest-celery
+   python-pytest-checkdocs python-pytest-flake8 python-pytest-isort
+   python-pytest-mockito python-pytest-qt python-pytest-rerunfailures
+   python-pytest-subtests python-pytest-toolbox python-pytest-tornado
+   python-pytest-trio python-pytest-virtualenv python-testfixtures)
+  #:autoload (gnu packages python-compression)
+  (python-lz4 python-zipp python-zopfli)
+  #:autoload (gnu packages python-crypto)
+  (python-paramiko
+   python-cryptography python-pynacl python-ecdsa python-certifi
+   python-kerberos python-pyopenssl python-argon2-cffi python-keyring
+   python-pycrypto python-trustme python-service-identity python-josepy
+   python-pyaes)
+  #:autoload (gnu packages python-web)
+  (python-aiodns
+   python-aiohttp python-aws-xray-sdk python-branca python-cachecontrol
+   python-cfn-lint python-cssselect python-cssselect2 python-flask
+   python-flask-cors python-flask-restful python-genshi python-geventhttpclient
+   python-gitlab python-html5lib python-hyperlink python-jose python-parsel
+   python-pyowm python-requests python-requests-mock python-requests-oauthlib
+   python-requests-toolbelt python-requests-unixsocket python-requests_ntlm
+   python-responses python-s3transfer python-selenium python-slugify
+   python-smart-open python-terminado python-tinycss python-tinycss2
+   python-tornado python-tornado-6 python-translation-finder python-treq
+   python-urllib3 python-uvloop python-w3lib python-webencodings python-webob
+   python-webtest python-werkzeug python-wsproto python-zope-event
+   python-zope-interface)
+  #:autoload (gnu packages python-science) (python-pandas python-scipy)
+  #:autoload (gnu packages qt)
+  (python-pyqt
+   python-pyqt-without-qtwebkit python-pyqt+qscintilla python-qtpy qtbase-5
+   qttools-5 soqt)
+  #:autoload (gnu packages rdf) (python-rdflib-5)
+  #:autoload (gnu packages readline) (readline)
+  #:autoload (gnu packages regex) (re2)
+  #:autoload (gnu packages sdl)
+  (sdl2 sdl2-gfx sdl2-image sdl2-mixer sdl2-ttf sdl-union)
+  #:autoload (gnu packages scanner) (sane-backends)
+  #:autoload (gnu packages serialization) (#;python-breathe)
+  #:autoload (gnu packages shells) (fish tcsh)
+  #:autoload (gnu packages sphinx)
+  (python-breathe
+   python-mpl-sphinx-theme python-pydata-sphinx-theme python-sphinx
+   python-sphinx-argparse python-sphinx-autodoc-typehints
+   python-sphinx-copybutton python-sphinx-gallery python-sphinx-panels
+   python-sphinx-rtd-theme python-sphinxcontrib-github-alt
+   python-sphinxcontrib-svg2pdfconverter)
+  #:autoload (gnu packages ssh) (openssh)
+  #:autoload (gnu packages swig) (swig)
+  #:autoload (gnu packages terminals) (python-curtsies)
+  #:autoload (gnu packages tex)
+  (texlive-adjustbox
+   texlive-amsfonts texlive-amsmath texlive-babel texlive-bin texlive-booktabs
+   texlive-caption texlive-cbfonts texlive-cm-super texlive-enumitem
+   texlive-etoolbox texlive-eurosym texlive-fonts-ec texlive-fonts-rsfs
+   texlive-fontspec texlive-generic-iftex texlive-greek-fontenc texlive-grffile
+   texlive-hyperref texlive-jknappen texlive-latex-expdlist
+   texlive-latex-fancyvrb texlive-latex-float texlive-latex-geometry
+   texlive-latex-jknapltx texlive-latex-ms texlive-latex-parskip
+   texlive-latex-trimspaces texlive-latex-type1cm texlive-latex-ucs
+   texlive-latex-upquote texlive-lm texlive-lm-math texlive-mathpazo
+   texlive-oberdiek texlive-polyglossia texlive-stringenc texlive-tcolorbox
+   texlive-times texlive-titling texlive-tools texlive-ulem texlive-underscore
+   texlive-unicode-math texlive-updmap.cfg texlive-xcolor texlive-xindy
+   texlive-zapfding)
+  #:autoload (gnu packages texinfo) (texinfo)
+  #:autoload (gnu packages textutils) (python-editdistance python-pandocfilters)
+  #:autoload (gnu packages time)
+  (python-aniso8601 python-arrow python-dateutil python-iso8601
+                    python-monotonic python-pytz python-tzlocal)
+  #:autoload (gnu packages tls) (python-acme)
+  #:autoload (gnu packages version-control)
+  (git git-minimal libgit2 python-ghp-import python-gitpython)
+  #:autoload (gnu packages video) (ffmpeg libmediainfo youtube-dl)
+  #:autoload (gnu packages web)
+  (jq libsass libyajl python-httpretty tidy)
+  #:autoload (gnu packages wxwidgets) (python-wxpython)
+  #:autoload (gnu packages base) (coreutils which tzdata-for-tests)
+  #:autoload (gnu packages xml)
+  (python-defusedxml python-lxml python-untangle python-xmlschema
+                     python-xmltodict)
+  #:autoload (gnu packages xorg)
+  (libice libx11 libxcb libxext libxi libxtst xorg-server xorg-server-for-tests
+          xvfb-run)
+  #:autoload (gnu packages xdisorg) (python-pyperclip scrot wmctrl xdotool)
+  #:autoload (gnu packages tcl) (tcl tk)
+  #:autoload (gnu packages serialization) (libyaml python-ruamel.yaml)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix gexp)
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 22/30] gnu: tcl: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-22-maximedevos@telenet.be
See first commit in the series for the procedure.
---
gnu/packages/tcl.scm | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)

Toggle diff (26 lines)
diff --git a/gnu/packages/tcl.scm b/gnu/packages/tcl.scm
index 4cbc9d84b4..8370e51015 100644
--- a/gnu/packages/tcl.scm
+++ b/gnu/packages/tcl.scm
@@ -34,13 +34,12 @@ (define-module (gnu packages tcl)
   #:use-module (guix build-system go)
   #:use-module (guix build-system perl)
   #:use-module (gnu packages)
-  #:use-module (gnu packages image)
-  #:use-module (gnu packages fontutils)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages tls)
-  #:use-module (gnu packages xml)
-  #:use-module (gnu packages xorg)
+  #:autoload (gnu packages image) (libjpeg-turbo libpng)
+  #:use-module (gnu packages fontutils) ; required by "guix build -d guix"
+  #:use-module (gnu packages pkg-config) ; required by "guix build -d guix"
+  #:autoload (gnu packages tls) (openssl)
+  #:autoload (gnu packages xml) (libxml2 libxslt)
+  #:use-module (gnu packages xorg) ; required by "guix build -d guix"
   #:use-module ((guix licenses) #:prefix license:))
 
 (define-public tcl
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 25/30] gnu: xml: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-25-maximedevos@telenet.be
See first commit in the series for the procedure.
This helps with, but is not sufficient for, avoiding Java.
---
gnu/packages/xml.scm | 47 +++++++++++++++++++++++++-------------------
1 file changed, 27 insertions(+), 20 deletions(-)

Toggle diff (60 lines)
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index c3213b8f36..337b6e2f99 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -51,26 +51,33 @@
 
 (define-module (gnu packages xml)
   #:use-module (gnu packages)
-  #:use-module (gnu packages base)
-  #:use-module (gnu packages autotools)
-  #:use-module (gnu packages check)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages curl)
-  #:use-module (gnu packages docbook)
-  #:use-module (gnu packages documentation)
-  #:use-module (gnu packages gettext)
-  #:use-module (gnu packages glib)
-  #:use-module (gnu packages gnome)
-  #:use-module (gnu packages gnupg)
-  #:use-module (gnu packages graphviz)
-  #:use-module (gnu packages gtk)
-  #:use-module (gnu packages java)
-  #:use-module (gnu packages nss)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages perl-check)
-  #:use-module (gnu packages python)
-  #:use-module (gnu packages tls)
-  #:use-module (gnu packages web)
+  #:autoload (gnu packages base) (gnu-make which)
+  #:autoload (gnu packages autotools)
+  (autoconf automake libltdl libtool)
+  #:autoload (gnu packages check) (python-coverage python-nose python-pytest)
+  #:use-module (gnu packages compression) ; required by "guix build -d guix"
+  #:autoload (gnu packages curl) (curl)
+  #:autoload (gnu packages docbook) (docbook-xml-4.1.2 docbook-xsl)
+  #:autoload (gnu packages gettext) (gettext-minimal)
+  #:autoload (gnu packages glib) (appstream-glib glib gobject-introspection)
+  #:use-module (gnu packages gnupg) ; required by "guix build -d guix"
+  #:autoload (gnu packages gtk) (gtk-doc/stable)
+  #:autoload (gnu packages java)
+  (icedtea-8
+   java-cglib java-classpathx-servletapi java-jdom java-joda-time java-junit
+   java-stax2-api java-testng java-woodstox-core java-xerces)
+  #:autoload (gnu packages nss) (nss)
+  #:use-module (gnu packages perl) ; required by "guix build -d guix"
+  #:autoload (gnu packages perl-check)
+  (perl-test-deep
+   perl-test-differences perl-test-manifest perl-test-pod
+   perl-test-pod-coverage)
+  #:use-module (gnu packages python) ; required by "guix build -d guix"
+  #:autoload (gnu packages tls) (gnutls openssl)
+  #:autoload (gnu packages web)
+  (perl-feed-find
+   perl-html-parser perl-html-tagset perl-html-tidy perl-html-tree perl-libwww
+   perl-uri perl-uri-fetch)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix gexp)
   #:use-module (guix packages)
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 05/30] gnu: perl: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-5-maximedevos@telenet.be
See first commit in the series for the procedure.
---
gnu/packages/perl.scm | 68 ++++++++++++++++++++++++++-----------------
1 file changed, 41 insertions(+), 27 deletions(-)

Toggle diff (81 lines)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 42c7d18c9d..cd80ec8999 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -59,33 +59,47 @@ (define-module (gnu packages perl)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
-  #:use-module (gnu packages base)
-  #:use-module (gnu packages bash)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages databases)
-  #:use-module (gnu packages fontutils)
-  #:use-module (gnu packages freedesktop)
-  #:use-module (gnu packages gcc)
-  #:use-module (gnu packages gd)
-  #:use-module (gnu packages gl)
-  #:use-module (gnu packages gtk)
-  #:use-module (gnu packages hurd)
-  #:use-module (gnu packages image)
-  #:use-module (gnu packages less)
-  #:use-module (gnu packages ncurses)
-  #:use-module (gnu packages perl-check)
-  #:use-module (gnu packages perl-compression)
-  #:use-module (gnu packages perl-maths)
-  #:use-module (gnu packages perl-web)
-  #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages python)
-  #:use-module (gnu packages readline)
-  #:use-module (gnu packages sdl)
-  #:use-module (gnu packages textutils)
-  #:use-module (gnu packages video)
-  #:use-module (gnu packages web)
-  #:use-module (gnu packages xml)
-  #:use-module (gnu packages xorg))
+  #:use-module (gnu packages base) ; required by "guix build guix"
+  #:autoload (gnu packages bash) (bash-minimal)
+  #:autoload (gnu packages compression) (zlib)
+  #:autoload (gnu packages databases) (perl-dbd-mysql)
+  #:autoload (gnu packages fontutils) (fontconfig freetype)
+  #:autoload (gnu packages freedesktop) (perl-file-mimeinfo)
+  #:autoload (gnu packages gcc) (gcc-7)
+  #:autoload (gnu packages gd) (perl-gd)
+  #:autoload (gnu packages gl) (freeglut mesa)
+  #:autoload (gnu packages gtk) (pango)
+  #:autoload (gnu packages hurd) ()
+  #:autoload (gnu packages image) (libjpeg-turbo libpng libtiff)
+  #:autoload (gnu packages less) (less)
+  #:autoload (gnu packages ncurses) (ncurses)
+  #:autoload (gnu packages perl-check)
+  (perl-mock-config
+   perl-test-base perl-test-cleannamespaces perl-test-deep perl-test-differences
+   perl-test-distribution perl-test-exception perl-test-failwarnings
+   perl-test-fatal perl-test-file-sharedir-dist perl-test-filename
+   perl-test-harness perl-test-leaktrace perl-test-memory-cycle
+   perl-test-mockobject perl-test-mocktime perl-test-more-utf8 perl-test-most
+   perl-test-needs perl-test-nowarnings perl-test-number-delta perl-test-object
+   perl-test-output perl-test-pod perl-test-pod-coverage perl-test-requires
+   perl-test-sharedfork perl-test-script perl-test-simple perl-test-subcalls
+   perl-test-portability-files perl-test-trap perl-test-warn perl-test-warnings
+   perl-test-without-module perl-test-yaml perl-test2-plugin-nowarnings
+   perl-test2-suite)
+  #:autoload (gnu packages perl-compression)
+  (perl-archive-extract perl-archive-zip)
+  #:autoload (gnu packages perl-maths) (perl-math-cephes perl-math-matrixreal)
+  #:autoload (gnu packages perl-web) (perl-mojolicious)
+  #:autoload (gnu packages pkg-config) (pkg-config)
+  #:autoload (gnu packages python) (python)
+  #:autoload (gnu packages readline) (readline)
+  #:autoload (gnu packages sdl)
+  (sdl sdl-gfx sdl-image sdl-mixer sdl-net sdl-pango sdl-ttf sdl-union)
+  #:autoload (gnu packages textutils) (libconfig)
+  #:autoload (gnu packages video) (libsmpeg)
+  #:autoload (gnu packages web) (perl-html-parser perl-http-lite perl-uri)
+  #:autoload (gnu packages xml) (libxslt)
+  #:autoload (gnu packages xorg) (libxi libxmu))
 
 ;;;
 ;;; Please: Try to add new module packages in alphabetic order.
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 01/30] gnu: package-management: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-1-maximedevos@telenet.be
Goal: reduce the amount of modules that "compute-guix-derivation" needs to
load (reducing memory usage). As a side benefit, the start-up latency
of various "guix build ..." commands should decrease -- at worst, it should
remain as the same as before.

Delete #:use-module, check that "./pre-inst-env guix build -d guix" still
works. If so, turn the use-module into an #:autoload. If not, reinstate
the #:use-module. Some imported modules are loaded anyway by dependencies
and as such could theoretically be left intact for the purposes of
https://issues.guix.gnu.org/54539, but that's more developer work for no
apparent benefit.

Sometimes, the module wasn't used at all. In that case, it is removed.

On its own, this commit doesn't accomplish much, so a report will be given
in the latest commit of the series.
---
gnu/packages/package-management.scm | 155 +++++++++++++++-------------
1 file changed, 86 insertions(+), 69 deletions(-)

Toggle diff (176 lines)
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 519924737c..1c7b90f8c4 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -40,76 +40,93 @@
 (define-module (gnu packages package-management)
   #:use-module (gnu artwork)
   #:use-module (gnu packages)
-  #:use-module (gnu packages acl)
-  #:use-module (gnu packages attr)
-  #:use-module (gnu packages avahi)
-  #:use-module (gnu packages autotools)
-  #:use-module (gnu packages backup)
-  #:use-module (gnu packages base)
-  #:use-module (gnu packages bash)
-  #:use-module (gnu packages bdw-gc)
-  #:use-module (gnu packages bison)
-  #:use-module (gnu packages boost)
+  #:autoload (gnu packages attr) (attr)
+  #:autoload (gnu packages avahi) (avahi)
+  #:use-module (gnu packages autotools) ; required by "guix build -d guix"
+  #:use-module (gnu packages backup) ; required by "guix build -d guix"
+  #:use-module (gnu packages base) ; required by "guix build -d guix"
+  #:autoload (gnu packages bash) (bash-minimal)
+  #:autoload (gnu packages bdw-gc) (libgc)
+  #:autoload (gnu packages bison) (bison)
+  #:autoload (gnu packages boost) (boost)
+  ;; required by "guix build -d guix"
   #:use-module (gnu packages bootstrap)          ;for 'bootstrap-guile-origin'
-  #:use-module (gnu packages build-tools)
-  #:use-module (gnu packages check)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages cmake)
-  #:use-module (gnu packages cpio)
-  #:use-module (gnu packages crypto)
-  #:use-module (gnu packages curl)
-  #:use-module (gnu packages databases)
-  #:use-module (gnu packages dejagnu)
-  #:use-module (gnu packages dbm)
-  #:use-module (gnu packages docbook)
-  #:use-module (gnu packages file)
-  #:use-module (gnu packages flex)
-  #:use-module (gnu packages gcc)
-  #:use-module (gnu packages gettext)
-  #:use-module (gnu packages glib)
-  #:use-module (gnu packages gnome)
-  #:use-module (gnu packages gnupg)
-  #:use-module (gnu packages graphviz)
-  #:use-module (gnu packages gtk)
-  #:use-module (gnu packages guile)
-  #:use-module (gnu packages guile-xyz)
-  #:use-module (gnu packages hardware)
-  #:use-module (gnu packages hurd)
-  #:use-module (gnu packages imagemagick)
-  #:use-module (gnu packages less)
-  #:use-module (gnu packages libedit)
-  #:use-module (gnu packages linux)
-  #:use-module (gnu packages lisp)
-  #:use-module (gnu packages lua)
-  #:use-module (gnu packages man)
-  #:use-module (gnu packages markup)
-  #:use-module (gnu packages nettle)
-  #:use-module (gnu packages networking)
-  #:use-module (gnu packages ninja)
-  #:use-module (gnu packages nss)
-  #:use-module (gnu packages patchutils)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages perl-check)
-  #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages popt)
-  #:use-module (gnu packages python)
-  #:use-module (gnu packages python-build)
-  #:use-module (gnu packages python-check)
-  #:use-module (gnu packages python-web)
-  #:use-module (gnu packages python-xyz)
-  #:use-module (gnu packages serialization)
-  #:use-module (gnu packages sqlite)
-  #:use-module (gnu packages ssh)
-  #:use-module (gnu packages tcl)
-  #:use-module (gnu packages texinfo)
-  #:use-module (gnu packages time)
-  #:use-module (gnu packages tls)
-  #:use-module (gnu packages vim)
-  #:use-module (gnu packages virtualization)
-  #:use-module (gnu packages web)
-  #:use-module (gnu packages xml)
-  #:use-module (gnu packages xorg)
-  #:use-module (gnu packages version-control)
+  #:autoload (gnu packages build-tools) (meson)
+  #:autoload (gnu packages check)
+  (googletest python-coverage python-freezegun python-mock python-pytest
+              python-pytest-cov python-pytest-mock  python-pytest-timeout
+              python-parameterized python-pytest-xdist)
+  #:use-module (gnu packages compression) ; required by "guix build -d guix"
+  #:autoload (gnu packages cmake) (cmake)
+  #:autoload (gnu packages cpio) (cpio)
+  #:autoload (gnu packages crypto) (libsodium)
+  #:autoload (gnu packages curl) (curl)
+  #:autoload (gnu packages databases) (sqitch)
+  #:autoload (gnu packages dejagnu) (dejagnu)
+  #:autoload (gnu packages dbm) (bdb)
+  #:autoload (gnu packages docbook) (docbook-xml docbook-xsl)
+  #:autoload (gnu packages file) (file)
+  #:autoload (gnu packages flex) (flex)
+  #:use-module (gnu packages gettext) ; required by "guix build -d guix"
+  #:autoload (gnu packages glib)
+  (glib intltool gobject-introspection dbus appstream-glib xdg-dbus-proxy)
+  #:autoload (gnu packages gnome)
+  (vala libgsf libsoup-minimal-2 dconf json-glib glib-networking
+        gsettings-desktop-schemas)
+  #:use-module (gnu packages gnupg) ; required by "guix build -d guix"
+  #:use-module (gnu packages graphviz) ; required by "guix build -d guix"
+  #:autoload (gnu packages gtk)
+  (guile-rsvg guile-cairo gdk-pixbuf)
+  #:use-module (gnu packages guile) ; required by "guix build -d guix"
+  #:use-module (gnu packages guile-xyz) ; required by "guix build -d guix"
+  #:autoload (gnu packages hardware) (libcpuid)
+  #:use-module (gnu packages hurd) ; required by "guix build -d guix"
+  #:autoload (gnu packages imagemagick) (imagemagick)
+  #:autoload (gnu packages less) (less)
+  #:autoload (gnu packages libedit) (editline)
+  #:use-module (gnu packages linux) ; required by "guix build -d guix"
+  #:autoload (gnu packages lua) (lua)
+  #:use-module (gnu packages man) ; required by "guix build -d guix"
+  #:autoload (gnu packages markup)
+  (lowdown)
+  #:autoload (gnu packages networking)
+  (socat)
+  #:autoload (gnu packages ninja)
+  (ninja)
+  #:autoload (gnu packages nss)
+  (nspr nss)
+  #:autoload (gnu packages perl)
+  (perl perl-capture-tiny perl-io-stringy)
+  #:autoload (gnu packages perl-check)
+  (perl-test-simple perl-test-output)
+  #:use-module (gnu packages pkg-config) ; required by "guix build -d guix"
+  #:autoload (gnu packages popt)
+  (popt)
+  #:autoload (gnu packages python)
+  (python python-wrapper python-3)
+  #:autoload (gnu packages python-build)
+  (python-pyparsing)
+  #:autoload (gnu packages python-web)
+  (python-requests python-responses python-bottle python-urllib3 python-webtest)
+  #:autoload (gnu packages python-xyz)
+  (python-clyent python-nbformat python-pyyaml python-pillow python-six
+                 python-tqdm python-cython python-cytoolz python-pycosat
+                 python-colorama python-distro python-fasteners python-future
+                 python-jinja2 python-node-semver python-patch-ng
+                 python-pluginbase python-pygments python-pyjwt python-pyyaml-5
+                 jupyter python-ipython python-ipykernel)
+  #:autoload (gnu packages serialization) (python-ruamel.yaml)
+  #:use-module (gnu packages sqlite) ; required by "guix build -d guix"
+  #:use-module (gnu packages ssh) ; required by "guix build -d guix"
+  #:autoload (gnu packages tcl) (tcl)
+  #:autoload (gnu packages texinfo) (texinfo)
+  #:autoload (gnu packages time) (python-dateutil python-pytz)
+  #:use-module (gnu packages tls) ; required by "guix build -d guix"
+  #:autoload (gnu packages virtualization) (bubblewrap)
+  #:autoload (gnu packages web) (jq)
+  #:autoload (gnu packages xml) (libxml2 libxslt)
+  #:autoload (gnu packages xorg) (libxau)
+  #:autoload (gnu packages version-control) (git-minimal)
   #:autoload   (guix build-system channel) (channel-build-system)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)

base-commit: 4555fb7dfa08f956bbfc8179772c7288c34b1f97
prerequisite-patch-id: 7626f1464f4926416fb13daf3d846176aa93f51b
prerequisite-patch-id: 445c6f624e99627959f2e54a6ee97337c44d9ea6
prerequisite-patch-id: 7a16c500faec9d58700a2b50b26bded079e9c3ac
prerequisite-patch-id: f7d406c61e069c04c3b7da453192f51c04763db1
prerequisite-patch-id: 4674bf40052d97215f837c9dfd4e7e1ae999492d
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 03/30] gnu: base: Autoload (gnu packages algebra).
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-3-maximedevos@telenet.be
It's not used by Guix according to "./pre-inst-env guix build guix".
Theoretically (gnu packages pkg-config) could be autoloaded, but
it seems pointless.

See first commit in the series for the procedure.
---
gnu/packages/base.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (20 lines)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 4bdc3e7792..bedb4cc1e9 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -41,12 +41,11 @@ (define-module (gnu packages base)
                 #:select (gpl3+ lgpl2.0+ lgpl3+ public-domain))
   #:use-module (gnu packages)
   #:use-module (gnu packages acl)
-  #:use-module (gnu packages algebra)
+  #:autoload (gnu packages algebra) (bc)
   #:use-module (gnu packages attr)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages ed)
-  #:use-module (gnu packages gawk)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages multiprecision)
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 06/30] gnu: crypto: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-6-maximedevos@telenet.be
See first commit in the series for the procedure.
---
gnu/packages/crypto.scm | 98 +++++++++++++++++++++++------------------
1 file changed, 54 insertions(+), 44 deletions(-)

Toggle diff (111 lines)
diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index 9dcffd8dd4..02d62ae19b 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -41,50 +41,60 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages crypto)
-  #:use-module (gnu packages)
-  #:use-module (gnu packages admin)
-  #:use-module (gnu packages aidc)
-  #:use-module (gnu packages attr)
-  #:use-module (gnu packages autotools)
-  #:use-module (gnu packages boost)
-  #:use-module (gnu packages check)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages cpp)
-  #:use-module (gnu packages crates-io)
-  #:use-module (gnu packages cryptsetup)
-  #:use-module (gnu packages curl)
-  #:use-module (gnu packages documentation)
-  #:use-module (gnu packages gettext)
-  #:use-module (gnu packages gnupg)
-  #:use-module (gnu packages golang)
-  #:use-module (gnu packages graphviz)
-  #:use-module (gnu packages image)
-  #:use-module (gnu packages kerberos)
-  #:use-module (gnu packages libbsd)
-  #:use-module (gnu packages libffi)
-  #:use-module (gnu packages linux)
-  #:use-module (gnu packages logging)
-  #:use-module (gnu packages lsof)
-  #:use-module (gnu packages man)
-  #:use-module (gnu packages multiprecision)
-  #:use-module (gnu packages nettle)
-  #:use-module (gnu packages password-utils)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages perl-check)
-  #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages python)
-  #:use-module (gnu packages python-xyz)
-  #:use-module (gnu packages python-check)
-  #:use-module (gnu packages python-crypto)
-  #:use-module (gnu packages readline)
-  #:use-module (gnu packages search)
-  #:use-module (gnu packages serialization)
-  #:use-module (gnu packages shells)
-  #:use-module (gnu packages sqlite)
-  #:use-module (gnu packages tcl)
-  #:use-module (gnu packages tls)
-  #:use-module (gnu packages version-control)
-  #:use-module (gnu packages xml)
+  #:autoload (gnu packages admin) (sudo)
+  #:autoload (gnu packages aidc) (qrencode)
+  #:autoload (gnu packages attr) (attr)
+  #:autoload (gnu packages autotools) (autoconf automake libtool)
+  #:autoload (gnu packages boost) (boost)
+  #:autoload (gnu packages check) (googletest python-pytest)
+  #:autoload (gnu packages compression) (bzip2 unzip zlib)
+  #:autoload (gnu packages cpp) (range-v3)
+  #:autoload (gnu packages crates-io)
+  (rust-anyhow-1 rust-arrayref-0.3 rust-arrayvec-0.5 rust-arrayvec-0.7
+                 rust-cc-1 rust-cfg-if-0.1 rust-cfg-if-1 rust-clap-2
+                 rust-constant-time-eq-0.1 rust-crypto-mac-0.11
+                 rust-crypto-mac-0.8 rust-digest-0.9 rust-duct-0.13
+                 rust-getrandom-0.1 rust-hex-0.4 rust-memmap-0.7
+                 rust-page-size-0.4 rust-rand-0.8 rust-rand-chacha-0.3
+                 rust-rayon-1 rust-rpassword-4 rust-scrypt-0.3
+                 rust-tempfile-3 rust-wild-2)
+  #:autoload (gnu packages cryptsetup) (cryptsetup)
+  #:autoload (gnu packages curl) (curl)
+  #:autoload (gnu packages documentation) (doxygen)
+  #:autoload (gnu packages gettext) (gettext-minimal)
+  #:autoload (gnu packages gnupg) (gnupg pinentry)
+  #:autoload (gnu packages golang) (go-golang-org-x-crypto)
+  #:autoload (gnu packages graphviz) (graphviz)
+  #:autoload (gnu packages image) (steghide)
+  #:autoload (gnu packages kerberos) (mit-krb5)
+  #:autoload (gnu packages libbsd) (libbsd)
+  #:autoload (gnu packages libffi) (python-cffi)
+  #:autoload (gnu packages linux) (e2fsprogs fuse util-linux)
+  #:autoload (gnu packages logging) (spdlog)
+  #:autoload (gnu packages lsof) (lsof)
+  #:autoload (gnu packages man) (xmltoman)
+  #:autoload (gnu packages multiprecision) (gmp)
+  #:autoload (gnu packages nettle) (nettle)
+  #:autoload (gnu packages perl)
+  (perl perl-capture-tiny perl-list-moreutils perl-module-build
+        perl-module-build-tiny perl-module-find perl-module-runtime
+        perl-moo perl-namespace-clean perl-sub-exporter perl-type-tiny)
+  #:autoload (gnu packages pkg-config) (pkg-config)
+  #:autoload (gnu packages perl-check)
+  (perl-test-fatal perl-test-leaktrace perl-test-nowarnings
+                   perl-test-sharedfork perl-test-warn)
+  #:autoload (gnu packages python) (python-wrapper python-3)
+  #:autoload (gnu packages python-xyz)
+  (python-aspectlib python-docutils python-future)
+  #:autoload (gnu packages python-check) (python-pytest-benchmark)
+  #:autoload (gnu packages python-crypto) (python-passlib)
+  #:autoload (gnu packages search) (mlocate)
+  #:autoload (gnu packages shells) (zsh)
+  #:autoload (gnu packages sqlite) (sqlite)
+  #:autoload (gnu packages tcl) (expect)
+  #:autoload (gnu packages tls) (openssl)
+  #:autoload (gnu packages version-control) (git)
+  #:autoload (gnu packages xml) (libxml2 tinyxml2)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 07/30] gnu: check: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-7-maximedevos@telenet.be
See first commit in the series for the procedure.
---
gnu/packages/check.scm | 63 ++++++++++++++++++++++++++++--------------
1 file changed, 43 insertions(+), 20 deletions(-)

Toggle diff (76 lines)
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 26a49056a2..6dfb62e7f0 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -56,26 +56,49 @@
 
 (define-module (gnu packages check)
   #:use-module (gnu packages)
-  #:use-module (gnu packages autotools)
-  #:use-module (gnu packages base)
-  #:use-module (gnu packages bash)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages linux)
-  #:use-module (gnu packages llvm)
-  #:use-module (gnu packages glib)
-  #:use-module (gnu packages gnome)
-  #:use-module (gnu packages golang)
-  #:use-module (gnu packages gtk)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages python)
-  #:use-module (gnu packages python-check)
-  #:use-module (gnu packages python-build)
-  #:use-module (gnu packages python-web)
-  #:use-module (gnu packages python-xyz)
-  #:use-module (gnu packages python-science)
-  #:use-module (gnu packages time)
-  #:use-module (gnu packages xml)
+  #:autoload (gnu packages autotools) (autoconf automake libtool)
+  #:autoload (gnu packages base) (coreutils coreutils-minimal which)
+  #:autoload (gnu packages bash) (bash bash-minimal)
+  #:autoload (gnu packages compression) (unzip)
+  #:autoload (gnu packages linux) (eudev)
+  #:autoload (gnu packages llvm) (clang llvm)
+  #:autoload (gnu packages glib) (glib gobject-introspection)
+  #:autoload (gnu packages gnome) (libgudev vala)
+  #:autoload (gnu packages golang) (go-github.com-jtolds-gls)
+  #:autoload (gnu packages gtk) (gtk-doc/stable)
+  #:autoload (gnu packages perl) (perl)
+  #:autoload (gnu packages pkg-config) (pkg-config)
+  #:autoload (gnu packages python) (python python-wrapper)
+  #:autoload (gnu packages python-check)
+  (python-mypy python-pytest-checkdocs python-pytest-flake8
+               python-cucumber-tag-expressions)
+  #:autoload (gnu packages python-build)
+  (python-flit-core python-packaging-bootstrap python-pypa-build
+                    python-setuptools-scm python-six-bootstrap
+                    python-toml python-wheel)
+  #:autoload (gnu packages python-web)
+  (python-requests python-werkzeug)
+  #:autoload (gnu packages python-xyz)
+  (pudb python-apipkg python-astroid python-async-generator
+        python-attrs python-attrs-bootstrap python-cliapp
+        python-colorama python-execnet python-extras python-factory-boy
+        python-faker python-filelock python-importlib-metadata
+        python-iniconfig python-isort python-jaraco-context
+        python-jaraco-context-bootstrap python-jaraco-functools
+        python-jaraco-functools-bootstrap python-lark-parser
+        python-libcst-minimal python-markdown python-matplotlib
+        python-mccabe python-mimeparse python-more-itertools python-numpy
+        python-packaging python-parse python-parse-type python-pathpy
+        python-pbr python-pbr-minimal python-pep8 python-pexpect
+        python-pillow python-pip-run python-platformdirs python-pluggy
+        python-ply python-pre-commit python-psutil python-py python-pyflakes
+        python-pytest-black python-pyyaml python-restructuredtext-lint
+        python-six python-sortedcontainers python-tempora python-termcolor
+        python-termstyle python-tox python-traceback2 python-ttystatus
+        python-types-toml python-typing-extensions python-wcwidth python-wrapt)
+  #:autoload (gnu packages python-science) (python-pandas)
+  #:autoload (gnu packages time) (python-dateutil)
+  #:autoload (gnu packages xml) (python-xmlschema)
   #:use-module (guix utils)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 09/30] gnu: backup: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-9-maximedevos@telenet.be
See first commit in the series for the procedure.
---
gnu/packages/backup.scm | 99 ++++++++++++++++++++++-------------------
1 file changed, 53 insertions(+), 46 deletions(-)

Toggle diff (112 lines)
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 0d03d2e87f..4a8385cd68 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -54,52 +54,59 @@ (define-module (gnu packages backup)
   #:use-module (guix build-system python)
   #:use-module (guix build-system qt)
   #:use-module (gnu packages)
-  #:use-module (gnu packages acl)
-  #:use-module (gnu packages autotools)
-  #:use-module (gnu packages bash)
-  #:use-module (gnu packages base)
-  #:use-module (gnu packages check)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages crypto)
-  #:use-module (gnu packages databases)
-  #:use-module (gnu packages datastructures)
-  #:use-module (gnu packages digest)
-  #:use-module (gnu packages dbm)
-  #:use-module (gnu packages dejagnu)
-  #:use-module (gnu packages ftp)
-  #:use-module (gnu packages gettext)
-  #:use-module (gnu packages glib)
-  #:use-module (gnu packages gnupg)
-  #:use-module (gnu packages golang)
-  #:use-module (gnu packages gperf)
-  #:use-module (gnu packages gtk)
-  #:use-module (gnu packages guile)
-  #:use-module (gnu packages guile-xyz)
-  #:use-module (gnu packages linux)
-  #:use-module (gnu packages mcrypt)
-  #:use-module (gnu packages ncurses)
-  #:use-module (gnu packages nettle)
-  #:use-module (gnu packages networking)
-  #:use-module (gnu packages onc-rpc)
-  #:use-module (gnu packages pcre)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages protobuf)
-  #:use-module (gnu packages python)
-  #:use-module (gnu packages python-build)
-  #:use-module (gnu packages python-check)
-  #:use-module (gnu packages python-crypto)
-  #:use-module (gnu packages python-web)
-  #:use-module (gnu packages python-xyz)
-  #:use-module (gnu packages qt)
-  #:use-module (gnu packages rsync)
-  #:use-module (gnu packages ruby)
-  #:use-module (gnu packages serialization)
-  #:use-module (gnu packages ssh)
-  #:use-module (gnu packages time)
-  #:use-module (gnu packages tls)
-  #:use-module (gnu packages valgrind)
-  #:use-module (gnu packages xml))
+  #:autoload (gnu packages acl) (acl)
+  #:use-module (gnu packages autotools) ; required by "guix build -d guix"
+  #:autoload (gnu packages bash) (bash-minimal)
+  #:autoload (gnu packages base) (coreutils findutils tar tzdata-for-tests)
+  #:autoload (gnu packages check)
+  (check python-flexmock python-mock python-pytest python-pytest-cov
+         python-pytest-mock python-pytest-runner)
+  #:use-module (gnu packages compression) ; required by "guix build -d guix"
+  #:autoload (gnu packages databases) (tdb python-peewee)
+  #:autoload (gnu packages datastructures) (uthash)
+  #:autoload (gnu packages digest) (xxhash)
+  #:autoload (gnu packages dbm) (bdb gdbm)
+  #:autoload (gnu packages dejagnu) (dejagnu)
+  #:autoload (gnu packages ftp) (lftp)
+  #:autoload (gnu packages gettext) (gettext-minimal)
+  #:autoload (gnu packages glib) (dbus glib intltool python-pygobject)
+  #:use-module (gnu packages gnupg) ; required by "guix build -d guix"
+  #:autoload (gnu packages gperf) (gperf-3.0)
+  #:autoload (gnu packages gtk) (gtk+)
+  #:use-module (gnu packages guile) ; required by "guix build -d guix"
+  #:use-module (gnu packages guile-xyz) ; required by "guix build -d guix"
+  #:autoload (gnu packages linux)
+  (btrfs-progs e2fsprogs fuse ntfs-3g util-linux)
+  #:autoload (gnu packages mcrypt) (mcrypt)
+  #:autoload (gnu packages ncurses) (ncurses)
+  #:use-module (gnu packages nettle) ; required by "guix build -d guix"
+  #:autoload (gnu packages networking) (mbuffer)
+  #:autoload (gnu packages onc-rpc) (libtirpc rpcsvc-proto)
+  #:autoload (gnu packages pcre) (pcre)
+  #:autoload (gnu packages perl)
+  (perl perl-libtime-parsedate perl-libtime-period)
+  #:use-module (gnu packages pkg-config) ; required by "guix build -d guix"
+  #:autoload (gnu packages protobuf) (protobuf)
+  #:autoload (gnu packages python) (python)
+  #:autoload (gnu packages python-build) (python-setuptools-scm)
+  #:autoload (gnu packages python-check) (python-pytest-qt)
+  #:autoload (gnu packages python-crypto)
+  (python-keyring python-paramiko python-secretstorage)
+  #:autoload (gnu packages python-web)
+  (python-requests python-urllib3)
+  #:autoload (gnu packages python-xyz)
+  (python-appdirs python-colorama python-cython python-fasteners python-future
+                  python-jsonschema python-llfuse python-lockfile
+                  python-msgpack-1.0.2 python-pexpect python-psutil
+                  python-setuptools-git)
+  #:autoload (gnu packages qt) (python-pyqt-without-qtwebkit qtsvg-5)
+  #:autoload (gnu packages rsync) (librsync librsync-0.9 rsync)
+  #:autoload (gnu packages ruby) (ruby-asciidoctor)
+  #:autoload (gnu packages serialization) (python-ruamel.yaml)
+  #:autoload (gnu packages ssh) (openssh)
+  #:autoload (gnu packages time) (python-dateutil)
+  #:autoload (gnu packages tls) (gnutls libressl openssl)
+  #:use-module (gnu packages xml)) ; required by "guix build -d guix"
 
 (define-public duplicity
   (package
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 02/30] gnu: gnupg: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-2-maximedevos@telenet.be
See first commit in the series for the procedure.
---
gnu/packages/gnupg.scm | 74 ++++++++++++++++++++++--------------------
1 file changed, 39 insertions(+), 35 deletions(-)

Toggle diff (87 lines)
diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index 90215a6877..13a8194fb9 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -41,41 +41,45 @@
 (define-module (gnu packages gnupg)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (gnu packages)
-  #:use-module (gnu packages adns)
-  #:use-module (gnu packages autotools)
-  #:use-module (gnu packages base)
-  #:use-module (gnu packages curl)
-  #:use-module (gnu packages crypto)
-  #:use-module (gnu packages emacs)
-  #:use-module (gnu packages enlightenment)
-  #:use-module (gnu packages gettext)
-  #:use-module (gnu packages guile)
-  #:use-module (gnu packages openldap)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages perl-check)
-  #:use-module (gnu packages pth)
-  #:use-module (gnu packages python)
-  #:use-module (gnu packages python-xyz)
-  #:use-module (gnu packages qt)
-  #:use-module (gnu packages readline)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages gtk)
-  #:use-module (gnu packages glib)
-  #:use-module (gnu packages gnome)
-  #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages ncurses)
-  #:use-module (gnu packages security-token)
-  #:use-module (gnu packages sqlite)
-  #:use-module (gnu packages swig)
-  #:use-module (gnu packages texinfo)
-  #:use-module (gnu packages tls)
-  #:use-module (gnu packages tor)
-  #:use-module (gnu packages web)
-  #:use-module (gnu packages xorg)
-  #:use-module (gnu packages xdisorg)
-  #:use-module (gnu packages xml)
-  #:use-module (gnu packages popt)
-  #:use-module (gnu packages xdisorg)
+  #:use-module (gnu packages autotools) ; required by 'guix build -d guix"
+  #:autoload (gnu packages base) (which)
+  #:autoload (gnu packages curl) (curl)
+  #:autoload (gnu packages crypto) (libmd)
+  #:autoload (gnu packages enlightenment) (efl)
+  #:use-module (gnu packages gettext) ; required by "guix build -d guix"
+  #:use-module (gnu packages guile) ; required by "guix build -d guix"
+  #:autoload (gnu packages openldap) (openldap)
+  #:autoload (gnu packages perl)
+  (perl perl-clone perl-config-general perl-file-homedir perl-file-sharedir
+        perl-file-which perl-ipc-system-simple perl-json
+        perl-list-moreutils perl-module-build perl-module-install
+        perl-mime-tools perl-moo perl-moox-handlesvia perl-moox-late
+        perl-moox-options perl-moox-strictconstructor perl-namespace-clean
+        perl-net-idn-encode
+        perl-path-tiny perl-strictures-2 perl-text-template perl-time-duration
+        perl-time-duration-parse perl-try-tiny perl-type-tiny
+        perl-types-path-tiny)
+  #:autoload (gnu packages perl-check)
+  (perl-test-most perl-test-trap)
+  #:autoload (gnu packages pth) (pth)
+  #:autoload (gnu packages qt) (qtbase-5)
+  #:autoload (gnu packages readline) (readline)
+  #:autoload (gnu packages compression) (zlib bzip2)
+  #:autoload (gnu packages gtk) (gtk+-2 perl-pango)
+  #:autoload (gnu packages glib) (glib perl-net-dbus)
+  #:autoload (gnu packages gnome) (libsecret gcr)
+  #:use-module (gnu packages pkg-config) ; required by "guix build -d guix"
+  #:autoload (gnu packages ncurses) (ncurses)
+  #:autoload (gnu packages security-token) (pcsc-lite)
+  #:autoload (gnu packages sqlite) (sqlite)
+  #:autoload (gnu packages swig) (swig)
+  #:use-module (gnu packages texinfo) ; required by "guix build -d guix"
+  #:autoload (gnu packages tls) (gnutls)
+  #:autoload (gnu packages tor) (torsocks)
+  #:autoload (gnu packages web) (perl-lwp-online)
+  #:autoload (gnu packages xorg) (xorg-server-for-tests)
+  #:autoload (gnu packages xdisorg) (rofi bemenu)
+  #:autoload (gnu packages popt) (popt)
   #:use-module (guix gexp)
   #:use-module (guix packages)
   #:use-module (guix download)
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 11/30] gnu: gettext: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-11-maximedevos@telenet.be
See first commit in the series for the procedure.
---
gnu/packages/gettext.scm | 29 +++++++++++++++++------------
1 file changed, 17 insertions(+), 12 deletions(-)

Toggle diff (42 lines)
diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm
index d606acf798..dc6ee7de82 100644
--- a/gnu/packages/gettext.scm
+++ b/gnu/packages/gettext.scm
@@ -36,18 +36,23 @@ (define-module (gnu packages gettext)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
-  #:use-module (gnu packages check)
-  #:use-module (gnu packages docbook)
-  #:use-module (gnu packages emacs)
-  #:use-module (gnu packages hurd)
-  #:use-module (gnu packages libunistring)
-  #:use-module (gnu packages ncurses)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages perl-check)
-  #:use-module (gnu packages tex)
-  #:use-module (gnu packages xml)
-  #:use-module (gnu packages python-xyz)
-  #:use-module (gnu packages sphinx)
+  #:autoload (gnu packages check) (python-pytest python-pytest-cov)
+  #:use-module (gnu packages docbook) ; required by "guix build -d guix"
+  #:autoload (gnu packages emacs) (emacs-minimal)
+  #:use-module (gnu packages hurd) ; required by "guix build -d guix"
+  #:use-module (gnu packages libunistring) ; required by "guix build -d guix"
+  #:use-module (gnu packages ncurses) ; required by "guix build -d guix"
+  #:use-module (gnu packages perl) ; required by "guix build -d guix"
+  #:use-module (gnu packages perl-check) ; required by "guix build -d guix"
+  #:use-module (gnu packages tex) ; required by "guix build -d guix"
+  #:use-module (gnu packages xml) ; required by "guix build -d guix"
+  #:autoload (gnu packages python-xyz)
+  (python-bump2version
+   python-flake8 python-flake8-implicit-str-concat python-flake8-print
+   python-isort python-polib python-pre-commit python-pymd4c python-twine
+   python-yamllint)
+  #:autoload (gnu packages sphinx)
+  (python-sphinx python-sphinx-argparse python-sphinx-rtd-theme)
   #:use-module (guix utils))
 
 (define-public gettext-minimal
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 12/30] gnu: python: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-12-maximedevos@telenet.be
See first commit in the series for the procedure.
---
gnu/packages/python.scm | 32 +++++++++++++++-----------------
1 file changed, 15 insertions(+), 17 deletions(-)

Toggle diff (45 lines)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 23407e4e84..8820b6a9af 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -78,23 +78,21 @@
 (define-module (gnu packages python)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (gnu packages)
-  #:use-module (gnu packages base)
-  #:use-module (gnu packages bash)
-  #:use-module (gnu packages certs)
-  #:use-module (gnu packages check)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages dbm)
-  #:use-module (gnu packages hurd)
-  #:use-module (gnu packages libffi)
-  #:use-module (gnu packages ncurses)
-  #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages python-xyz)
-  #:use-module (gnu packages readline)
-  #:use-module (gnu packages shells)
-  #:use-module (gnu packages sqlite)
-  #:use-module (gnu packages tcl)
-  #:use-module (gnu packages tls)
-  #:use-module (gnu packages xml)
+  #:use-module (gnu packages base) ; required by "guix build -d guix"
+  #:use-module (gnu packages bash) ; required by "guix build -d guix"
+  #:autoload (gnu packages certs) (nss-certs)
+  #:use-module (gnu packages compression) ; required by "guix build -d guix"
+  #:use-module (gnu packages dbm) ; required by "guix build -d guix"
+  #:use-module (gnu packages hurd) ; required by "guix build -d guix"
+  #:use-module (gnu packages libffi) ; required by "guix build -d guix"
+  #:autoload (gnu packages ncurses) (ncurses)
+  #:use-module (gnu packages pkg-config) ; required by "guix build -d guix"
+  #:autoload (gnu packages python-xyz) (python2-pycparser)
+  #:use-module (gnu packages readline) ; required by "guix build -d guix"
+  #:use-module (gnu packages sqlite) ; required by "guix build -d guix"
+  #:use-module (gnu packages tcl) ; required by "guix build -d guix"
+  #:use-module (gnu packages tls) ; required by "guix build -d guix"
+  #:use-module (gnu packages xml) ; required by "guix build -d guix"
   #:use-module (guix gexp)
   #:use-module (guix packages)
   #:use-module (guix download)
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 10/30] gnu: guile-xyz: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-10-maximedevos@telenet.be
See first commit in the series for the procedure.
---
gnu/packages/guile-xyz.scm | 119 +++++++++++++++++++------------------
1 file changed, 61 insertions(+), 58 deletions(-)

Toggle diff (132 lines)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index a85c7e0fc4..3c22f96e8c 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -63,64 +63,67 @@
 (define-module (gnu packages guile-xyz)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (gnu packages)
-  #:use-module (gnu packages admin)
-  #:use-module (gnu packages algebra)
-  #:use-module (gnu packages aspell)
-  #:use-module (gnu packages autotools)
-  #:use-module (gnu packages avahi)
-  #:use-module (gnu packages base)
-  #:use-module (gnu packages bash)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages crypto)
-  #:use-module (gnu packages databases)
-  #:use-module (gnu packages disk)
-  #:use-module (gnu packages emacs)
-  #:use-module (gnu packages emacs-xyz)
-  #:use-module (gnu packages gawk)
-  #:use-module (gnu packages gettext)
-  #:use-module (gnu packages gl)
-  #:use-module (gnu packages glib)
-  #:use-module (gnu packages gnome)
-  #:use-module (gnu packages gnupg)
-  #:use-module (gnu packages gperf)
-  #:use-module (gnu packages gstreamer)
-  #:use-module (gnu packages gtk)
-  #:use-module (gnu packages guile)
-  #:use-module (gnu packages haskell-xyz)         ;pandoc
-  #:use-module (gnu packages hurd)
-  #:use-module (gnu packages image)
-  #:use-module (gnu packages imagemagick)
-  #:use-module (gnu packages libffi)
-  #:use-module (gnu packages libunistring)
-  #:use-module (gnu packages linux)
-  #:use-module (gnu packages man)
-  #:use-module (gnu packages maths)
-  #:use-module (gnu packages mes)
-  #:use-module (gnu packages multiprecision)
-  #:use-module (gnu packages ncurses)
-  #:use-module (gnu packages networking)
-  #:use-module (gnu packages noweb)
-  #:use-module (gnu packages nss)
-  #:use-module (gnu packages package-management)
-  #:use-module (gnu packages password-utils)
-  #:use-module (gnu packages pcre)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages python)
-  #:use-module (gnu packages readline)
-  #:use-module (gnu packages sdl)
-  #:use-module (gnu packages search)
-  #:use-module (gnu packages serialization)
-  #:use-module (gnu packages slang)
-  #:use-module (gnu packages sqlite)
-  #:use-module (gnu packages swig)
-  #:use-module (gnu packages tex)
-  #:use-module (gnu packages texinfo)
-  #:use-module (gnu packages tls)
-  #:use-module (gnu packages version-control)
-  #:use-module (gnu packages webkit)
-  #:use-module (gnu packages xdisorg)
-  #:use-module (gnu packages xorg)
+  #:autoload (gnu packages admin) (inetutils)
+  #:autoload (gnu packages algebra) (fftw)
+  #:autoload (gnu packages aspell) (aspell)
+  #:use-module (gnu packages autotools) ; required by "guix build -d guix"
+  #:use-module (gnu packages avahi) ; required by "guix build -d guix"
+  #:autoload (gnu packages base) (sed tzdata-for-tests which)
+  #:autoload (gnu packages bash) (bash bash-minimal)
+  #:autoload (gnu packages compression) (bzip2 lzip zip zlib)
+  #:autoload (gnu packages crypto) (libsodium)
+  #:autoload (gnu packages databases) (mariadb postgresql)
+  #:autoload (gnu packages disk) (parted)
+  #:autoload (gnu packages emacs) (emacs emacs-minimal)
+  #:autoload (gnu packages emacs-xyz)
+  (emacs-all-the-icons
+   emacs-all-the-icons-dired emacs-company emacs-dired-sidebar
+   emacs-doom-modeline emacs-f emacs-flycheck emacs-flycheck-guile emacs-geiser
+   emacs-geiser-guile emacs-ivy emacs-memoize emacs-modus-themes
+   emacs-paren-face)
+  #:use-module (gnu packages gettext) ; required by "guix build -d guix"
+  #:autoload (gnu packages gl) (freeglut guile-opengl mesa)
+  #:autoload (gnu packages glib) (dbus-glib glib gobject-introspection)
+  #:autoload (gnu packages gnome)
+  (clutter glib-networking gsettings-desktop-schemas librsvg vte)
+  #:autoload (gnu packages gnupg) (guile-gcrypt guile2.2-gcrypt)
+  #:autoload (gnu packages gperf) (gperf)
+  #:autoload (gnu packages gstreamer)
+  (gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly)
+  #:autoload (gnu packages gtk)
+  (gtk+ gtksourceview guile-cairo guile-rsvg guile2.2-rsvg guile2.2-cairo)
+  #:use-module (gnu packages guile) ; required by "guix build -d guix"
+  #:autoload (gnu packages haskell-xyz) (pandoc)
+  #:autoload (gnu packages image) (freeimage vigra vigra-c)
+  #:autoload (gnu packages libffi) (libffi)
+  #:autoload (gnu packages linux) (eudev procps util-linux)
+  #:autoload (gnu packages man) (help2man)
+  #:autoload (gnu packages maths) (gsl)
+  #:autoload (gnu packages mes) (nyacc)
+  #:autoload (gnu packages ncurses) (ncurses ncurses/gpm)
+  #:autoload (gnu packages networking) (zeromq)
+  #:autoload (gnu packages nss) (nspr nss)
+  #:autoload (gnu packages package-management) (guix)
+  #:autoload (gnu packages password-utils) (shroud)
+  #:autoload (gnu packages pcre) (pcre2)
+  #:autoload (gnu packages perl) (perl perl-io-tty)
+  #:use-module (gnu packages pkg-config) ; required by "guix build -d guix"
+  #:autoload (gnu packages python) (python)
+  #:autoload (gnu packages sdl) (guile-sdl)
+  #:autoload (gnu packages search) (xapian)
+  #:autoload (gnu packages serialization) (libyaml)
+  #:autoload (gnu packages slang) (newt)
+  #:autoload (gnu packages sqlite) (sqlite)
+  #:autoload (gnu packages swig) (swig)
+  #:autoload (gnu packages tex)
+  (texlive-booktabs texlive-epsf texlive-fonts-iwona texlive-lm texlive-siunitx
+                    texlive-standalone texlive-updmap.cfg texlive-xcolor)
+  #:use-module (gnu packages texinfo) ; required by "guix build -d guix"
+  #:autoload (gnu packages tls) (openssl gnutls guile2.2-gnutls)
+  #:autoload (gnu packages webkit) (webkitgtk webkitgtk-with-libsoup2)
+  #:autoload (gnu packages xdisorg) (xosd)
+  #:autoload (gnu packages xorg)
+  (libx11 libxext libxinerama xorg-server xorg-server-for-tests)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix gexp)
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 04/30] gnu: admin: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-4-maximedevos@telenet.be
See first commit in the series for the procedure.
---
gnu/packages/admin.scm | 185 +++++++++++++++++++++++------------------
1 file changed, 104 insertions(+), 81 deletions(-)

Toggle diff (198 lines)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index b35d50ff56..8f0fe1987f 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -87,87 +87,110 @@ (define-module (gnu packages admin)
   #:use-module (guix packages)
   #:use-module (guix utils)
   #:use-module (gnu packages)
-  #:use-module (gnu packages algebra)
-  #:use-module (gnu packages autogen)
-  #:use-module (gnu packages autotools)
-  #:use-module (gnu packages base)
-  #:use-module (gnu packages bash)
-  #:use-module (gnu packages bison)
-  #:use-module (gnu packages boost)
-  #:use-module (gnu packages c)
-  #:use-module (gnu packages check)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages crates-io)
-  #:use-module (gnu packages cross-base)
-  #:use-module (gnu packages crypto)
-  #:use-module (gnu packages cryptsetup)
-  #:use-module (gnu packages curl)
-  #:use-module (gnu packages cyrus-sasl)
-  #:use-module (gnu packages dns)
-  #:use-module (gnu packages elf)
-  #:use-module (gnu packages file)
-  #:use-module (gnu packages flex)
-  #:use-module (gnu packages freedesktop)
-  #:use-module (gnu packages gawk)
-  #:use-module (gnu packages gettext)
-  #:use-module (gnu packages gl)
-  #:use-module (gnu packages glib)
-  #:use-module (gnu packages gnome)
-  #:use-module (gnu packages gnupg)
-  #:use-module (gnu packages golang)
-  #:use-module (gnu packages groff)
-  #:use-module (gnu packages gtk)
-  #:use-module (gnu packages guile)
-  #:use-module (gnu packages guile-xyz)
-  #:use-module (gnu packages hurd)
-  #:use-module (gnu packages image)
-  #:use-module (gnu packages imagemagick)
-  #:use-module (gnu packages inkscape)
-  #:use-module (gnu packages kerberos)
-  #:use-module (gnu packages libbsd)
-  #:use-module (gnu packages libftdi)
-  #:use-module (gnu packages libunwind)
-  #:use-module (gnu packages libusb)
-  #:use-module (gnu packages linux)
-  #:use-module (gnu packages lua)
-  #:use-module (gnu packages m4)
-  #:use-module (gnu packages mail)
-  #:use-module (gnu packages man)
-  #:use-module (gnu packages mcrypt)
-  #:use-module (gnu packages mpi)
-  #:use-module (gnu packages ncurses)
-  #:use-module (gnu packages networking)
-  #:use-module (gnu packages openldap)
-  #:use-module (gnu packages patchutils)
-  #:use-module (gnu packages pciutils)
-  #:use-module (gnu packages pcre)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages perl-check)
-  #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages polkit)
-  #:use-module (gnu packages popt)
-  #:use-module (gnu packages python)
-  #:use-module (gnu packages python-crypto)
-  #:use-module (gnu packages python-web)
-  #:use-module (gnu packages python-xyz)
-  #:use-module (gnu packages qt)
-  #:use-module (gnu packages readline)
-  #:use-module (gnu packages ruby)
-  #:use-module (gnu packages selinux)
-  #:use-module (gnu packages serialization)
-  #:use-module (gnu packages sqlite)
-  #:use-module (gnu packages ssh)
-  #:use-module (gnu packages sphinx)
-  #:use-module (gnu packages tcl)
-  #:use-module (gnu packages terminals)
-  #:use-module (gnu packages texinfo)
-  #:use-module (gnu packages time)
-  #:use-module (gnu packages tls)
-  #:use-module (gnu packages version-control)
-  #:use-module (gnu packages web)
-  #:use-module (gnu packages xdisorg)
-  #:use-module (gnu packages xml)
-  #:use-module (gnu packages xorg))
+  #:autoload (gnu packages algebra) (bc)
+  #:autoload (gnu packages autotools)
+  (autoconf autoconf-archive automake config libtool)
+  #:use-module (gnu packages base) ; required by "guix build -d guix"
+  #:autoload (gnu packages bash) (bash-minimal bash bats)
+  #:autoload (gnu packages bison) (bison)
+  #:autoload (gnu packages boost) (boost)
+  #:autoload (gnu packages c) (libhx)
+  #:autoload (gnu packages check)
+  (check python-mock python-nose python-hypothesis python-mock python-pytest
+         python-pytest-forked python-pytest-mock python-pytest-xdist)
+  #:autoload (gnu packages compression) (zlib xz lzip gzip)
+  #:autoload (gnu packages crates-io)
+  (rust-nix-0.19 rust-pam-sys-0.5 rust-rpassword-5 rust-users-0.11 rust-serde-1
+                 rust-serde-json-1 rust-libc-0.2 rust-tokio-1 rust-getopts-0.2
+                 rust-thiserror-1 rust-async-trait-0.1 rust-enquote-1)
+  #:autoload (gnu packages crypto) (keyutils encfs)
+  #:autoload (gnu packages cryptsetup) (cryptsetup)
+  #:autoload (gnu packages curl) (curl)
+  #:autoload (gnu packages cyrus-sasl) (cyrus-sasl)
+  #:autoload (gnu packages dns) (isc-bind)
+  #:autoload (gnu packages elf) (elfutils libelf)
+  #:autoload (gnu packages file) (file)
+  #:autoload (gnu packages flex) (flex)
+  #:autoload (gnu packages freedesktop) (elogind)
+  #:autoload (gnu packages gawk) (gawk)
+  #:autoload (gnu packages gettext) (gettext-minimal)
+  #:autoload (gnu packages gl) (mesa-utils)
+  #:autoload (gnu packages glib)
+  (dbus glib intltool dbus-glib python-pygobject)
+  #:autoload (gnu packages gnome) (libnotify upower)
+  #:autoload (gnu packages gnupg) (libgcrypt libgpg-error gnupg)
+  #:autoload (gnu packages golang)
+  (go go-golang-org-x-text go-github.com-ulikunitz-xz)
+  #:autoload (gnu packages groff) (groff)
+  #:autoload (gnu packages gtk) (cairo gtk+ gtk+-2 gtk-doc)
+  #:autoload (gnu packages guile)
+  (guile-3.0 guile-readline guile-2.2 guile-2.0)
+  #:autoload (gnu packages guile-xyz) (guile-fibers-1.1 guile2.2-fibers)
+  #:autoload (gnu packages hurd) (hurd-target?)
+  #:autoload (gnu packages image) (libpng)
+  #:autoload (gnu packages imagemagick) (imagemagick)
+  #:autoload (gnu packages inkscape) (inkscape/stable)
+  #:autoload (gnu packages kerberos) (mit-krb5)
+  #:autoload (gnu packages libbsd) (libbsd)
+;  #:use-module (gnu packages libftdi)
+  #:autoload (gnu packages libunwind) (libunwind)
+  #:autoload (gnu packages libusb) (libusb)
+  #:autoload (gnu packages linux)
+  (eudev fuse iproute ipset iptables i2c-tools-3 kmod libaio libcap libnl
+         linux-pam lm-sensors lvm2 mdadm net-tools nftables procps usbutils
+         util-linux)
+  #:autoload (gnu packages lua) (lua)
+  #:autoload (gnu packages m4) (m4)
+  #:autoload (gnu packages mail) (mailutils sendmail)
+  #:autoload (gnu packages man) (help2man scdoc)
+  #:autoload (gnu packages mcrypt) (libmhash)
+  #:autoload (gnu packages mpi) (openmpi)
+  #:autoload (gnu packages ncurses) (ncurses)
+  #:autoload (gnu packages networking) (whois)
+  #:autoload (gnu packages openldap) (openldap)
+  #:autoload (gnu packages patchutils) (quilt)
+  #:autoload (gnu packages pciutils) (pciutils)
+  #:autoload (gnu packages pcre) (pcre pcre2)
+  #:autoload (gnu packages perl)
+  (perl perl-cpan-changes perl-cpanel-json-xs perl-json-xs perl-exception-class
+        perl-file-which perl-file-slurp perl-json-xs perl-module-build
+        perl-readonly perl-sort-naturally perl-time-hires perl-try-tiny
+        perltidy)
+  #:autoload (gnu packages perl-check)
+  (perl-test-differences perl-test-distmanifest perl-test-perltidy perl-test-pod
+                         perl-test-pod-coverage perl-test-harness perl-test-trap)
+  #:autoload (gnu packages pkg-config) (pkg-config)
+  #:autoload (gnu packages polkit) (polkit)
+  #:autoload (gnu packages python)
+  (python python-2 python-minimal-wrapper python-wrapper)
+  #:autoload (gnu packages python-crypto)
+  (python-paramiko python-passlib python-cryptography python-pycrypto)
+  #:autoload (gnu packages python-xyz)
+  (python-colorama python-docutils python-future python-hypy-utils python-jinja2
+                   python-packaging python-decorator python-distro python-pexpect
+                   python-psutil python-pygments python-pyyaml python-pyinotify
+                   python-resolvelib-0.5 python-six python-tabulate
+                   python-typing-extensions python-urwid python-xlib)
+  #:autoload (gnu packages qt) (qtbase-5 qtsvg-5)
+  #:autoload (gnu packages readline) (readline)
+  #:autoload (gnu packages ruby) (ruby-hocon ruby-sys-filesystem ruby-thor)
+  #:autoload (gnu packages selinux) (libselinux)
+  #:autoload (gnu packages serialization) (python-ruamel.yaml)
+  #:autoload (gnu packages sqlite) (sqlite)
+  #:autoload (gnu packages ssh) (openssh sshpass)
+  #:autoload (gnu packages sphinx) (python-sphinx)
+  #:autoload (gnu packages tcl) (perl-tk expect)
+  #:autoload (gnu packages terminals) (python-pyte)
+  #:autoload (gnu packages texinfo) (texinfo)
+  #:autoload (gnu packages time) (python-pytz)
+  #:autoload (gnu packages tls) (openssl gnutls)
+  #:autoload (gnu packages version-control) (git)
+  #:autoload (gnu packages web) (jq perl-http-tiny perl-io-socket-ssl)
+  #:autoload (gnu packages xdisorg) (libdrm scrot wmctrl)
+  #:autoload (gnu packages xml) (libxml2 python-xmltodict)
+  #:autoload (gnu packages xorg)
+  (libevdev libpciaccess libx11 perl-x11-protocol perl-x11-protocol-other
+            xdpyinfo xprop xrandr xterm))
 
 ;; This package uses su instead of sudo (because of SpaceFM).
 (define-public ktsuss
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 08/30] gnu: databases: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-8-maximedevos@telenet.be
See first commit in the series for the procedure.
---
gnu/packages/databases.scm | 212 ++++++++++++++++++++++---------------
1 file changed, 128 insertions(+), 84 deletions(-)

Toggle diff (225 lines)
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 209ad0f278..c41e9b9e52 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -76,90 +76,134 @@
 
 (define-module (gnu packages databases)
   #:use-module (gnu packages)
-  #:use-module (gnu packages admin)
-  #:use-module (gnu packages algebra)
-  #:use-module (gnu packages autotools)
-  #:use-module (gnu packages avahi)
-  #:use-module (gnu packages base)
-  #:use-module (gnu packages bash)
-  #:use-module (gnu packages bison)
-  #:use-module (gnu packages boost)
-  #:use-module (gnu packages check)
-  #:use-module (gnu packages cmake)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages cpp)
-  #:use-module (gnu packages crypto)
-  #:use-module (gnu packages curl)
-  #:use-module (gnu packages cyrus-sasl)
-  #:use-module (gnu packages dbm)
-  #:use-module (gnu packages docbook)
-  #:use-module (gnu packages emacs)
-  #:use-module (gnu packages flex)
-  #:use-module (gnu packages freedesktop)
-  #:use-module (gnu packages gawk)
-  #:use-module (gnu packages gcc)
-  #:use-module (gnu packages gettext)
-  #:use-module (gnu packages glib)
-  #:use-module (gnu packages gnome)
-  #:use-module (gnu packages gnupg)
-  #:use-module (gnu packages golang)
-  #:use-module (gnu packages gperf)
-  #:use-module (gnu packages gtk)
-  #:use-module (gnu packages guile)
-  #:use-module (gnu packages icu4c)
-  #:use-module (gnu packages jemalloc)
-  #:use-module (gnu packages language)
-  #:use-module (gnu packages libedit)
-  #:use-module (gnu packages libevent)
-  #:use-module (gnu packages linux)
-  #:use-module (gnu packages lisp)
-  #:use-module (gnu packages lisp-xyz)
-  #:use-module (gnu packages llvm)
-  #:use-module (gnu packages logging)
-  #:use-module (gnu packages man)
-  #:use-module (gnu packages maths)
-  #:use-module (gnu packages multiprecision)
-  #:use-module (gnu packages ncurses)
-  #:use-module (gnu packages networking)
-  #:use-module (gnu packages onc-rpc)
-  #:use-module (gnu packages openstack)
-  #:use-module (gnu packages pantheon)
-  #:use-module (gnu packages parallel)
-  #:use-module (gnu packages pcre)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages perl-check)
-  #:use-module (gnu packages perl-web)
-  #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages popt)
-  #:use-module (gnu packages protobuf)
-  #:use-module (gnu packages python)
-  #:use-module (gnu packages python-build)
-  #:use-module (gnu packages python-check)
-  #:use-module (gnu packages python-crypto)
-  #:use-module (gnu packages python-science)
-  #:use-module (gnu packages python-web)
-  #:use-module (gnu packages python-xyz)
-  #:use-module (gnu packages qt)
-  #:use-module (gnu packages rdf)
-  #:use-module (gnu packages readline)
-  #:use-module (gnu packages regex)
-  #:use-module (gnu packages rpc)
-  #:use-module (gnu packages ruby)
-  #:use-module (gnu packages serialization)
-  #:use-module (gnu packages sphinx)
-  #:use-module (gnu packages ssh)
-  #:use-module (gnu packages sqlite)
-  #:use-module (gnu packages syncthing)           ;for go-github-com-lib-pq
-  #:use-module (gnu packages tcl)
-  #:use-module (gnu packages terminals)
-  #:use-module (gnu packages texinfo)
-  #:use-module (gnu packages textutils)
-  #:use-module (gnu packages time)
-  #:use-module (gnu packages tls)
-  #:use-module (gnu packages valgrind)
-  #:use-module (gnu packages web)
-  #:use-module (gnu packages xdisorg)
-  #:use-module (gnu packages xml)
+  #:autoload (gnu packages admin) (inetutils)
+  #:autoload (gnu packages algebra) (bc)
+  #:autoload (gnu packages autotools) (autoconf automake libtool)
+  #:autoload (gnu packages base)
+  (coreutils glibc-locales grep patch sed tzdata-for-tests which)
+  #:autoload (gnu packages bash) (bash)
+  #:use-module (gnu packages bison) ; required for "guix build -d guix"
+  #:autoload (gnu packages boost) (boost boost-for-mysql)
+  #:autoload (gnu packages check)
+  (check googlebenchmark googletest
+         python-aiounittest
+         python-flexmock
+         python-mock python-nose
+         python-parameterized
+         python-pytest python-pytest-asyncio python-pytest-cov
+         python-pytest-runner python-pytest-xdist)
+  #:autoload (gnu packages cmake)
+  (cmake cmake-minimal)
+  #:use-module (gnu packages compression) ; required for "guix build guix"
+  #:autoload (gnu packages cpp) (xsimd)
+  #:autoload (gnu packages curl) (curl)
+  #:autoload (gnu packages cyrus-sasl) (cyrus-sasl)
+  #:autoload (gnu packages dbm) (bdb)
+  #:autoload (gnu packages docbook)
+  (docbook2x docbook-sgml-4.2 docbook-xml docbook-xml-4.2)
+  #:autoload (gnu packages flex) (flex)
+  #:autoload (gnu packages gawk) (gawk)
+  #:autoload (gnu packages gcc) (gcc-11)
+  #:autoload (gnu packages gettext) (gettext-minimal)
+  #:autoload (gnu packages glib) (glib)
+  #:autoload (gnu packages gnome)
+  (gsettings-desktop-schemas libgda libgee libsecret vala)
+  #:autoload (gnu packages gnupg) (libgcrypt)
+  #:autoload (gnu packages golang)
+  (go-gopkg-in-check-v1
+   go-gopkg-in-yaml-v2
+   go-github-com-go-sql-driver-mysql
+   go-github-com-mattn-go-sqlite3
+   go-github-com-olekukonko-tablewriter
+   go-github-com-pkg-errors
+   go-github-com-sourcegraph-jsonrpc2
+   go-github-com-stretchr-testify
+   go-golang-org-x-crypto
+   go-golang-org-x-sys
+   go-golang-org-x-xerrors)
+  #:autoload (gnu packages gperf) (gperf)
+  #:autoload (gnu packages gtk) (gtk+ gtksourceview-3)
+  #:autoload (gnu packages guile) (guile2.2-bytestructures guile-2.2)
+  #:autoload (gnu packages icu4c) (icu4c-67)
+  #:autoload (gnu packages jemalloc) (jemalloc)
+  #:autoload (gnu packages language)
+  (perl-lingua-en-inflect-number
+   perl-lingua-en-inflect-phrase
+   perl-lingua-en-tagger
+   perl-string-toidentifier-en)
+  #:autoload (gnu packages libedit) (editline)
+  #:autoload (gnu packages libevent) (libevent)
+  #:use-module (gnu packages linux) ; required by "guix build -d guix"
+  #:autoload (gnu packages lisp) (buildapp sbcl)
+  #:autoload (gnu packages lisp-xyz)
+  (sbcl-alexandria sbcl-cl-abnf sbcl-cl-base64 sbcl-cl-csv sbcl-cl-fad
+   sbcl-cl-log sbcl-cl-markdown sbcl-cl-mustache sbcl-cl-ppcre
+   sbcl-cl-sqlite sbcl-closer-mop sbcl-command-line-arguments
+   sbcl-db3 sbcl-drakma sbcl-esrap sbcl-flexi-streams sbcl-ixf
+   sbcl-local-time sbcl-lparallel sbcl-metabang-bind sbcl-mssql
+   sbcl-postmodern sbcl-py-configparser sbcl-qmynd sbcl-quri
+   sbcl-split-sequence sbcl-trivial-backtrace sbcl-usocket sbcl-uuid
+   sbcl-yason sbcl-zs3)
+  #:autoload (gnu packages llvm)
+  (libcxx+libcxxabi-6 libcxxabi-6 clang-6)
+  #:autoload (gnu packages logging) (glog)
+  #:autoload (gnu packages man) (txt2man)
+  #:autoload (gnu packages maths) (double-conversion)
+  #:autoload (gnu packages multiprecision) (libtommath)
+  #:use-module (gnu packages ncurses) ; required by "guix build -d guix"
+  #:autoload (gnu packages networking) (pproxy)
+  #:autoload (gnu packages onc-rpc) (libtirpc rpcsvc-proto)
+  #:autoload (gnu packages openstack) (python-stevedore)
+  #:autoload (gnu packages pantheon) (granite)
+  #:autoload (gnu packages parallel) (parallel)
+  #:autoload (gnu packages pcre) (pcre2)
+  #:use-module (gnu packages perl) ; required by "guix build -d guix"
+  #:autoload (gnu packages perl-check)
+  (perl-test-deep perl-test-differences perl-test-dir perl-test-exception
+                  perl-test-file perl-test-file-contents perl-test-mockmodule
+                  perl-test-mockobject perl-test-nowarnings perl-test-pod
+                  perl-test-script perl-test-warn)
+  #:autoload (gnu packages perl-web) (perl-uri-db)
+  #:autoload (gnu packages pkg-config) (pkg-config)
+  #:autoload (gnu packages popt) (gflags)
+  #:autoload (gnu packages protobuf) (protobuf)
+  #:autoload (gnu packages python) (python python-wrapper)
+  #:autoload (gnu packages python-build) (python-setuptools-scm)
+  #:autoload (gnu packages python-check) (python-mypy)
+  #:autoload (gnu packages python-crypto) (python-cryptography python-pyaes)
+  #:autoload (gnu packages python-science) (python-pandas)
+  #:autoload (gnu packages python-web)
+  (python-rapidjson python-urllib3 python-uvloop)
+  #:autoload (gnu packages python-xyz)
+  (python-aiopg
+   python-async-timeout python-cli-helpers python-click python-configobj
+   python-croniter python-cython python-cython-3 python-decorator python-editor
+   python-greenlet python-ipython-sql python-mako python-numpy python-packaging
+   python-prompt-toolkit python-psutil python-pygments python-pyyaml
+   python-setproctitle python-six python-sortedcontainers python-tabulate
+   python-tenacity python-typing-extensions)
+  #:autoload (gnu packages qt)
+  (qcustomplot qhexedit qscintilla qtbase-5 qttools-5)
+  #:autoload (gnu packages readline) (readline)
+  #:autoload (gnu packages regex) (re2)
+  #:autoload (gnu packages rpc) (apache-thrift grpc)
+  #:autoload (gnu packages ruby)
+  (ruby ruby-httpclient ruby-multi-json ruby-progress_bar ruby-rubyzip
+        ruby-thor)
+  #:autoload (gnu packages sphinx) (python-sphinx)
+  #:autoload (gnu packages ssh) (libssh2)
+  #:autoload (gnu packages sqlite) (sqlite sqlite-next)
+  #:autoload (gnu packages syncthing) (go-github-com-lib-pq)
+  #:autoload (gnu packages tcl) (tcl)
+  #:autoload (gnu packages texinfo) (texinfo)
+  #:autoload (gnu packages textutils)
+  (go-github.com-mattn-go-runewidth utf8proc)
+  #:autoload (gnu packages time)
+  (python-ciso8601 python-dateutil python-iso8601 python-pendulum python-pytz)
+  #:use-module (gnu packages tls) ; required by "guix build -d guix"
+  #:autoload (gnu packages web) (perl-encode-locale perl-uri rapidjson)
+  #:autoload (gnu packages xdisorg) (python-pyperclip)
+  #:use-module (gnu packages xml) ; required by "guix build -d guix"
   #:use-module (guix gexp)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 15/30] gnu: icu4c: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-15-maximedevos@telenet.be
See first commit in the series for the procedure.

This helps with, but is not sufficient for, avoiding loading the Java-related
modules when only the guix package is required.
---
gnu/packages/icu4c.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

Toggle diff (20 lines)
diff --git a/gnu/packages/icu4c.scm b/gnu/packages/icu4c.scm
index 94a72fac15..ec4fa8354e 100644
--- a/gnu/packages/icu4c.scm
+++ b/gnu/packages/icu4c.scm
@@ -27,9 +27,10 @@
 
 (define-module (gnu packages icu4c)
   #:use-module (gnu packages)
-  #:use-module (gnu packages java)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages python)
+  #:autoload (gnu packages java)
+  (java-junit java-junitparams java-hamcrest-core)
+  #:use-module (gnu packages perl) ; required by "guix build -d guix"
+  #:use-module (gnu packages python) ; required by "guix build -d guix"
   #:use-module (guix gexp)
   #:use-module (guix licenses)
   #:use-module (guix packages)
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 14/30] gnu: docbook: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-14-maximedevos@telenet.be
See first commit in the series for the procedure.
---
gnu/packages/docbook.scm | 32 +++++++++++++++++++++-----------
1 file changed, 21 insertions(+), 11 deletions(-)

Toggle diff (45 lines)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index ae0ea07dbf..3539a3140e 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -26,17 +26,27 @@
 
 (define-module (gnu packages docbook)
   #:use-module (gnu packages)
-  #:use-module (gnu packages bash)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages imagemagick)
-  #:use-module (gnu packages inkscape)
-  #:use-module (gnu packages tex)
-  #:use-module (gnu packages texinfo)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages python)
-  #:use-module (gnu packages base)
-  #:use-module (gnu packages web-browsers)
-  #:use-module (gnu packages xml)
+  #:autoload (gnu packages bash) (bash-minimal)
+  #:use-module (gnu packages compression) ; required by "guix build -d guix"
+  #:autoload (gnu packages imagemagick) (imagemagick imagemagick/stable)
+  #:autoload (gnu packages inkscape) (inkscape/stable)
+  #:autoload (gnu packages tex)
+  (texlive-amsfonts
+   texlive-fonts-rsfs texlive-generic-iftex texlive-hyperref texlive-jadetex
+   texlive-latex-anysize texlive-latex-appendix texlive-latex-bookmark
+   texlive-latex-changebar texlive-latex-colortbl texlive-latex-fancybox
+   texlive-latex-fancyhdr texlive-latex-fancyvrb texlive-latex-float
+   texlive-latex-footmisc texlive-latex-jknapltx texlive-latex-listings
+   texlive-latex-multirow texlive-latex-overpic texlive-latex-pdfpages
+   texlive-latex-refcount texlive-latex-subfigure texlive-latex-titlesec
+   texlive-stmaryrd texlive-updmap.cfg texlive-wasysym)
+  #:autoload (gnu packages texinfo) (texinfo)
+  #:autoload (gnu packages perl) (perl perl-sgmls)
+  #:use-module (gnu packages base) ; required by "guix build -d guix"
+  #:autoload (gnu packages web-browsers) (lynx)
+  #:autoload (gnu packages xml)
+  (libxslt openjade opensp perl-xml-namespacesupport perl-xml-parser
+           perl-xml-sax perl-xml-sax-base)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 16/30] gnu: curl: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-16-maximedevos@telenet.be
See first commit in the series for the procedure.
This helps with, but is not sufficient for, avoiding loading the Go-related
modules when only the guix package is required.
---
gnu/packages/curl.scm | 31 +++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)

Toggle diff (44 lines)
diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm
index d82d94abff..88a9a9d070 100644
--- a/gnu/packages/curl.scm
+++ b/gnu/packages/curl.scm
@@ -44,20 +44,23 @@ (define-module (gnu packages curl)
   #:use-module (guix build-system meson)
   #:use-module ((guix search-paths) #:select ($SSL_CERT_DIR $SSL_CERT_FILE))
   #:use-module (gnu packages)
-  #:use-module (gnu packages check)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages golang)
-  #:use-module (gnu packages guile)
-  #:use-module (gnu packages kerberos)
-  #:use-module (gnu packages logging)
-  #:use-module (gnu packages libevent)
-  #:use-module (gnu packages libidn)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages python)
-  #:use-module (gnu packages ssh)
-  #:use-module (gnu packages tls)
-  #:use-module (gnu packages web)
+  #:autoload (gnu packages check) (doctest)
+  #:use-module (gnu packages compression) ; required by "guix build -d guix"
+  #:autoload (gnu packages golang)
+  (go-github-com-alsm-ioprogress
+   go-github-com-aki237-nscjar go-github-com-urfave-cli go-golang-org-x-crypto
+   go-golang-org-x-sys)
+  #:autoload (gnu packages guile) (guile-2.2 guile-3.0)
+  #:use-module (gnu packages kerberos) ; required by "guix build -d guix"
+  #:autoload (gnu packages logging) (spdlog)
+  #:autoload (gnu packages libevent) (libevent)
+  #:use-module (gnu packages libidn) ; required by "guix build -d guix"
+  #:use-module (gnu packages perl) ; required by "guix build -d guix"
+  #:use-module (gnu packages pkg-config) ; required by "guix build -d guix"
+  #:use-module (gnu packages python) ; required by "guix build -d guix"
+  #:autoload (gnu packages ssh) (libssh2)
+  #:use-module (gnu packages tls) ; required by "guix build -d guix"
+  #:use-module (gnu packages web) ; required by "guix build -d guix"
   #:use-module (srfi srfi-1))
 
 (define-public curl
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 17/30] gnu: elf: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-17-maximedevos@telenet.be
See first commit in the series for the procedure.
---
gnu/packages/elf.scm | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)

Toggle diff (32 lines)
diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm
index 8cc2ff3637..46f2113624 100644
--- a/gnu/packages/elf.scm
+++ b/gnu/packages/elf.scm
@@ -33,16 +33,15 @@ (define-module (gnu packages elf)
   #:use-module (guix build-system gnu)
   #:use-module ((guix licenses) #:select (gpl3+ lgpl3+ lgpl2.0+))
   #:use-module (gnu packages)
-  #:use-module (gnu packages autotools)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages documentation)
-  #:use-module (gnu packages gcc)
-  #:use-module (gnu packages m4)
-  #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages python)
-  #:use-module (gnu packages sphinx)
-  #:use-module (gnu packages texinfo)
-  #:use-module (gnu packages xml)
+  #:use-module (gnu packages autotools) ; required by "guix build -d guix"
+  #:autoload (gnu packages compression) (zlib)
+  #:autoload (gnu packages gcc) (gcc)
+  #:autoload (gnu packages m4) (m4)
+  #:autoload (gnu packages pkg-config) (pkg-config)
+  #:autoload (gnu packages python) (python)
+  #:autoload (gnu packages sphinx) (python-sphinx)
+  #:autoload (gnu packages texinfo) (texinfo)
+  #:autoload (gnu packages xml) (libxml2)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26))
 
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 13/30] gnu: linux: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-13-maximedevos@telenet.be
See first commit in the series for the procedure.
---
gnu/packages/linux.scm | 167 +++++++++++++++++++++--------------------
1 file changed, 87 insertions(+), 80 deletions(-)

Toggle diff (180 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index d8f1f6912e..d387d699a9 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -82,86 +82,93 @@
 
 (define-module (gnu packages linux)
   #:use-module (gnu packages)
-  #:use-module (gnu packages acl)
-  #:use-module (gnu packages admin)
-  #:use-module (gnu packages algebra)
-  #:use-module (gnu packages audio)
-  #:use-module (gnu packages autotools)
-  #:use-module (gnu packages avahi)
-  #:use-module (gnu packages backup)
-  #:use-module (gnu packages base)
-  #:use-module (gnu packages bash)
-  #:use-module (gnu packages bison)
-  #:use-module (gnu packages boost)
-  #:use-module (gnu packages calendar)
-  #:use-module (gnu packages check)
-  #:use-module (gnu packages cpio)
-  #:use-module (gnu packages crypto)
-  #:use-module (gnu packages cryptsetup)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages databases)
-  #:use-module (gnu packages datastructures)
-  #:use-module (gnu packages dbm)
-  #:use-module (gnu packages docbook)
-  #:use-module (gnu packages documentation)
-  #:use-module (gnu packages elf)
-  #:use-module (gnu packages flex)
-  #:use-module (gnu packages file)
-  #:use-module (gnu packages freedesktop)
-  #:use-module (gnu packages gawk)
-  #:use-module (gnu packages gcc)
-  #:use-module (gnu packages gettext)
-  #:use-module (gnu packages glib)
-  #:use-module (gnu packages gnome)
-  #:use-module (gnu packages gnupg)
-  #:use-module (gnu packages golang)
-  #:use-module (gnu packages gperf)
-  #:use-module (gnu packages gstreamer)
-  #:use-module (gnu packages gtk)
-  #:use-module (gnu packages haskell-apps)
-  #:use-module (gnu packages haskell-xyz)
-  #:use-module (gnu packages libunwind)
-  #:use-module (gnu packages libusb)
-  #:use-module (gnu packages llvm)
-  #:use-module (gnu packages lua)
-  #:use-module (gnu packages man)
-  #:use-module (gnu packages maths)
-  #:use-module (gnu packages multiprecision)
-  #:use-module (gnu packages ncurses)
-  #:use-module (gnu packages netpbm)
-  #:use-module (gnu packages networking)
-  #:use-module (gnu packages ninja)
-  #:use-module (gnu packages nss)
-  #:use-module (gnu packages onc-rpc)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages pciutils)
-  #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages popt)
-  #:use-module (gnu packages pulseaudio)
-  #:use-module (gnu packages python)
-  #:use-module (gnu packages python-xyz)
-  #:use-module (gnu packages readline)
-  #:use-module (gnu packages rrdtool)
-  #:use-module (gnu packages samba)
-  #:use-module (gnu packages sdl)
-  #:use-module (gnu packages serialization)
-  #:use-module (gnu packages slang)
-  #:use-module (gnu packages sqlite)
-  #:use-module (gnu packages texinfo)
-  #:use-module (gnu packages textutils)
-  #:use-module (gnu packages tls)
-  #:use-module (gnu packages valgrind)
-  #:use-module (gnu packages video)
-  #:use-module (gnu packages vulkan)
-  #:use-module (gnu packages web)
-  #:use-module (gnu packages xiph)
-  #:use-module (gnu packages xml)
-  #:use-module (gnu packages xdisorg)
-  #:use-module (gnu packages xorg)
-  #:use-module (gnu packages groff)
-  #:use-module (gnu packages selinux)
-  #:use-module (gnu packages sphinx)
-  #:use-module (gnu packages swig)
+  #:autoload (gnu packages acl) (acl)
+  #:use-module (gnu packages admin) ; required by "guix build -d guix"
+  #:autoload (gnu packages algebra) (bc)
+  #:autoload (gnu packages audio) (jack-1 jack-2 ldacbt)
+  #:autoload (gnu packages autotools)
+  (autoconf autoconf-2.71 autoconf-archive automake config libtool)
+  #:autoload (gnu packages avahi) (avahi)
+  #:autoload (gnu packages backup) (libarchive)
+  #:autoload (gnu packages base)
+  (binutils canonical-package coreutils diffutils findutils grep
+            make-ld-wrapper patch sed tar which)
+  #:autoload (gnu packages bash) (bash bash-minimal)
+  #:use-module (gnu packages bison) ; required by "guix build -d guix"
+  #:use-module (gnu packages boost) ; required by "guix build -d guix"
+  #:autoload (gnu packages calendar) (libical)
+  #:autoload (gnu packages check)
+  (check cmocka cppcheck python-discover python-pytest)
+  #:autoload (gnu packages cpio) (cpio)
+  #:autoload (gnu packages crypto) (keyutils)
+  #:autoload (gnu packages cryptsetup) (cryptsetup)
+  #:use-module (gnu packages compression) ; required by "guix build -d guix"
+  #:autoload (gnu packages databases) (mysql postgresql)
+  #:autoload (gnu packages datastructures) (liburcu)
+  #:use-module (gnu packages dbm) ; required by "guix build -d guix"
+  #:autoload (gnu packages docbook) (docbook2x docbook-xml-4.2 docbook-xsl)
+  #:autoload (gnu packages documentation) (asciidoc)
+  #:autoload (gnu packages elf) (elfutils)
+  #:use-module (gnu packages flex) ; required by "guix build -d guix"
+  #:use-module (gnu packages file) ; required by "guix build -d guix"
+  #:autoload (gnu packages freedesktop) (elogind libatasmart libinput)
+  #:autoload (gnu packages gawk) (gawk)
+  #:autoload (gnu packages gcc) (libiberty)
+  #:use-module (gnu packages gettext) ; required by "guix build -d guix"
+  #:autoload (gnu packages glib)
+  (dbus python-pygobject glib gobject-introspection intltool)
+  #:autoload (gnu packages gnome) (libgudev)
+  #:autoload (gnu packages gnupg) (gnupg)
+  #:autoload (gnu packages golang) (go go-golang-org-x-sys)
+  #:autoload (gnu packages gperf) (gperf)
+  #:autoload (gnu packages gstreamer) (gstreamer gst-plugins-base)
+  #:autoload (gnu packages gtk) (cairo gtk+ gtk+-2)
+  #:autoload (gnu packages haskell-apps) (shellcheck)
+  #:autoload (gnu packages haskell-xyz) (pandoc)
+  #:autoload (gnu packages libunwind) (libunwind)
+  #:autoload (gnu packages libusb) (libmtp libusb)
+  #:autoload (gnu packages llvm) (clang-toolchain-9)
+  #:autoload (gnu packages lua) (lua luajit)
+  #:autoload (gnu packages man) (mandoc)
+  #:autoload (gnu packages maths) (gnuplot)
+  #:autoload (gnu packages multiprecision) (gmp mpc mpfr)
+  #:use-module (gnu packages ncurses) ; required by "guix build -d guix"
+  #:autoload (gnu packages netpbm) (netpbm)
+  #:autoload (gnu packages networking) (ethtool go-netns)
+  #:autoload (gnu packages ninja) (ninja)
+  #:autoload (gnu packages nss) (nss)
+  #:autoload (gnu packages onc-rpc) (libtirpc)
+  #:use-module (gnu packages perl) ; required by "guix build -d guix"
+  #:autoload (gnu packages pciutils) (pciutils)
+  #:use-module (gnu packages pkg-config) ; required by "guix build -d guix"
+  #:autoload (gnu packages popt) (popt)
+  #:autoload (gnu packages pulseaudio) (libsamplerate libsndfile pulseaudio)
+  #:autoload (gnu packages python) (python python-2 python-3 python-wrapper)
+  #:autoload (gnu packages python-xyz) (python-docutils)
+  #:autoload (gnu packages readline) (readline)
+  #:autoload (gnu packages rrdtool) (rrdtool)
+  #:autoload (gnu packages samba) (talloc talloc/static)
+  #:autoload (gnu packages sdl) (sdl2)
+  #:autoload (gnu packages serialization) (cereal yaml-cpp)
+  #:autoload (gnu packages slang) (slang)
+  #:autoload (gnu packages sqlite) (sqlite)
+  #:autoload (gnu packages texinfo) (texinfo)
+  #:autoload (gnu packages textutils) (libconfuse)
+  #:autoload (gnu packages tls) (openssl)
+  #:autoload (gnu packages valgrind) (valgrind)
+  #:autoload (gnu packages video) (ffmpeg libva)
+  #:autoload (gnu packages vulkan) (vulkan-headers vulkan-loader)
+  #:autoload (gnu packages web) (jansson json-c)
+  #:autoload (gnu packages xiph) (speex)
+  #:autoload (gnu packages xml)
+  (expat libxml2 libxslt pugixml xmlto)
+  #:autoload (gnu packages xdisorg) (libdrm)
+  #:autoload (gnu packages xorg)
+  (libevdev libpciaccess libxcb libxrandr libxtst)
+  #:autoload (gnu packages groff) (groff)
+  #:autoload (gnu packages selinux) (libselinux)
+  #:autoload (gnu packages sphinx) (python-sphinx)
+  #:autoload (gnu packages swig) (swig)
   #:use-module (guix platform)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system copy)
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 18/30] gnu: compression: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-18-maximedevos@telenet.be
See first commit in the series for the procedure.
This helps with, but is not sufficient for, avoiding the GTK and Qt stacks.
---
gnu/packages/compression.scm | 53 ++++++++++++++++++------------------
1 file changed, 26 insertions(+), 27 deletions(-)

Toggle diff (66 lines)
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 684979018c..ef0f952047 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -66,33 +66,32 @@ (define-module (gnu packages compression)
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
-  #:use-module (gnu packages assembly)
-  #:use-module (gnu packages autotools)
-  #:use-module (gnu packages backup)
-  #:use-module (gnu packages base)
-  #:use-module (gnu packages benchmark)
-  #:use-module (gnu packages boost)
-  #:use-module (gnu packages check)
-  #:use-module (gnu packages curl)
-  #:use-module (gnu packages documentation)
-  #:use-module (gnu packages file)
-  #:use-module (gnu packages gettext)
-  #:use-module (gnu packages glib)
-  #:use-module (gnu packages gnome)
-  #:use-module (gnu packages gnupg)
-  #:use-module (gnu packages gtk)
-  #:use-module (gnu packages llvm)
-  #:use-module (gnu packages man)
-  #:use-module (gnu packages maths)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages python)
-  #:use-module (gnu packages qt)
-  #:use-module (gnu packages selinux)
-  #:use-module (gnu packages tls)
-  #:use-module (gnu packages valgrind)
-  #:use-module (gnu packages version-control)
-  #:use-module (gnu packages xml)
+  #:autoload (gnu packages assembly) (nasm yasm)
+  #:autoload (gnu packages autotools) (autoconf automake libtool)
+  #:autoload (gnu packages backup) (libarchive)
+  #:autoload (gnu packages base) (tzdata-for-tests which)
+  #:autoload (gnu packages benchmark) (benchmark)
+  #:autoload (gnu packages boost) (boost)
+  #:autoload (gnu packages check) (googletest)
+  #:autoload (gnu packages curl) (curl)
+  #:autoload (gnu packages documentation) (doxygen)
+  #:autoload (gnu packages file) (file)
+  #:autoload (gnu packages gettext) (gettext-minimal)
+  #:autoload (gnu packages glib) (glib gobject-introspection intltool)
+  #:autoload (gnu packages gnome) (adwaita-icon-theme json-glib vala)
+  #:autoload (gnu packages gnupg) (gnupg gpgme)
+  #:autoload (gnu packages gtk) (gtk+)
+  #:autoload (gnu packages llvm)
+  (clang-toolchain-6 libcxxabi-6 libcxx+libcxxabi-6)
+  #:autoload (gnu packages man) (help2man)
+  #:use-module (gnu packages perl) ; required by "guix build -d guix"
+  #:use-module (gnu packages pkg-config) ; required by "guix build -d guix"
+  #:use-module (gnu packages python) ; required by "guix build -d guix"
+  #:autoload (gnu packages qt) (qtbase-5)
+  #:autoload (gnu packages selinux) (libselinux)
+  #:autoload (gnu packages tls) (gnutls openssl)
+  #:autoload (gnu packages valgrind) (valgrind)
+  #:autoload (gnu packages xml) (libxslt)
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1))
 
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 19/30] gnu: hurd: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-19-maximedevos@telenet.be
See first commit in the series for the procedure.
---
gnu/packages/hurd.scm | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)

Toggle diff (43 lines)
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 1dcec3ea3c..2735babc4b 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -31,21 +31,21 @@ (define-module (gnu packages hurd)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
-  #:use-module (gnu packages autotools)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages flex)
-  #:use-module (gnu packages gawk)
-  #:use-module (gnu packages gnupg)
-  #:use-module (gnu packages bison)
-  #:use-module (gnu packages libdaemon)
-  #:use-module (gnu packages linux)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages base)
-  #:use-module (gnu packages bash)
-  #:use-module (gnu packages texinfo)
-  #:use-module (gnu packages onc-rpc)
-  #:use-module (gnu packages xorg) ; libpciaccess
+  #:use-module (gnu packages autotools) ; required by "guix build -d guix --system=i586-gnu"
+  #:autoload (gnu packages compression) (zlib)
+  #:use-module (gnu packages flex) ; required by "guix build -d guix --system=i586-gnu"
+  #:autoload (gnu packages gawk) (gawk)
+  #:autoload (gnu packages gnupg) (libgcrypt)
+  #:use-module (gnu packages bison) ; required by "guix build -d guix --system=i586-gnu"
+  #:autoload (gnu packages libdaemon) (libdaemon)
+  #:autoload (gnu packages linux) (util-linux)
+  #:use-module (gnu packages perl) ; required by "guix build -d guix --system=i586-gnu"
+  #:autoload (gnu packages pkg-config) (pkg-config)
+  #:use-module (gnu packages base) ; required by "guix build -d guix --system=i586-gnu"
+  #:autoload (gnu packages bash) (bash-minimal)
+  #:use-module (gnu packages texinfo) ; required by "guix build -d guix --system=i586-gnu"
+  #:autoload (gnu packages onc-rpc) (libtirpc/hurd)
+  #:autoload (gnu packages xorg) (libpciaccess)
   #:use-module (guix git-download)
   #:export (hurd-system?
             hurd-target?))
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 20/30] gnu: algebra: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-20-maximedevos@telenet.be
See first commit in the series for the procedure.
This helps with, but is not sufficient for, avoiding Java.
---
gnu/packages/algebra.scm | 66 +++++++++++++++++++++-------------------
1 file changed, 35 insertions(+), 31 deletions(-)

Toggle diff (79 lines)
diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index 8ccb44c434..b52ace9e98 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -32,37 +32,41 @@
 
 (define-module (gnu packages algebra)
   #:use-module (gnu packages)
-  #:use-module (gnu packages autotools)
-  #:use-module (gnu packages bison)
-  #:use-module (gnu packages boost)
-  #:use-module (gnu packages check)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages cpp)
-  #:use-module (gnu packages documentation)
-  #:use-module (gnu packages ed)
-  #:use-module (gnu packages flex)
-  #:use-module (gnu packages fltk)
-  #:use-module (gnu packages gcc)
-  #:use-module (gnu packages gl)
-  #:use-module (gnu packages graphviz)
-  #:use-module (gnu packages image)
-  #:use-module (gnu packages java)
-  #:use-module (gnu packages maths)
-  #:use-module (gnu packages mpi)
-  #:use-module (gnu packages multiprecision)
-  #:use-module (gnu packages ocaml)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages pulseaudio)
-  #:use-module (gnu packages python)
-  #:use-module (gnu packages python-xyz)
-  #:use-module (gnu packages readline)
-  #:use-module (gnu packages shells)
-  #:use-module (gnu packages tex)
-  #:use-module (gnu packages texinfo)
-  #:use-module (gnu packages xiph)
-  #:use-module (gnu packages xml)
-  #:use-module (gnu packages xorg)
+  #:autoload (gnu packages autotools) (autoconf automake libtool)
+  #:autoload (gnu packages bison) (bison)
+  #:autoload (gnu packages boost) (boost)
+  #:autoload (gnu packages check)
+  (doctest googlebenchmark googletest python-pytest)
+  #:autoload (gnu packages compression) (zlib)
+  #:autoload (gnu packages cpp) (xsimd xtl)
+  #:autoload (gnu packages documentation) (doxygen)
+  #:autoload (gnu packages ed) (ed)
+  #:autoload (gnu packages flex) (flex)
+  #:autoload (gnu packages fltk) (fltk)
+  #:autoload (gnu packages gcc) (gcc-7)
+  #:autoload (gnu packages gl) (mesa)
+  #:autoload (gnu packages graphviz) (graphviz)
+  #:autoload (gnu packages image) (libjpeg-turbo libpng)
+  #:autoload (gnu packages java)
+  (icedtea-8 java-commons-math3 java-hamcrest-core java-junit)
+  #:autoload (gnu packages maths) (cddlib glpk-4 gnuplot gsl lapack openblas)
+  #:autoload (gnu packages mpi) (openmpi %openmpi-setup)
+  #:autoload (gnu packages multiprecision) (cln gmp mpc mpfi mpfr)
+  #:autoload (gnu packages ocaml) (hevea)
+  #:autoload (gnu packages perl) (perl)
+  #:autoload (gnu packages pkg-config) (pkg-config)
+  #:autoload (gnu packages pulseaudio) (libsamplerate)
+  #:autoload (gnu packages python) (python-2 python-wrapper)
+  #:autoload (gnu packages python-xyz)
+  (python-cysignals python-cython python-flake8 python-numpy)
+  #:autoload (gnu packages readline) (readline)
+  #:autoload (gnu packages shells) (tcsh)
+  #:autoload (gnu packages tex)
+  (texlive-amsfonts texlive-tiny texlive-updmap.cfg)
+  #:autoload (gnu packages texinfo) (texinfo)
+  #:autoload (gnu packages xiph) (ao)
+  #:autoload (gnu packages xml) (libxml2)
+  #:autoload (gnu packages xorg) (libx11 libxft libxinerama libxt)
   #:use-module (guix build-system ant)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system cmake)
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 28/30] gnu: cmake: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-28-maximedevos@telenet.be
See first commit in the series for the procedure.
---
gnu/packages/cmake.scm | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)

Toggle diff (39 lines)
diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index cf930c57fc..7c4073292c 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -40,19 +40,19 @@ (define-module (gnu packages cmake)
   #:use-module (guix build-system emacs)
   #:use-module ((guix search-paths) #:select ($SSL_CERT_DIR $SSL_CERT_FILE))
   #:use-module (gnu packages)
-  #:use-module (gnu packages backup)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages crypto)
-  #:use-module (gnu packages curl)
-  #:use-module (gnu packages file)
-  #:use-module (gnu packages hurd)
-  #:use-module (gnu packages kde-frameworks)
-  #:use-module (gnu packages libevent)
-  #:use-module (gnu packages ncurses)
-  #:use-module (gnu packages serialization)
-  #:use-module (gnu packages sphinx)
-  #:use-module (gnu packages texinfo)
-  #:use-module (gnu packages xml)
+  #:use-module (gnu packages backup) ; required by "guix build -d guix"
+  #:use-module (gnu packages compression) ; required by "guix build -d guix"
+  #:use-module (gnu packages crypto) ; required by "guix build -d guix"
+  #:use-module (gnu packages curl) ; required by "guix build -d guix"
+  #:use-module (gnu packages file) ; required by "guix build -d guix"
+  #:use-module (gnu packages hurd) ; required by "guix build -d guix"
+  #:autoload (gnu packages kde-frameworks) (extra-cmake-modules)
+  #:use-module (gnu packages libevent) ; required by "guix build -d guix"
+  #:autoload (gnu packages ncurses) (ncurses)
+  #:use-module (gnu packages serialization) ; required by "guix build -d guix"
+  #:autoload (gnu packages sphinx) (python-sphinx)
+  #:autoload (gnu packages texinfo) (texinfo)
+  #:use-module (gnu packages xml) ; required by "guix build -d guix"
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1))
 
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 21/30] gnu: version-control: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-21-maximedevos@telenet.be
See first commit in the series for the procedure.
This helps with, but is not sufficient for, avoiding loading the Go-related
modules when only the guix package is required.
---
gnu/packages/version-control.scm | 133 +++++++++++++++++--------------
1 file changed, 75 insertions(+), 58 deletions(-)

Toggle diff (146 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 277ea2835b..2681929715 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -77,64 +77,81 @@ (define-module (gnu packages version-control)
   #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
-  #:use-module (gnu packages apr)
-  #:use-module (gnu packages autotools)
-  #:use-module (gnu packages documentation)
-  #:use-module (gnu packages base)
-  #:use-module (gnu packages bash)
-  #:use-module (gnu packages bison)
-  #:use-module (gnu packages boost)
-  #:use-module (gnu packages check)
-  #:use-module (gnu packages cook)
-  #:use-module (gnu packages curl)
-  #:use-module (gnu packages docbook)
-  #:use-module (gnu packages ed)
-  #:use-module (gnu packages file)
-  #:use-module (gnu packages flex)
-  #:use-module (gnu packages freedesktop)
-  #:use-module (gnu packages gettext)
-  #:use-module (gnu packages gl)
-  #:use-module (gnu packages glib)
-  #:use-module (gnu packages gnome)
-  #:use-module (gnu packages gnupg)
-  #:use-module (gnu packages golang)
-  #:use-module (gnu packages groff)
-  #:use-module (gnu packages guile)
-  #:use-module (gnu packages guile-xyz)
-  #:use-module (gnu packages image)
-  #:use-module (gnu packages linux)
-  #:use-module (gnu packages mail)
-  #:use-module (gnu packages maths)
-  #:use-module (gnu packages nano)
-  #:use-module (gnu packages ncurses)
-  #:use-module (gnu packages ssh)
-  #:use-module (gnu packages web)
-  #:use-module (gnu packages openstack)
-  #:use-module (gnu packages pcre)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages perl-check)
-  #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages python)
-  #:use-module (gnu packages python-build)
-  #:use-module (gnu packages python-check)
-  #:use-module (gnu packages python-crypto)
-  #:use-module (gnu packages python-web)
-  #:use-module (gnu packages python-xyz)
-  #:use-module (gnu packages readline)
-  #:use-module (gnu packages rsync)
-  #:use-module (gnu packages sqlite)
-  #:use-module (gnu packages texinfo)
-  #:use-module (gnu packages admin)
-  #:use-module (gnu packages xml)
-  #:use-module (gnu packages emacs)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages sdl)
-  #:use-module (gnu packages swig)
-  #:use-module (gnu packages sync)
-  #:use-module (gnu packages tcl)
-  #:use-module (gnu packages textutils)
-  #:use-module (gnu packages time)
-  #:use-module (gnu packages tls)
+  #:use-module (gnu packages apr) ; required by "guix build -d guix"
+  #:autoload (gnu packages autotools) (autoconf automake)
+  #:autoload (gnu packages documentation) (asciidoc)
+  #:autoload (gnu packages base) (coreutils findutils tzdata which)
+  #:use-module (gnu packages bash) ; required by "guix build -d guix"
+  #:autoload (gnu packages bison) (bison)
+  #:autoload (gnu packages boost) (boost)
+  #:autoload (gnu packages check)
+  (python-coverage python-nose python-pytest python-subunit python-testrepository)
+  #:autoload (gnu packages cook) (cook)
+  #:use-module (gnu packages curl) ; required by "guix build -d guix"
+  #:use-module (gnu packages docbook) ; required by "guix build -d guix"
+  #:autoload (gnu packages ed) (ed)
+  #:autoload (gnu packages file) (file)
+  #:autoload (gnu packages flex) (flex)
+  #:autoload (gnu packages freedesktop) (xdg-utils)
+  #:use-module (gnu packages gettext) ; required by "guix build -d guix"
+  #:autoload (gnu packages gl) (ftgl glew glu mesa)
+  #:use-module (gnu packages glib) ; required by "guix build -d guix"
+  #:use-module (gnu packages gnome) ; required by "guix build -d guix"
+  #:autoload (gnu packages gnupg) (gnupg guile-gcrypt python-pygpgme)
+  #:autoload (gnu packages golang)
+  (go-github-com-alcortesm-tgz
+   go-github-com-emirpasic-gods go-github-com-go-git-gcfg
+   go-github-com-go-git-go-billy go-github-com-go-git-go-git-fixtures
+   go-github-com-imdario-mergo go-github-com-jbenet-go-context
+   go-github-com-kevinburke-ssh-config go-github-com-mattn-go-isatty
+   go-github-com-mitchellh-go-homedir go-github-com-motemen-go-colorine
+   go-github-com-saracen-walker go-github-com-sergi-go-diff
+   go-github-com-songmu-gitconfig go-github-com-urfave-cli-v2
+   go-github-com-xanzy-ssh-agent go-golang-org-x-crypto go-golang-org-x-net
+   go-golang-org-x-net-html go-golang-org-x-text go-golang.org-x-sync-errgroup
+   go-gopkg-in-check-v1 go-gopkg-in-warnings)
+  #:autoload (gnu packages groff) (groff ronn-ng)
+  #:autoload (gnu packages guile) (guile-3.0 guile-git)
+  #:autoload (gnu packages guile-xyz)
+  (guile-commonmark guile-fibers guile-syntax-highlight-for-gitile)
+  #:autoload (gnu packages image) (libpng)
+  #:autoload (gnu packages linux) (e2fsprogs)
+  #:autoload (gnu packages mail) (python-dkimpy sendmail)
+  #:autoload (gnu packages maths) (glm)
+  #:autoload (gnu packages nano) (nano)
+  #:autoload (gnu packages ncurses) (ncurses)
+  #:use-module (gnu packages ssh) ; required by "guix build -d guix"
+  #:use-module (gnu packages web) ; required by "guix build -d guix"
+  #:use-module (gnu packages pcre) ; required by "guix build -d guix"
+  #:use-module (gnu packages perl) ; required by "guix build -d guix"
+  #:autoload (gnu packages perl-check) (perl-test-harness perl-test-most)
+  #:use-module (gnu packages pkg-config) ; required by "guix build -d guix"
+  #:use-module (gnu packages python) ; requiredby "guix build -d guix"
+  #:autoload (gnu packages python-build) (python-toml)
+  #:autoload (gnu packages python-check) (python-covdefaults python-pytest-env python-re-assert)
+  #:autoload (gnu packages python-crypto) (python-paramiko python-pynacl python-pycryptodome)
+  #:autoload (gnu packages python-web) (python-launchpadlib python-requests)
+  #:autoload (gnu packages python-xyz)
+  (python-cfgv
+   python-click python-clint python-configobj python-cython python-ddt
+   python-distlib python-dnspython python-docutils python-dulwich
+   python-fastbencode python-fastimport python-identify python-markdown
+   python-nodeenv python-packaging python-patiencediff python-pygit2
+   python-pygments python-pyyaml python-sh python-smmap python-typing-extensions
+   python-virtualenv)
+  #:autoload (gnu packages readline) (readline)
+  #:use-module (gnu packages sqlite) ; required by "guix build -d guix"
+  #:autoload (gnu packages admin) (inetutils)
+  #:use-module (gnu packages xml) ; required by "guix build -d guix"
+  #:autoload (gnu packages emacs) (emacs-minimal)
+  #:use-module (gnu packages compression) ; required by "guix build -d guix"
+  #:autoload (gnu packages sdl) (sdl-union sdl2 sdl2-image)
+  #:use-module (gnu packages swig) ; required by "guix build -d guix"
+  #:autoload (gnu packages sync) (rclone)
+  #:use-module (gnu packages tcl) ; required by "guix build -d guix"
+  #:use-module (gnu packages textutils) ; required by "guix build -d guix"
+  #:autoload (gnu packages time) (python-arrow python-dateutil)
+  #:use-module (gnu packages tls) ; required by "guix build -d guix"
   #:use-module (gnu packages)
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1))
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 24/30] gnu: web: Autoload unless used by Guix.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-24-maximedevos@telenet.be
See first commit in the series for the procedure.
This helps with, but is not sufficient for, avoiding Java, Go and Qt.
---
gnu/packages/web.scm | 219 +++++++++++++++++++++++++------------------
1 file changed, 128 insertions(+), 91 deletions(-)

Toggle diff (232 lines)
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index b687e4e3e7..4d269169a8 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -98,97 +98,134 @@ (define-module (gnu packages web)
   #:use-module (guix build-system scons)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
-  #:use-module (gnu packages admin)
-  #:use-module (gnu packages adns)
-  #:use-module (gnu packages apr)
-  #:use-module (gnu packages autotools)
-  #:use-module (gnu packages base)
-  #:use-module (gnu packages bash)
-  #:use-module (gnu packages bison)
-  #:use-module (gnu packages bittorrent)
-  #:use-module (gnu packages boost)
-  #:use-module (gnu packages build-tools)
-  #:use-module (gnu packages check)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages cpp)
-  #:use-module (gnu packages crates-gtk)
-  #:use-module (gnu packages crates-io)
-  #:use-module (gnu packages curl)
-  #:use-module (gnu packages cyrus-sasl)
-  #:use-module (gnu packages databases)
-  #:use-module (gnu packages django)
-  #:use-module (gnu packages docbook)
-  #:use-module (gnu packages documentation)
-  #:use-module (gnu packages emacs)
-  #:use-module (gnu packages emacs-xyz)
-  #:use-module (gnu packages flex)
-  #:use-module (gnu packages fontutils)
-  #:use-module (gnu packages freedesktop)
-  #:use-module (gnu packages gcc)
-  #:use-module (gnu packages gd)
-  #:use-module (gnu packages gettext)
-  #:use-module (gnu packages glib)
-  #:use-module (gnu packages gnome)
-  #:use-module (gnu packages gnu-doc)
-  #:use-module (gnu packages gnunet)
-  #:use-module (gnu packages gnupg)
-  #:use-module (gnu packages golang)
-  #:use-module (gnu packages gperf)
-  #:use-module (gnu packages graphviz)
-  #:use-module (gnu packages gtk)
-  #:use-module (gnu packages guile)
-  #:use-module (gnu packages guile-xyz)
-  #:use-module (gnu packages hurd)
-  #:use-module (gnu packages icu4c)
-  #:use-module (gnu packages image)
-  #:use-module (gnu packages java)
-  #:use-module (gnu packages jemalloc)
-  #:use-module (gnu packages imagemagick)
-  #:use-module (gnu packages kde)
-  #:use-module (gnu packages kerberos)
-  #:use-module (gnu packages libevent)
-  #:use-module (gnu packages libidn)
-  #:use-module (gnu packages libunistring)
-  #:use-module (gnu packages libunwind)
-  #:use-module (gnu packages linux)
-  #:use-module (gnu packages lisp-xyz)
-  #:use-module (gnu packages lsof)
-  #:use-module (gnu packages lua)
-  #:use-module (gnu packages mail)
-  #:use-module (gnu packages man)
-  #:use-module (gnu packages markup)
-  #:use-module (gnu packages ncurses)
-  #:use-module (gnu packages networking)
-  #:use-module (gnu packages node)
-  #:use-module (gnu packages nss)
-  #:use-module (gnu packages openldap)
-  #:use-module (gnu packages openstack)
-  #:use-module (gnu packages package-management)
-  #:use-module (gnu packages pcre)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages perl-check)
-  #:use-module (gnu packages python)
-  #:use-module (gnu packages python-build)
-  #:use-module (gnu packages python-check)
-  #:use-module (gnu packages python-crypto)
-  #:use-module (gnu packages python-web)
-  #:use-module (gnu packages python-xyz)
-  #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages qt)
-  #:use-module (gnu packages re2c)
-  #:use-module (gnu packages readline)
-  #:use-module (gnu packages search)
-  #:use-module (gnu packages serialization)
-  #:use-module (gnu packages sphinx)
-  #:use-module (gnu packages texinfo)
-  #:use-module (gnu packages textutils)
-  #:use-module (gnu packages tls)
-  #:use-module (gnu packages valgrind)
-  #:use-module (gnu packages version-control)
-  #:use-module (gnu packages video)
-  #:use-module (gnu packages vim)
-  #:use-module (gnu packages wget)
-  #:use-module (gnu packages xml)
+  #:autoload (gnu packages admin) (netcat)
+  #:use-module (gnu packages adns) ; required by "guix build -d guix"
+  #:use-module (gnu packages apr) ; required by "guix build -d guix"
+  #:autoload (gnu packages autotools) (autoconf automake libtool)
+  #:use-module (gnu packages base) ; required by "guix build -d guix"
+  #:autoload (gnu packages bash) (bash-minimal)
+  #:autoload (gnu packages bison) (bison)
+  #:autoload (gnu packages bittorrent) (aria2)
+  #:autoload (gnu packages boost) (boost)
+  #:use-module (gnu packages build-tools) ; required by "guix build -d guix"
+  #:use-module (gnu packages check) ; required by "guix build -d guix"
+  #:use-module (gnu packages compression) ; required by "guix build -d guix"
+  #:autoload (gnu packages cpp) (cpp-mustache)
+  #:autoload (gnu packages crates-gtk) (rust-gdk-0.13 rust-gtk-0.8)
+  #:autoload (gnu packages crates-io)
+  (rust-ansi-parser-0.6
+   rust-assert-cmd-1 rust-atty-0.2 rust-base64-0.13
+   rust-chrono-0.4 rust-clap-2 rust-cssparser-0.28 rust-dirs-2
+   rust-encoding-rs-0.8 rust-html5ever-0.24 rust-linkify-0.4 rust-native-tls-0.2
+   rust-open-1 rust-percent-encoding-2 rust-regex-1 rust-reqwest-0.11
+   rust-sha2-0.9 rust-url-2)
+  #:autoload (gnu packages curl) (curl)
+  #:autoload (gnu packages cyrus-sasl) (cyrus-sasl)
+  #:autoload (gnu packages databases)
+  (ephemeralpg perl-dbd-sqlite perl-dbix-class perl-dbix-class-cursor-cached
+               perl-dbix-class-schema-loader perl-db-file postgresql-13
+               sqitch)
+  #:autoload (gnu packages django)
+  (python-django-3.1.14 python-django-extensions)
+  #:autoload (gnu packages documentation) (doxygen)
+  #:autoload (gnu packages emacs) (emacs-minimal)
+  #:autoload (gnu packages emacs-xyz) (emacs-htmlize)
+  #:autoload (gnu packages flex) (flex)
+  #:autoload (gnu packages fontutils) (freetype)
+  #:autoload (gnu packages freedesktop) (perl-file-mimeinfo python-pyxdg)
+  #:autoload (gnu packages gd) (perl-gd-securityimage)
+  #:autoload (gnu packages gettext) (po4a gettext-minimal)
+  #:autoload (gnu packages glib) (glib gobject-introspection)
+  #:autoload (gnu packages gnome)
+  (glib-networking gsettings-desktop-schemas libsoup-minimal-2)
+  #:autoload (gnu packages gnu-doc) (miscfiles)
+  #:autoload (gnu packages gnunet) (libmicrohttpd)
+  #:autoload (gnu packages gnupg) (libgcrypt)
+  #:autoload (gnu packages golang)
+  (go-github-com-kylelemons-godebug
+   go-github-com-robfig-cron go-golang-org-x-sys go-golang-org-x-time)
+  #:autoload (gnu packages gperf) (gperf-3.0)
+  #:autoload (gnu packages graphviz) (graphviz)
+  #:autoload (gnu packages gtk) (atk cairo gdk-pixbuf gtk+ pango)
+  #:autoload (gnu packages guile) (guile-json-4 guile-zlib)
+  #:autoload (gnu packages guile-xyz)
+  (guile-commonmark guile-email guile-fibers-1.1 guile-prometheus guile-squee)
+  #:use-module (gnu packages hurd) ; required by "guix build -d guix"
+  #:autoload (gnu packages icu4c) (icu4c)
+  #:autoload (gnu packages image) (libjpeg-turbo libpng)
+  #:autoload (gnu packages java)
+  (icedtea
+   icedtea-8 java-asm java-cglib java-commons-codec java-commons-daemon
+   java-ecj java-gson java-hamcrest-all java-hamcrest-core java-hdrhistogram
+   java-javaee-servletapi java-junit java-mockito-1 java-objenesis
+   java-slf4j-api)
+  #:use-module (gnu packages jemalloc) ; required by "guix build -d guix"
+  #:autoload (gnu packages imagemagick) (perl-image-magick)
+  #:autoload (gnu packages kde) (qca)
+  #:autoload (gnu packages kerberos) (mit-krb5)
+  #:use-module (gnu packages libevent) ; required by "guix build -d guix"
+  #:autoload (gnu packages libidn) (libidn libidn2)
+  #:autoload (gnu packages libunistring) (libunistring)
+  #:autoload (gnu packages libunwind) (libunwind)
+  #:autoload (gnu packages linux)
+  (iproute linux-pam procps util-linux)
+  #:autoload (gnu packages lisp-xyz) (uglify-js)
+  #:autoload (gnu packages lsof) (lsof)
+  #:autoload (gnu packages lua) (luajit lua-5.1)
+  #:autoload (gnu packages mail) (mailcap)
+  #:autoload (gnu packages man) (scdoc)
+  #:autoload (gnu packages markup) (perl-text-markdown-discount)
+  #:autoload (gnu packages ncurses) (ncurses)
+  #:autoload (gnu packages networking) (perl-net-dns)
+  #:autoload (gnu packages node) (node)
+  #:autoload (gnu packages nss) (nss)
+  #:autoload (gnu packages openldap) (openldap)
+  #:autoload (gnu packages openstack) (python-mox3)
+  #:autoload (gnu packages package-management) (guix)
+  #:autoload (gnu packages pcre) (pcre pcre2)
+  #:use-module (gnu packages perl) ; required by "guix build -d guix"
+  #:autoload (gnu packages perl-check)
+  (perl-test-cpan-meta
+   perl-test-deep perl-test-differences perl-test-eol perl-test-exception
+   perl-test-fatal perl-test-longstring perl-test-memory-cycle
+   perl-test-mocktime perl-test-needs perl-test-notabs perl-test-nowarnings
+   perl-test-output perl-test-pod perl-test-pod-coverage perl-test-requires
+   perl-test-requiresinternet perl-test-sharedfork perl-test-simple
+   perl-test-utf8 perl-test-warn perl-test-warnings)
+  #:use-module (gnu packages python) ; required by "guix build -d guix"
+  #:autoload (gnu packages python-build) (python-wheel)
+  #:autoload (gnu packages python-check) (python-mypy-extensions)
+  #:autoload (gnu packages python-crypto)
+  (python-certifi python-cryptography)
+  #:autoload (gnu packages python-web)
+  (python-flask python-html5lib python-requests python-responses python-tornado
+                python-urllib3 python-w3lib)
+  #:autoload (gnu packages python-xyz)
+  (python-backports-csv
+   python-beautifulsoup4 python-clint python-croniter python-crontab
+   python-dateparser python-decorator python-dnspython python-docopt
+   python-docutils python-eventlet python-ipython python-itsdangerous
+   python-jsonpatch-0.4 python-markupsafe python-miniboa python-numpy
+   python-pyaml python-pygments python-schema-0.5 python-sgmllib3k python-six
+   python-sure)
+  #:use-module (gnu packages pkg-config) ; required by "guix build -d guix"
+  #:autoload (gnu packages qt)
+  (qtbase-5 qtdeclarative-5 qtwebchannel-5 qtwebengine-5) 
+  #:autoload (gnu packages re2c) (re2c)
+  #:autoload (gnu packages readline) (readline)
+  #:autoload (gnu packages search) (xapian)
+  #:autoload (gnu packages serialization) (libyaml)
+  #:autoload (gnu packages sphinx) (python-sphinx)
+  #:autoload (gnu packages texinfo) (texinfo)
+  #:autoload (gnu packages textutils) (oniguruma utf8proc)
+  #:use-module (gnu packages tls) ; required by "guix build -d guix"
+  #:autoload (gnu packages valgrind) (valgrind)
+  #:autoload (gnu packages version-control)
+  (bazaar cvs git mercurial subversion)
+  #:autoload (gnu packages video) (youtube-dl)
+  #:autoload (gnu packages vim) (xxd)
+  #:autoload (gnu packages wget) (wget)
+  #:use-module (gnu packages xml) ; required by "guix build -d guix"
   #:use-module ((srfi srfi-1) #:select (delete-duplicates)))
 
 (define-public qhttp
-- 
2.37.2
M
M
Maxime Devos wrote on 3 Sep 18:43 +0200
[PATCH v2 30/30] gnu: Autoload more.
(address . 54539@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220903164332.6848-30-maximedevos@telenet.be
TODO: check that pulling still works and that
"./pre-inst-env guix lint --checker=derivation" doesn't report porblems.

* Various number comparisons

(All the performance numbers below are for a SSD, on a HDD I would expect
the differences to be more pronounced.)

The number of modules indirectly used by the Guix package is reduced from

$ guix graph --type=module guix | grep -F 'label' | wc --lines
Toggle quote (2 lines)
> 347

to

$ ./pre-inst-envguix graph --type=module guix | grep -F 'label' | wc --lines
Toggle quote (2 lines)
> 172

(Note: you will have to patch source-module-closure first to ignore #:autoload.)

I.e., it is reduced by about half!

Memory usage and time spent in GC, before and after the patch (run thrice).
Before:

$ GUIX_PROFILING=gc guix build -d -e '(@ (gnu packages package-management) guix)' --no-grafts
Garbage collection statistics:
heap size: 72.46 MiB
allocated: 184.59 MiB
GC times: 15
time spent in GC: 1.04 seconds (56% of user time)
Garbage collection statistics:
heap size: 72.52 MiB
allocated: 184.60 MiB
GC times: 15
time spent in GC: 1.11 seconds (58% of user time)
Garbage collection statistics:
heap size: 72.46 MiB
allocated: 184.59 MiB
GC times: 15
time spent in GC: 1.05 seconds (57% of user time)

After:
$ GUIX_PROFILING=gc ./pre-inst-env guix build -d -e '(@ (gnu packages package-management) guix)' --no-grafts
Garbage collection statistics:
heap size: 46.95 MiB
allocated: 174.24 MiB
GC times: 17
time spent in GC: 0.88 seconds (55% of user time)
Garbage collection statistics:
heap size: 46.95 MiB
allocated: 174.24 MiB
GC times: 17
time spent in GC: 0.88 seconds (54% of user time)
Garbage collection statistics:
heap size: 46.95 MiB
allocated: 174.23 MiB
GC times: 17
time spent in GC: 0.88 seconds (55% of user time)

The heap size is lower: 72.50 MiB -> 45.95 MiB.
Don't know what's up with the GC here, but the percentage didn't increase,
so doesn't seem bad to me.

Now, start-up latency.
First, do

$ echo powersave | sudo tee /sys/devices/system/cpu/cpufreq/policy*/scaling_governor

to avoid the OS from interfering by making the CPU faster.

Before:

$ guix shell hyperfine -- hyperfine -w2 -- "guix build -d -e '(@ (gnu packages package-management) guix)' --no-grafts"
Time (mean ± σ): 4.137 s ± 0.017 s [User: 5.516 s, System: 0.270 s]
Range (min … max): 4.108 s … 4.160 s 10 runs

After:

$ guix shell hyperfine -- hyperfine -w2 -- "./pre-inst-env guix build -d -e '(@ (gnu packages package-management) guix)' --no-grafts"
Time (mean ± σ): 3.830 s ± 0.038 s [User: 4.976 s, System: 0.241 s]
Range (min … max): 3.794 s … 3.922 s 10 runs

-- a small but measurable improvement. This was with warm disk caches, what about cold
disk caches? As the number of loaded modules is reduced, the number of 'read from disk<->Guile determines
what to read next' roundtrips decreases, which should make things faster (especially on spinning disks).

Before:
$ guix shell hyperfine -- hyperfine --prepare='sync; echo 3 |sudo tee /proc/sys/vm/drop_caches' -w2 -- "guix build -d -e '(@ (gnu packages package-management) guix)' --no-grafts"
Benchmark #1: guix build -d -e '(@ (gnu packages package-management) guix)' --no-grafts
Time (mean ± σ): 5.146 s ± 0.072 s [User: 5.647 s, System: 0.442 s]
Range (min … max): 5.072 s … 5.274 s 10 runs

After:
guix shell hyperfine -- hyperfine --prepare='sync; echo 3 |sudo tee /proc/sys/vm/drop_caches' -w2 -- "./pre-inst-env guix build -d -e '(@ (gnu packages package-management) guix)' --no-grafts"
Benchmark #1: ./pre-inst-env guix build -d -e '(@ (gnu packages package-management) guix)' --no-grafts
Time (mean ± σ): 4.536 s ± 0.032 s [User: 4.924 s, System: 0.329 s]
Range (min … max): 4.480 s … 4.577 s 10 runs

Again, an improvement.

Let's look at the number of syscalls this time. I don't know what's up with the symlinks.

Before:
$ guix shell strace -- strace -c guix build -e '(@ (gnu packages package-management) guix)' -d --no-grafts

% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ------------------
26,39 0,015695 2 6350 5754 readlink
18,64 0,011083 1 6808 read
16,97 0,010092 26 377 87 futex
12,87 0,007654 2 2768 268 newfstatat
8,57 0,005099 1 2576 write
5,13 0,003053 2 1024 212 openat
3,74 0,002222 2 774 mmap
2,17 0,001288 2 568 mprotect
2,15 0,001280 1 815 close
1,64 0,000976 1 770 3 lseek
0,77 0,000456 2 197 getcwd
------ ----------- ----------- --------- --------- ------------------
100,00 0,059467 2 23217 6327 total

After:
./pre-inst-env guix shell strace -- strace -c guix build -e '(@ (gnu packages package-management) guix)' -d --no-grafts

% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ------------------
32,70 0,014266 1 7820 5684 newfstatat
19,25 0,008398 1 6808 read
11,25 0,004907 12 391 90 futex
10,25 0,004470 1 2580 write
7,67 0,003345 2 1622 1621 readlink
7,33 0,003198 3 847 212 openat
3,84 0,001676 2 561 mmap
2,27 0,000992 2 391 mprotect
2,27 0,000991 1 638 close
1,66 0,000726 1 592 3 lseek
0,83 0,000361 1 197 getcwd
0,28 0,000123 5 21 pread64
[ other syscalls removed for brevity ]
------ ----------- ----------- --------- --------- ------------------
100,00 0,043627 1 22643 7613 total

'mmap' is called less, I don't know how much of that can be attributed
to less .go files being mmapped and how much to the lower memory usage.
I'd assume that the reduction in 'openat' uses (1024->847) is due to
less modules (and maybe as a consequence, less patch files?).

* Other information

There were a few things unclear with the performance numbers above, but I
think I can state that this patch series does, in fact, reduce memory usage
(CPU time and heap size for computing "guix build -d guix --no-grafts"),
albeit less than I hoped for.

The same methods can be applied for other packages as well -- maybe in the
future, we could simply do an #:autoload for _every_ imported package module.

The latest commit was a bit ad-hoc, to save time making this patch series.
I would expcet that, with some additional work, more modules can be removed
from the graph.
---
gnu/packages/audio.scm | 29 ++++---
gnu/packages/build-tools.scm | 14 ++--
gnu/packages/c.scm | 2 +-
gnu/packages/cdrom.scm | 2 +-
gnu/packages/code.scm | 6 +-
gnu/packages/cpp.scm | 10 +--
gnu/packages/cups.scm | 6 +-
gnu/packages/dns.scm | 2 +-
gnu/packages/freedesktop.scm | 22 +++---
gnu/packages/gdb.scm | 2 +-
gnu/packages/gl.scm | 6 +-
gnu/packages/glib.scm | 2 +-
gnu/packages/gnome.scm | 117 ++++++++++++++++------------
gnu/packages/graphics.scm | 44 +++++------
gnu/packages/gstreamer.scm | 25 +++---
gnu/packages/gtk.scm | 13 ++--
gnu/packages/image-processing.scm | 6 +-
gnu/packages/image.scm | 12 +--
gnu/packages/inkscape.scm | 3 +-
gnu/packages/libusb.scm | 5 +-
gnu/packages/llvm.scm | 7 +-
gnu/packages/logging.scm | 2 +-
gnu/packages/maths.scm | 31 ++++----
gnu/packages/mpi.scm | 6 +-
gnu/packages/music.scm | 39 ++++++----
gnu/packages/networking.scm | 24 ++++--
gnu/packages/openldap.scm | 2 +-
gnu/packages/password-utils.scm | 2 +-
gnu/packages/pdf.scm | 24 +++---
gnu/packages/photo.scm | 8 +-
gnu/packages/polkit.scm | 4 +-
gnu/packages/python-check.scm | 6 +-
gnu/packages/python-compression.scm | 2 +-
gnu/packages/python-web.scm | 19 +++--
gnu/packages/qt.scm | 15 ++--
gnu/packages/samba.scm | 4 +-
gnu/packages/sdl.scm | 6 +-
gnu/packages/search.scm | 4 +-
gnu/packages/serialization.scm | 4 +-
gnu/packages/shells.scm | 37 +++++++--
gnu/packages/sphinx.scm | 8 +-
gnu/packages/ssh.scm | 7 +-
gnu/packages/tex.scm | 8 +-
gnu/packages/textutils.scm | 12 ++-
gnu/packages/time.scm | 5 +-
gnu/packages/tls.scm | 9 ++-
gnu/packages/video.scm | 62 +++++++++------
gnu/packages/wget.scm | 2 +-
gnu/packages/xdisorg.scm | 5 +-
gnu/packages/xorg.scm | 19 +++--
50 files changed, 397 insertions(+), 314 deletions(-)

Toggle diff (1911 lines)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 8795caef71..6b0f7d8c9e 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -71,17 +71,17 @@ (define-module (gnu packages audio)
   #:use-module (gnu packages dbm)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages elf)
-  #:use-module (gnu packages emacs)
+  #:autoload (gnu packages emacs) (emacs-minimal)
   #:use-module (gnu packages file)
   #:use-module (gnu packages flex)
-  #:use-module (gnu packages fltk)
+  #:autoload (gnu packages fltk) (fltk ntk)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
-  #:use-module (gnu packages gnunet) ; libmicrohttpd
+  #:autoload (gnu packages gnunet) (libmicrohttpd)
   #:use-module (gnu packages gperf)
   #:use-module (gnu packages groff)
   #:use-module (gnu packages gstreamer)
@@ -91,23 +91,24 @@ (define-module (gnu packages audio)
   #:use-module (gnu packages image)
   #:use-module (gnu packages libbsd)
   #:use-module (gnu packages libffi)
-  #:use-module (gnu packages libusb)
+  #:autoload (gnu packages libusb) (libusb)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages llvm)
-  #:use-module (gnu packages machine-learning)
+  #:autoload (gnu packages machine-learning) (python-scikit-learn)
   #:use-module (gnu packages man)
   #:use-module (gnu packages maths)
-  #:use-module (gnu packages mp3) ;taglib
+  #:autoload (gnu packages mp3)
+  (lame libid3tag libmad mpg123 python-audioread taglib)
   #:use-module (gnu packages multiprecision)
-  #:use-module (gnu packages music)
+  #:autoload (gnu packages music) (portmidi)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages networking)
   #:use-module (gnu packages onc-rpc)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages pulseaudio)  ;libsndfile, libsamplerate
+  #:autoload (gnu packages pulseaudio) (libsndfile libsamplerate pulseaudio)
   #:use-module (gnu packages python)
-  #:use-module (gnu packages python-science)
+  #:autoload (gnu packages python-science) (python-scipy)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages rdf)
@@ -116,16 +117,14 @@ (define-module (gnu packages audio)
   #:use-module (gnu packages sdl)
   #:use-module (gnu packages serialization)
   #:use-module (gnu packages sqlite)
-  #:use-module (gnu packages telephony)
-  #:use-module (gnu packages linphone)
+  #:autoload (gnu packages linphone) (ortp)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages valgrind)
-  #:use-module (gnu packages video)
-  #:use-module (gnu packages vim) ;xxd
+  #:autoload (gnu packages video) (ffmpeg)
+  #:autoload (gnu packages vim) (xxd)
   #:use-module (gnu packages web)
-  #:use-module (gnu packages webkit)
-  #:use-module (gnu packages wxwidgets)
+  #:autoload (gnu packages wxwidgets) (wxwidgets-3.1)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xiph)
   #:use-module (gnu packages xml)
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index 5c9d5409cb..983f3f7195 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -46,16 +46,16 @@ (define-module (gnu packages build-tools)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cpp)
   #:use-module (gnu packages linux)
-  #:use-module (gnu packages logging)
-  #:use-module (gnu packages lua)
-  #:use-module (gnu packages package-management)
+  #:autoload (gnu packages logging) (spdlog)
+  #:autoload (gnu packages lua) (lua)
+  #:autoload (gnu packages package-management) (rpm)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages pretty-print)
-  #:use-module (gnu packages protobuf)
+  #:autoload (gnu packages pretty-print) (fmt)
+  #:autoload (gnu packages protobuf) (protobuf)
   #:use-module (gnu packages python)
-  #:use-module (gnu packages python-build)
-  #:use-module (gnu packages python-crypto)
+  #:autoload (gnu packages python-build) (python-wheel)
+  #:autoload (gnu packages python-crypto) (python-m2crypto)
   #:use-module (gnu packages python-web)