diff mbox

[bug#54539,0/6] Start breaking up import cycles

Message ID 13a80b63e826a8f77c87a6f2375751806cdb7cf2.camel@telenet.be
State New
Headers show

Commit Message

M March 25, 2022, 2:36 p.m. UTC
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 ...

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.
diff mbox

Patch

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

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