Subject: [PATCH core-updates 12/15] gnu: Use 'search-input-file' when looking for executables.

From: Ludovic Courtès <[email-masked]>
Date: Fri, 16 Jul 2021 17:54:17 +0200

* gnu/packages/admin.scm (isc-dhcp): Use 'search-input-file' when
looking for executables.
* gnu/packages/audio.scm (ableton-link): Likewise.
* gnu/packages/benchmark.scm (fio): Likewise.
* gnu/packages/bioinformatics.scm (roary): Likewise.
(ngless): Likewise.
* gnu/packages/boost.scm (boost-for-irods): Likewise.
* gnu/packages/bootloaders.scm (grub): Likewise.
(grub-efi): Likewise.
* gnu/packages/chemistry.scm (inchi): Likewise.
* gnu/packages/dictionaries.scm (ding): Likewise.
* gnu/packages/dlang.scm (ldc): Likewise.
* gnu/packages/education.scm (childsplay): Likewise.
* gnu/packages/emacs-xyz.scm (emacs-hyperbole): Likewise.
(emacs-haskell-mode): Likewise.
(emacs-auctex): Likewise.
(emacs-ggtags): Likewise.
(emacs-graphviz-dot-mode): Likewise.
(emacs-flycheck-grammalecte): Likewise.
(emacs-counsel-notmuch): Likewise.
(emacspeak): Likewise.
(emacs-exwm): Likewise.
(emacs-exwm-x): Likewise.
(emacs-treemacs): Likewise.
(emacs-telega): Likewise.
(emacs-exiftool): Likewise.
* gnu/packages/emulators.scm (higan): Likewise.
* gnu/packages/engineering.scm (freehdl): Likewise.
(librepcb): Likewise.
* gnu/packages/entr.scm (entr): Likewise.
* gnu/packages/file-systems.scm (libeatmydata): Likewise.
(xfstests): Likewise.
(mergerfs): Likewise.
(mergerfs-tools): Likewise.
* gnu/packages/finance.scm (monero-gui): Likewise.
* gnu/packages/flashing-tools.scm (flashrom): Likewise.
* gnu/packages/fontutils.scm (fontforge): Likewise.
* gnu/packages/game-development.scm (python2-renpy): Likewise.
* gnu/packages/games.scm (opensurge): Likewise.
(xboard): Likewise.
(hyperrogue): Likewise.
(flare-game): Likewise.
(chessx): Likewise.
* gnu/packages/geo.scm (grass): Likewise.
* gnu/packages/glib.scm (glib): Likewise.
* gnu/packages/gnome.scm (mm-common): Likewise.
(network-manager-openvpn): Likewise.
(network-manager-vpnc): Likewise.
(network-manager-openconnect): Likewise.
(apostrophe): Likewise.
* gnu/packages/gnupg.scm (pius): Likewise.
(jetring): Likewise.
* gnu/packages/gnuzilla.scm (icedove): Likewise.
* gnu/packages/golang.scm (go-1.4): Likewise.
* gnu/packages/graphviz.scm (xdot): Likewise.
* gnu/packages/guile-xyz.scm (jupyter-guile-kernel): Likewise.
* gnu/packages/haskell-xyz.scm (ghc-hindent): Likewise.
* gnu/packages/ibus.scm (ibus): Likewise.
* gnu/packages/image.scm (phockup): Likewise.
* gnu/packages/irc.scm (quassel): Likewise.
* gnu/packages/java.scm (drip): Likewise.
(ant-bootstrap): Likewise.
(tla2tools): Likewise.
* gnu/packages/julia.scm (julia): Likewise.
* gnu/packages/less.scm (lesspipe): Likewise.
* gnu/packages/libreoffice.scm (libreoffice): Likewise.
* gnu/packages/linux.scm (fuse): Likewise.
(lm-sensors): Likewise.
(bluez): Likewise.
(fakeroot): Likewise.
(inputattach): Likewise.
* gnu/packages/lisp-xyz.scm (sbcl-cl-diskspace): Likewise.
* gnu/packages/lisp.scm (lisp-repl-core-dumper): Likewise.
* gnu/packages/lua.scm (fennel): Likewise.
* gnu/packages/lxde.scm (spacefm): Likewise.
* gnu/packages/mail.scm (public-inbox): Likewise.
* gnu/packages/maths.scm (hdf-java): Likewise.
(maxima): Likewise.
(frama-c): Likewise.
* gnu/packages/messaging.scm (libgadu): Likewise.
* gnu/packages/music.scm (denemo): Likewise.
(curseradio): Likewise.
* gnu/packages/netpbm.scm (netpbm): Likewise.
* gnu/packages/networking.scm (blueman): Likewise.
(squid): Likewise.
(aircrack-ng): Likewise.
* gnu/packages/node.scm (node): Likewise.
(node-llparse-frontend-bootstrap): Likewise.
(node-llparse-bootstrap): Likewise.
(llhttp-bootstrap): Likewise.
(node-lts): Likewise.
* gnu/packages/ocaml.scm (ocaml-4.11): Likewise.
(opam): Likewise.
(ocaml-graph): Likewise.
* gnu/packages/orpheus.scm (orpheus): Likewise.
* gnu/packages/password-utils.scm (password-store): Likewise.
* gnu/packages/python.scm (pypy3): Likewise.
* gnu/packages/qt.scm (qt5ct): Likewise.
* gnu/packages/radio.scm (libosmo-dsp): Likewise.
* gnu/packages/ruby.scm (ruby-pandoc-ruby): Likewise.
* gnu/packages/rust.scm (rust-1.30): Likewise.
* gnu/packages/screen.scm (byobu): Likewise.
* gnu/packages/statistics.scm (r-with-tests): Likewise.
* gnu/packages/suckless.scm (surf): Likewise.
* gnu/packages/syndication.scm (gfeeds): Likewise.
* gnu/packages/telephony.scm (mumble): Likewise.
* gnu/packages/terminals.scm (alacritty): Likewise.
* gnu/packages/tex.scm (texlive-bin): Likewise.
* gnu/packages/uml.scm (plantuml): Likewise.
* gnu/packages/version-control.scm (python-git-multimail): Likewise.
(gitolite): Likewise.
(hg-commitsigs): Likewise.
(git-when-merged): Likewise.
(git-imerge): Likewise.
(gita): Likewise.
* gnu/packages/video.scm (you-get): Likewise.
* gnu/packages/vim.scm (eovim): Likewise.
* gnu/packages/virtualization.scm (qemu): Likewise.
(virt-manager): Likewise.
(criu): Likewise.
* gnu/packages/vpn.scm (strongswan): Likewise.
(xl2tpd): Likewise.
* gnu/packages/wm.scm (i3lock-fancy): Likewise.
* gnu/packages/wxwidgets.scm (python-wxpython): Likewise.
(python2-wxpython): Likewise.
* gnu/packages/xdisorg.scm (autorandr): Likewise.
* gnu/packages/xorg.scm (hackneyed-x11-cursors): Likewise.
(v86d): Likewise.
(mkfontdir): Likewise.
(xpra): Likewise.
---
 gnu/packages/admin.scm            |  6 ++--
 gnu/packages/audio.scm            |  9 +++---
 gnu/packages/benchmark.scm        |  3 +-
 gnu/packages/bioinformatics.scm   | 14 +++-----
 gnu/packages/boost.scm            |  4 +--
 gnu/packages/bootloaders.scm      | 13 ++++----
 gnu/packages/chemistry.scm        |  3 +-
 gnu/packages/dictionaries.scm     |  5 ++-
 gnu/packages/dlang.scm            |  2 +-
 gnu/packages/education.scm        |  3 +-
 gnu/packages/emacs-xyz.scm        | 50 ++++++++++++----------------
 gnu/packages/emulators.scm        |  3 +-
 gnu/packages/engineering.scm      | 20 ++++--------
 gnu/packages/entr.scm             |  6 ++--
 gnu/packages/file-systems.scm     | 22 ++++++-------
 gnu/packages/finance.scm          |  3 +-
 gnu/packages/flashing-tools.scm   |  6 ++--
 gnu/packages/fontutils.scm        |  3 +-
 gnu/packages/game-development.scm |  5 ++-
 gnu/packages/games.scm            | 17 ++++------
 gnu/packages/geo.scm              |  3 +-
 gnu/packages/glib.scm             | 12 +++----
 gnu/packages/gnome.scm            | 38 ++++++++--------------
 gnu/packages/gnupg.scm            | 12 +++----
 gnu/packages/gnuzilla.scm         |  3 +-
 gnu/packages/golang.scm           |  4 +--
 gnu/packages/graphviz.scm         |  5 ++-
 gnu/packages/guile-xyz.scm        |  4 +--
 gnu/packages/haskell-xyz.scm      |  5 ++-
 gnu/packages/ibus.scm             |  9 ++++--
 gnu/packages/image.scm            |  6 ++--
 gnu/packages/irc.scm              |  2 +-
 gnu/packages/java.scm             | 11 +++----
 gnu/packages/julia.scm            |  2 +-
 gnu/packages/less.scm             |  9 +++---
 gnu/packages/libreoffice.scm      |  7 ++--
 gnu/packages/linux.scm            | 54 ++++++++++++++-----------------
 gnu/packages/lisp-xyz.scm         |  2 +-
 gnu/packages/lisp.scm             | 11 +++----
 gnu/packages/lua.scm              |  4 +--
 gnu/packages/lxde.scm             |  4 +--
 gnu/packages/mail.scm             |  2 +-
 gnu/packages/maths.scm            | 21 +++++-------
 gnu/packages/messaging.scm        |  4 +--
 gnu/packages/music.scm            | 10 +++---
 gnu/packages/netpbm.scm           |  3 +-
 gnu/packages/networking.scm       | 28 +++++++---------
 gnu/packages/node.scm             | 22 +++++--------
 gnu/packages/ocaml.scm            | 10 +++---
 gnu/packages/orpheus.scm          |  9 ++----
 gnu/packages/password-utils.scm   |  6 ++--
 gnu/packages/python.scm           |  2 +-
 gnu/packages/qt.scm               |  4 +--
 gnu/packages/radio.scm            |  4 +--
 gnu/packages/ruby.scm             |  8 ++---
 gnu/packages/rust.scm             |  2 +-
 gnu/packages/screen.scm           |  3 +-
 gnu/packages/statistics.scm       |  3 +-
 gnu/packages/suckless.scm         |  4 +--
 gnu/packages/syndication.scm      |  2 +-
 gnu/packages/telephony.scm        |  4 +--
 gnu/packages/terminals.scm        |  2 +-
 gnu/packages/tex.scm              |  4 +--
 gnu/packages/uml.scm              |  3 +-
 gnu/packages/version-control.scm  | 30 +++++++----------
 gnu/packages/video.scm            |  3 +-
 gnu/packages/vim.scm              |  3 +-
 gnu/packages/virtualization.scm   | 12 +++----
 gnu/packages/vpn.scm              |  7 ++--
 gnu/packages/wm.scm               | 14 +++-----
 gnu/packages/wxwidgets.scm        |  7 ++--
 gnu/packages/xdisorg.scm          |  5 ++-
 gnu/packages/xorg.scm             | 16 ++++-----
 73 files changed, 270 insertions(+), 391 deletions(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index aab62331a3..82a4b91cec 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -1254,8 +1254,7 @@ connection alive.")
                       (sed       (assoc-ref inputs "sed*")))
                  (substitute* "client/scripts/linux"
                    (("/sbin/ip")
-                    (string-append (assoc-ref inputs "iproute")
-                                   "/sbin/ip")))
+                    (search-input-file inputs "/sbin/ip")))
 
                  (mkdir-p libexec)
                  (copy-file "client/scripts/linux"
@@ -1548,8 +1547,7 @@ at once based on a Perl regular expression.")
                     (lambda* (#:key inputs #:allow-other-keys)
                       (substitute* "rc/rc"
                         (("/usr/sbin/sendmail")
-                         (string-append (assoc-ref inputs "mailutils")
-                                        "/bin/mail")))
+                         (search-input-file inputs "/bin/mail")))
                       #t))
                   (add-after 'unpack 'fix-configure
                     (lambda* (#:key inputs native-inputs #:allow-other-keys)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 203965f4c6..f0c65040a3 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -5213,11 +5213,10 @@ Rate} 3600x2250 bit/s vocoder used in various radio systems.")
        (modify-phases %standard-phases
          (replace 'check
            (lambda* (#:key inputs #:allow-other-keys)
-             (let* ((python (string-append (assoc-ref inputs "python")
-                                          "/bin/python3"))
-                   (run-tests (string-append "../ableton-link-"
-                                             ,version
-                                             "-checkout/ci/run-tests.py")))
+             (let* ((python (search-input-file inputs "/bin/python3"))
+                    (run-tests (string-append "../ableton-link-"
+                                              ,version
+                                              "-checkout/ci/run-tests.py")))
                (invoke python run-tests "--target" "LinkCoreTest")
                (invoke python run-tests "--target" "LinkDiscoveryTest"))))
          (add-before 'install 'patch-cmake
diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm
index 6a6ac1d8d5..5277933f4c 100644
--- a/gnu/packages/benchmark.scm
+++ b/gnu/packages/benchmark.scm
@@ -69,8 +69,7 @@
           'unpack 'patch-paths
           (lambda* (#:key inputs outputs #:allow-other-keys)
             (let ((out (assoc-ref outputs "out"))
-                  (gnuplot (string-append (assoc-ref inputs "gnuplot")
-                                          "/bin/gnuplot")))
+                  (gnuplot (search-input-file inputs "/bin/gnuplot")))
               (substitute* "tools/plot/fio2gnuplot"
                 (("/usr/share/fio") (string-append out "/share/fio"))
                 ;; FIXME (upstream): The 'gnuplot' executable is used inline
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index d89e459fa3..d57c00a451 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -5704,7 +5704,7 @@ partial genes, and identifies translation initiation sites.")
                       (string-append out "/bin/roary-create_pan_genome_plots.R"))
                      (r-site-lib (getenv "R_LIBS_SITE"))
                      (coreutils-path
-                      (string-append (assoc-ref inputs "coreutils") "/bin")))
+                      (dirname (search-input-file inputs "bin/chmod"))))
                  (wrap-program file
                    `("R_LIBS_SITE" ":" prefix
                      (,(string-append r-site-lib ":" out "/site-library/"))))
@@ -12285,17 +12285,13 @@ datasets.")
          (add-after 'install 'link-tools
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
-               (symlink (string-append (assoc-ref inputs "prodigal")
-                                       "/bin/prodigal")
+               (symlink (search-input-file inputs "/bin/prodigal")
                         (string-append bin "ngless-" ,version "-prodigal"))
-               (symlink (string-append (assoc-ref inputs "minimap2")
-                                       "/bin/minimap2")
+               (symlink (search-input-file inputs "/bin/minimap2")
                         (string-append bin "ngless-" ,version "-minimap2"))
-               (symlink (string-append (assoc-ref inputs "samtools")
-                                       "/bin/samtools")
+               (symlink (search-input-file inputs "/bin/samtools")
                         (string-append bin "ngless-" ,version "-samtools"))
-               (symlink (string-append (assoc-ref inputs "bwa")
-                                       "/bin/bwa")
+               (symlink (search-input-file inputs "/bin/bwa")
                         (string-append bin "ngless-" ,version "-bwa"))
                #t))))))
     (inputs
diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm
index 8b6bea30c4..538d921c0b 100644
--- a/gnu/packages/boost.scm
+++ b/gnu/packages/boost.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2014, 2015, 2018 Mark H Weaver <[email-masked]>
 ;;; Copyright © 2015 Andreas Enge <[email-masked]>
 ;;; Copyright © 2016 Eric Bavier <[email-masked]>
-;;; Copyright © 2015, 2019, 2020 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2015, 2019, 2020, 2021 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2017 Thomas Danckaert <[email-masked]>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <[email-masked]>
 ;;; Copyright © 2018 Arun Isaac <[email-masked]>
@@ -252,7 +252,7 @@ across a broad spectrum of applications.")
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((icu (assoc-ref inputs "icu4c"))
                    (out (assoc-ref outputs "out"))
-                   (sh  (string-append (assoc-ref inputs "bash") "/bin/sh")))
+                   (sh  (search-input-file inputs "/bin/sh")))
                (substitute* '("libs/config/configure"
                               "libs/spirit/classic/phoenix/test/runtest.sh"
                               "tools/build/src/engine/execunix.c"
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index e83f21ea63..19bb6e2508 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2021 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2015, 2018 Mark H Weaver <[email-masked]>
 ;;; Copyright © 2015 Leo Famulari <[email-masked]>
 ;;; Copyright © 2016, 2020 Jan (janneke) Nieuwenhuizen <[email-masked]>
@@ -139,9 +139,9 @@
                      ;; Give the absolute file name of 'ckbcomp'.
                      (substitute* "util/grub-kbdcomp.in"
                        (("^ckbcomp ")
-                        (string-append (assoc-ref inputs "console-setup")
-                                       "/bin/ckbcomp ")))
-                     #t))
+                        (string-append
+                         (search-input-file inputs "/bin/ckbcomp")
+                         " ")))))
                   (add-after 'unpack 'set-freetype-variables
                     ;; These variables need to be set to the native versions
                     ;; of the dependencies because they are used to build
@@ -311,9 +311,8 @@ menu to select one of the installed operating systems.")
                  (lambda* (#:key inputs #:allow-other-keys)
                    (substitute* "grub-core/osdep/unix/platform.c"
                      (("efibootmgr")
-                      (string-append (assoc-ref inputs "efibootmgr")
-                                     "/sbin/efibootmgr")))
-                   #t))
+                      (search-input-file inputs
+                                         "/sbin/efibootmgr")))))
                (add-after 'patch-stuff 'use-absolute-mtools-path
                  (lambda* (#:key inputs #:allow-other-keys)
                    (let ((mtools (assoc-ref inputs "mtools")))
diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm
index a52ecf69f7..4b46052f99 100644
--- a/gnu/packages/chemistry.scm
+++ b/gnu/packages/chemistry.scm
@@ -192,8 +192,7 @@ only with Python 2 and NumPy < 1.9.")
                     (include-dir (string-append out "/include/inchi"))
                     (lib (string-append out "/lib/inchi"))
                     (inchi-doc (assoc-ref inputs "inchi-doc"))
-                    (unzip (string-append (assoc-ref inputs "unzip")
-                                          "/bin/unzip")))
+                    (unzip (search-input-file inputs "/bin/unzip")))
                (chdir "../../..")
                ;; Install binary.
                (with-directory-excursion "INCHI_EXE/bin/Linux"
diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index 5ca9e128ff..b8bde241f7 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2014, 2015, 2016, 2021 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2016, 2017, 2018, 2020, 2021 Efraim Flashner <[email-masked]>
 ;;; Copyright © 2016 Sou Bunnbu <[email-masked]>
 ;;; Copyright © 2017, 2018, 2019, 2021 Nicolas Goaziou <[email-masked]>
@@ -178,8 +178,7 @@ work, such as sentence length and other readability measures.")
            (lambda* (#:key inputs #:allow-other-keys)
              (let ((bindir (string-append
                             (assoc-ref %outputs "out") "/bin"))
-                   (wish (string-append (assoc-ref inputs "tk")
-                          "/bin/wish8.6"))
+                   (wish (search-input-file inputs "/bin/wish8.6"))
                    (sharedir (string-append
                               (assoc-ref %outputs "out")
                               "/share/applications"))
diff --git a/gnu/packages/dlang.scm b/gnu/packages/dlang.scm
index c782ef928a..dc22ea2e62 100644
--- a/gnu/packages/dlang.scm
+++ b/gnu/packages/dlang.scm
@@ -261,7 +261,7 @@ bootstrapping more recent compilers written in D.")
              (lambda* (#:key inputs outputs #:allow-other-keys)
                ;; some tests call into gdb binary which needs SHELL and CC set
                (setenv "SHELL" (which "sh"))
-               (setenv "CC" (string-append (assoc-ref inputs "gcc") "/bin/gcc"))
+               (setenv "CC" (search-input-file inputs "/bin/gcc"))
                (invoke "make" "test" "-j" (number->string (parallel-job-count))))))))
       (native-inputs
        `(("llvm" ,llvm-6)
diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm
index aed7f1f2ab..6001cde9a9 100644
--- a/gnu/packages/education.scm
+++ b/gnu/packages/education.scm
@@ -458,8 +458,7 @@ specialized device.")
                #t)))
          (add-after 'install 'create-executable
            (lambda* (#:key outputs inputs #:allow-other-keys)
-             (let* ((python (string-append (assoc-ref inputs "python")
-                                           "/bin/python"))
+             (let* ((python (search-input-file inputs "/bin/python"))
                     (out (assoc-ref outputs "out"))
                     (bin (string-append out "/bin"))
                     (executable (string-append bin "/childsplay")))
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index e7733d72d0..cc6bcedfb0 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -481,8 +481,7 @@ system.")
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "hypb.el"
                (("/bin/domainname")
-                (string-append (assoc-ref inputs "inetutils")
-                               "/bin/dnsdomainname")))
+                (search-input-file inputs "bin/dnsdomainname")))
              (substitute* "hyperbole.el"
                (("\\(hyperb:check-dir-user\\)") ""))))
          (add-after 'install 'install-images
@@ -1410,7 +1409,7 @@ replacement.")
                  ((f1 f2 ...) (dirname f1))
                  (_ "")))
 
-             (let ((sh (string-append (assoc-ref inputs "bash") "/bin/sh")))
+             (let ((sh (search-input-file inputs "/bin/sh")))
                (define emacs-prefix? (cut string-prefix? "emacs-" <>))
 
                (setenv "SHELL" "sh")
@@ -2565,7 +2564,7 @@ as a library for other Emacs packages.")
            (lambda* (#:key inputs #:allow-other-keys)
              (emacs-substitute-variables "preview.el"
                ("preview-gs-command"
-                (string-append (assoc-ref inputs "ghostscript") "/bin/gs")))
+                (search-input-file inputs "/bin/gs")))
              (substitute* "preview.el"
                (("\"dvipng ")
                 (string-append "\"" (assoc-ref inputs "texlive")
@@ -2931,8 +2930,7 @@ into mode hooks and is intended to be used that way.")
              (chmod "ggtags.el" #o644)
              (emacs-substitute-variables "ggtags.el"
                ("ggtags-executable-directory"
-                (string-append (assoc-ref inputs "global") "/bin")))
-             #t)))))
+                (dirname (search-input-file inputs "bin/global")))))))))
     (home-page "https://github.com/leoliu/ggtags")
     (synopsis "Frontend to the GNU Global source code tagging system")
     (description "@code{ggtags} provides a frontend to the GNU Global source
@@ -3038,7 +3036,7 @@ directly inside Emacs.  It requires a Google Map Static API key to function.")
              (with-directory-excursion "texinfo"
                (substitute* "Makefile"
                  (("\\/usr\\/bin\\/gzip")
-                  (string-append (assoc-ref inputs "gzip") "/bin/gzip")))
+                  (search-input-file inputs "/bin/gzip")))
                (invoke "make"
                        "clean"
                        "info"
@@ -5448,8 +5446,7 @@ for Flow files.")
          (add-after 'unpack 'specify-python-location
            ;; Hard-code python3 executable location in the library.
            (lambda* (#:key inputs #:allow-other-keys)
-             (let ((python3 (string-append (assoc-ref inputs "python")
-                                           "/bin/python3")))
+             (let ((python3 (search-input-file inputs "/bin/python3")))
                (substitute* "flycheck-grammalecte.el"
                  (("\"python3") (string-append "\"" python3)))
                (substitute* '("conjugueur.py" "flycheck-grammalecte.py")
@@ -9172,9 +9169,7 @@ queries using counsel.")
                (make-file-writable "counsel-notmuch.el")
                (emacs-substitute-variables "counsel-notmuch.el"
                  ("counsel-notmuch-path"
-                  (string-append (assoc-ref inputs "notmuch")
-                                 "/bin/notmuch")))
-               #t)))))
+                  (search-input-file inputs "/bin/notmuch"))))))))
       (inputs
        `(("emacs-counsel" ,emacs-counsel)
          ("notmuch" ,notmuch)
@@ -12873,8 +12868,7 @@ highlights quasi-quoted expressions.")
                     (bin (string-append out "/bin"))
                     (lisp (string-append out "/share/emacs/site-lisp/emacspeak"))
                     (info (string-append out "/share/info"))
-                    (emacs (string-append (assoc-ref inputs "emacs")
-                                          "/bin/emacs")))
+                    (emacs (search-input-file inputs "/bin/emacs")))
                ;; According to etc/install.org, the Emacspeak directory should
                ;; be copied to its installation destination.
                (for-each
@@ -13580,10 +13574,10 @@ It should enable you to implement low-level X11 applications.")
                    (format #t "#!~a ~@
                      ~a +SI:localuser:$USER ~@
                      exec ~a --exit-with-session ~a \"$@\" --eval '~s' ~%"
-                           (string-append (assoc-ref inputs "bash") "/bin/sh")
-                           (string-append (assoc-ref inputs "xhost") "/bin/xhost")
-                           (string-append (assoc-ref inputs "dbus") "/bin/dbus-launch")
-                           (string-append (assoc-ref inputs "emacs") "/bin/emacs")
+                           (search-input-file inputs "/bin/sh")
+                           (search-input-file inputs "/bin/xhost")
+                           (search-input-file inputs "/bin/dbus-launch")
+                           (search-input-file inputs "/bin/emacs")
                            '(cond
                              ((file-exists-p "~/.exwm")
                               (load-file "~/.exwm"))
@@ -13696,10 +13690,10 @@ other operations.")
                    (format #t "#!~a ~@
                      ~a +SI:localuser:$USER ~@
                      exec ~a --exit-with-session ~a \"$@\" --eval '~s' ~%"
-                           (string-append (assoc-ref inputs "bash") "/bin/sh")
-                           (string-append (assoc-ref inputs "xhost") "/bin/xhost")
-                           (string-append (assoc-ref inputs "dbus") "/bin/dbus-launch")
-                           (string-append (assoc-ref inputs "emacs") "/bin/emacs")
+                           (search-input-file inputs "/bin/sh")
+                           (search-input-file inputs "/bin/xhost")
+                           (search-input-file inputs "/bin/dbus-launch")
+                           (search-input-file inputs "/bin/emacs")
                            '(require 'exwmx-loader))))
                (chmod exwm-executable #o555)
                #t))))))
@@ -23122,7 +23116,7 @@ processes for Emacs")
                (chmod "src/elisp/treemacs-customization.el" #o644)
                (emacs-substitute-variables "src/elisp/treemacs-customization.el"
                  ("treemacs-python-executable"
-                  (string-append (assoc-ref inputs "python") "/bin/python3")))
+                  (search-input-file inputs "/bin/python3")))
                (chmod "src/elisp/treemacs-async.el" #o644)
                (substitute* "src/elisp/treemacs-async.el"
                  (("src/scripts") (string-append "share/" ,name "/scripts"))))
@@ -26063,10 +26057,8 @@ other @code{helm-type-file} sources such as @code{helm-locate}.")
            (add-after 'unpack 'patch-sources
              (lambda* (#:key inputs #:allow-other-keys)
                ;; Hard-code paths to `ffplay` and `ffmpeg`.
-               (let ((ffplay-bin (string-append (assoc-ref inputs "ffmpeg")
-                                                "/bin/ffplay"))
-                     (ffmpeg-bin (string-append (assoc-ref inputs "ffmpeg")
-                                                "/bin/ffmpeg")))
+               (let ((ffplay-bin (search-input-file inputs "/bin/ffplay"))
+                     (ffmpeg-bin (search-input-file inputs "/bin/ffmpeg")))
                  (substitute* "telega-ffplay.el"
                    (("\\(executable-find \"ffplay\"\\)")
                     (string-append
@@ -27379,9 +27371,7 @@ emoji.")
              (make-file-writable "exiftool.el")
              (emacs-substitute-variables "exiftool.el"
                ("exiftool-executable"
-                (string-append (assoc-ref inputs "perl-image-exiftool")
-                               "/bin/exiftool")))
-             #t)))))
+                (search-input-file inputs "/bin/exiftool"))))))))
     (inputs
      `(("perl-image-exiftool" ,perl-image-exiftool)))
     (home-page "https://git.systemreboot.net/exiftool.el/about/")
diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 1e28e50155..5470c47d1b 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -476,8 +476,7 @@ and a game metadata scraper.")
                       (bin (string-append out "/bin"))
                       (higan (string-append bin "/higan"))
                       (higan-original (string-append higan "-original"))
-                      (bash (string-append (assoc-ref inputs "bash")
-                                           "/bin/bash"))
+                      (bash (search-input-file inputs "/bin/bash"))
                       (coreutils (assoc-ref inputs "coreutils"))
                       (mkdir (string-append coreutils "/bin/mkdir"))
                       (cp (string-append coreutils "/bin/cp"))
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 12087a9e83..608bd4a078 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1940,19 +1940,14 @@ parallel computing platforms.  It also supports serial execution.")
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "freehdl/freehdl-config"
                (("pkg-config")
-                (string-append (assoc-ref inputs "pkg-config")
-                               "/bin/pkg-config"))
+                (search-input-file inputs "/bin/pkg-config"))
                (("cat")
-                (string-append (assoc-ref inputs "coreutils")
-                               "/bin/cat")))
-             #t))
+                (search-input-file inputs "/bin/cat")))))
          (add-after 'patch-pkg-config 'setenv
            (lambda* (#:key inputs #:allow-other-keys)
-             (setenv "CXX" (string-append (assoc-ref inputs "gcc")
-                                          "/bin/g++"))
-             (setenv "SYSTEM_LIBTOOL" (string-append (assoc-ref inputs "libtool")
-                                                     "/bin/libtool"))
-             #t))
+             (setenv "CXX" (search-input-file inputs "/bin/g++"))
+             (setenv "SYSTEM_LIBTOOL"
+                     (search-input-file inputs "/bin/libtool"))))
          (add-after 'setenv 'patch-gvhdl
            (lambda _
              (substitute* "v2cc/gvhdl.in"
@@ -1963,7 +1958,7 @@ parallel computing platforms.  It also supports serial execution.")
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "freehdl/freehdl-gennodes.in"
                (("guile")
-                (string-append (assoc-ref inputs "guile") "/bin/guile"))
+                (search-input-file inputs "/bin/guile"))
                (("\\(debug") ";(debug")
                (("\\(@ ") "(apply-emit")
                (("\\(@@ ") "(apply-mini-format"))
@@ -2042,8 +2037,7 @@ parallel computing platforms.  It also supports serial execution.")
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (mkdir-p "build")
              (chdir "build")
-             (let ((lrelease (string-append (assoc-ref inputs "qttools")
-                                            "/bin/lrelease"))
+             (let ((lrelease (search-input-file inputs "/bin/lrelease"))
                    (out (assoc-ref outputs "out")))
                (invoke "qmake"
                        (string-append "QMAKE_LRELEASE=" lrelease)
diff --git a/gnu/packages/entr.scm b/gnu/packages/entr.scm
index 5ca40690dd..9a7a3daef6 100644
--- a/gnu/packages/entr.scm
+++ b/gnu/packages/entr.scm
@@ -59,11 +59,11 @@
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "entr.c"
                (("/bin/sh" command)
-                (string-append (assoc-ref inputs "bash") command))
+                (search-input-file inputs command))
                (("/bin/cat" command)
-                (string-append (assoc-ref inputs "coreutils") command))
+                (search-input-file inputs command))
                (("/usr(/bin/clear)" _ command)
-                (string-append (assoc-ref inputs "ncurses") command)))
+                (search-input-file inputs command)))
              #t)))))
     (inputs
      `(("bash" ,bash)
diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm
index e2335b8a86..c6ec345736 100644
--- a/gnu/packages/file-systems.scm
+++ b/gnu/packages/file-systems.scm
@@ -798,7 +798,8 @@ All of this is accomplished without a centralized metadata server.")
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* (list "eatmydata.in" "eatmydata.sh.in")
                (("basename|readlink|uname" command)
-                (string-append (assoc-ref inputs "coreutils") "/bin/" command)))))
+                (search-input-file inputs
+                                   (string-append "bin/" command))))))
          (add-before 'patch-file-names 'tighten-symlink-mode
            ;; When the ‘eatmydata’ helper detects that it's a symlink, it will
            ;; transparently invoke the command of the same name.  However, it's
@@ -976,11 +977,9 @@ APFS.")
                                              (assoc-ref inputs "bash")
                                              match))
                              (("/bin/(rm|true)" match)
-                              (string-append (assoc-ref inputs "coreutils")
-                                             match))
+                              (search-input-file inputs match))
                              (("/usr(/bin/time)" _ match)
-                              (string-append (assoc-ref inputs "time")
-                                             match))))
+                              (search-input-file inputs match))))
                          (append (find-files "common" ".*")
                                  (find-files "tests" ".*")
                                  (find-files "tools" ".*")
@@ -1027,8 +1026,7 @@ APFS.")
                  (with-output-to-file helper
                    (lambda _
                      (format #t "#!~a --no-auto-compile\n!#\n"
-                             (string-append (assoc-ref inputs "guile")
-                                            "/bin/guile"))
+                             (search-input-file inputs "/bin/guile"))
                      (write
                       `(begin
                          (define (try proc dir)
@@ -1329,8 +1327,9 @@ On Guix System, you will need to invoke the included shell scripts as
              ;; These were copied from the package libfuse.
              (substitute* '("libfuse/lib/mount_util.c" "libfuse/util/mount_util.c")
                (("/bin/(u?)mount" _ maybe-u)
-                (string-append (assoc-ref inputs "util-linux")
-                               "/bin/" maybe-u "mount")))
+                (search-input-file inputs
+                                   (string-append "bin/" maybe-u
+                                                  "mount"))))
              (substitute* '("libfuse/util/mount.mergerfs.c")
                (("/bin/sh")
                 (which "sh")))
@@ -1389,10 +1388,9 @@ is similar to mhddfs, unionfs, and aufs.")
                   (string-append "'" (assoc-ref inputs "coreutils") "/bin/rm'")))
                (substitute* "src/mergerfs.mktrash"
                  (("xattr")
-                  (string-append (assoc-ref inputs "python-xattr") "/bin/xattr"))
+                  (search-input-file inputs "/bin/xattr"))
                  (("mkdir")
-                  (string-append (assoc-ref inputs "coreutils") "/bin/mkdir")))
-               #t)))))
+                  (search-input-file inputs "/bin/mkdir"))))))))
       (synopsis "Tools to help manage data in a mergerfs pool")
       (description "mergerfs-tools is a suite of programs that can audit
 permissions and ownership of files and directories on a mergerfs volume,
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index efeee664d7..83d532f0f3 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -821,8 +821,7 @@ the Monero command line client and daemon.")
            ;; The monerod program must be available so that monero-wallet-gui
            ;; can start a Monero daemon if necessary.
            (lambda* (#:key inputs outputs #:allow-other-keys)
-             (symlink (string-append (assoc-ref inputs "monero")
-                                     "/bin/monerod")
+             (symlink (search-input-file inputs "/bin/monerod")
                       (string-append (assoc-ref outputs "out")
                                      "/bin/monerod")))))))
     (home-page "https://web.getmonero.org/")
diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm
index e0a099e966..3961bdf409 100644
--- a/gnu/packages/flashing-tools.scm
+++ b/gnu/packages/flashing-tools.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2014 Mark H Weaver <[email-masked]>
 ;;; Copyright © 2014 Manolis Fragkiskos Ragkousis <[email-masked]>
 ;;; Copyright © 2016 Hartmut Goebel <[email-masked]>
-;;; Copyright © 2016, 2018 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2016, 2018, 2021 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2016, 2019 Efraim Flashner <[email-masked]>
 ;;; Copyright © 2017 Jonathan Brielmaier <[email-masked]>
 ;;; Copyright © 2017 Julien Lepiller <[email-masked]>
@@ -83,9 +83,7 @@
              (substitute* "dmi.c"
                (("\"dmidecode\"")
                 (format #f "~S"
-                        (string-append (assoc-ref inputs "dmidecode")
-                                       "/sbin/dmidecode"))))
-             #t)))))
+                        (search-input-file inputs "/sbin/dmidecode")))))))))
     (home-page "https://flashrom.org/")
     (synopsis "Identify, read, write, erase, and verify ROM/flash chips")
     (description
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index 8ea893e7cc..118545de64 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -695,7 +695,8 @@ definitions.")
         (add-after 'install 'set-library-path
           (lambda* (#:key inputs outputs #:allow-other-keys)
             (let ((out (assoc-ref outputs "out"))
-                  (potrace (string-append (assoc-ref inputs "potrace") "/bin")))
+                  (potrace (dirname
+                            (search-input-file inputs "bin/potrace"))))
               (wrap-program (string-append out "/bin/fontforge")
                 ;; Fontforge dynamically opens libraries.
                 `("LD_LIBRARY_PATH" ":" prefix
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 80f8c77c73..8459de4356 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Tomáš Čech <[email-masked]>
 ;;; Copyright © 2015 Mark H Weaver <[email-masked]>
-;;; Copyright © 2015, 2018 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2015, 2018, 2021 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2015, 2018 Alex Kost <[email-masked]>
 ;;; Copyright © 2015, 2016, 2017 David Thompson <[email-masked]>
 ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <[email-masked]>
@@ -1199,8 +1199,7 @@ developed mainly for Ren'py.")
          (add-after 'set-paths 'set-build-vars
            (lambda* (#:key inputs #:allow-other-keys)
              (setenv "RENPY_CYTHON"
-                     (string-append (assoc-ref inputs "python2-cython")
-                                    "/bin/cython"))
+                     (search-input-file inputs "/bin/cython"))
              (setenv "RENPY_DEPS_INSTALL" (string-join (map cdr inputs) ":"))
              #t))
          (replace 'build
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 17c61dd387..e351783e58 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -1544,8 +1544,7 @@ shadow mimic them to reach blocks you couldn't reach alone.")
              ;; Look for xdg-open in the store.
              (substitute* "src/core/web.c"
                (("/usr(/bin/xdg-open)" _ bin)
-                (string-append (assoc-ref inputs "xdg-utils") bin)))
-             #t))
+                (search-input-file inputs bin)))))
          (add-after 'unpack 'unbundle-fonts
            (lambda* (#:key inputs #:allow-other-keys)
              ;; Replace bundled Roboto fonts with links to the store.
@@ -3342,7 +3341,8 @@ exec ~a/bin/freedink -refdir ~a/share/dink\n"
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "xboard.conf"
                (("aplay -q")
-                (string-append (assoc-ref inputs "alsa-utils") "/bin/aplay -q")))))
+                (string-append (search-input-file inputs "/bin/aplay")
+                               " -q")))))
          ;; Fixes https://issues.guix.gnu.org/45236.
          (add-after 'unpack 'patch-default-engine
            (lambda* (#:key inputs #:allow-other-keys)
@@ -5837,7 +5837,7 @@ throwing people around in pseudo-randomly generated buildings.")
              (let* ((data (assoc-ref inputs "hyperrogue-data"))
                     (out (assoc-ref outputs "out"))
                     (sounds (string-append out "/share/hyperrogue/sounds"))
-                    (unzip (string-append (assoc-ref inputs "unzip") "/bin/unzip")))
+                    (unzip (search-input-file inputs "/bin/unzip")))
                ;; Extract media license information into sounds directory.
                (invoke unzip "-j" data
                        (string-append
@@ -9034,10 +9034,8 @@ action RPGs.")
            ;; parameters.
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
-                    (bash (string-append (assoc-ref inputs "bash")
-                                         "/bin/bash"))
-                    (flare (string-append (assoc-ref inputs "flare-engine")
-                                          "/bin/flare"))
+                    (bash (search-input-file inputs "/bin/bash"))
+                    (flare (search-input-file inputs "/bin/flare"))
                     (script (string-append out "/bin/flare-game")))
                (mkdir-p (dirname script))
                (call-with-output-file script
@@ -11908,8 +11906,7 @@ and chess engines.")
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "chessx.pro"
                (("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease")
-                (string-append (assoc-ref inputs "qttools") "/bin/lrelease")))
-             #t))
+                (search-input-file inputs "/bin/lrelease")))))
          (add-after 'fix-paths 'make-qt-deterministic
            (lambda _
              (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 851bfcfa2e..18cd82e58e 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -2036,8 +2036,7 @@ track your position right from your laptop.")
          (modify-phases %standard-phases
            (replace 'configure
              (lambda* (#:key inputs outputs #:allow-other-keys)
-               (let ((shell (string-append (assoc-ref inputs "bash")
-                                           "/bin/bash")))
+               (let ((shell (search-input-file inputs "/bin/bash")))
                  (setenv "SHELL" shell)
                  (setenv "CONFIG_SHELL" shell)
                  (setenv "LDFLAGS" (string-append "-Wl,-rpath -Wl,"
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 0c0cfce40c..a625582474 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2020 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2020, 2021 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2013, 2015 Andreas Enge <[email-masked]>
 ;;; Copyright © 2013 Nikita Karetnikov <[email-masked]>
 ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2021 Mark H Weaver <[email-masked]>
@@ -230,11 +230,11 @@ shared NFS home directories.")
                             "gobject/glib-genmarshal.in"
                             "gobject/glib-mkenums.in")
                (("@PYTHON@")
-                (string-append (assoc-ref inputs "python")
-                               "/bin/python"
-                               ,(version-major+minor
-                                 (package-version python)))))
-             #t))
+                (search-input-file inputs
+                                   (string-append
+                                    "/bin/python"
+                                    ,(version-major+minor
+                                      (package-version python))))))))
          (add-before 'check 'pre-check
            (lambda* (#:key inputs outputs #:allow-other-keys)
              ;; For tests/gdatetime.c.
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 4f63b6bf38..9aec7e052b 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -1127,15 +1127,10 @@ freedesktop.org desktop notification specification.")
          (add-after 'unpack 'patch
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "util/mm-common-prepare.in"
-              (("ln") (string-append (assoc-ref inputs "coreutils")
-                                     "/bin/ln"))
-              (("cp") (string-append (assoc-ref inputs "coreutils")
-                                     "/bin/cp"))
-              (("sed") (string-append (assoc-ref inputs "sed")
-                                      "/bin/sed"))
-              (("cat") (string-append (assoc-ref inputs "coreutils")
-                                      "/bin/cat")))
-             #t)))))
+               (("ln") (search-input-file inputs "/bin/ln"))
+               (("cp") (search-input-file inputs "/bin/cp"))
+               (("sed") (search-input-file inputs "/bin/sed"))
+               (("cat") (search-input-file inputs "/bin/cat"))))))))
     (native-inputs
      `(("coreutils" ,coreutils)
        ("gettext" ,gettext-minimal)
@@ -7829,10 +7824,8 @@ services.")
        (modify-phases %standard-phases
          (add-after 'configure 'patch-path
            (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
-             (let* ((ovpn (string-append (assoc-ref inputs "openvpn")
-                                         "/sbin/openvpn"))
-                    (modprobe (string-append (assoc-ref inputs "kmod")
-                                             "/bin/modprobe"))
+             (let* ((ovpn (search-input-file inputs "/sbin/openvpn"))
+                    (modprobe (search-input-file inputs "/bin/modprobe"))
                     (pretty-ovpn (string-append "\"" ovpn "\"")))
                (for-each
                 (lambda (file)
@@ -7885,10 +7878,8 @@ to virtual private networks (VPNs) via OpenVPN.")
        (modify-phases %standard-phases
          (add-after 'configure 'patch-path
            (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
-             (let* ((vpnc (string-append (assoc-ref inputs "vpnc")
-                                         "/sbin/vpnc"))
-                    (modprobe (string-append (assoc-ref inputs "kmod")
-                                             "/bin/modprobe"))
+             (let* ((vpnc (search-input-file inputs "/sbin/vpnc"))
+                    (modprobe (search-input-file inputs "/bin/modprobe"))
                     (pretty-ovpn (string-append "\"" vpnc "\"")))
                (substitute* "src/nm-vpnc-service.c"
                     (("\"/usr/local/sbin/vpnc\"") pretty-ovpn)
@@ -7934,10 +7925,9 @@ Compatible with Cisco VPN concentrators configured to use IPsec.")
        (modify-phases %standard-phases
          (add-after 'configure 'patch-path
            (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
-             (let* ((openconnect (string-append (assoc-ref inputs "openconnect")
-                                         "/sbin/openconnect"))
-                    (modprobe (string-append (assoc-ref inputs "kmod")
-                                             "/bin/modprobe"))
+             (let* ((openconnect (search-input-file inputs
+                                                    "/sbin/openconnect"))
+                    (modprobe (search-input-file inputs "/bin/modprobe"))
                     (pretty-ovpn (string-append "\"" openconnect "\"")))
                (substitute* "src/nm-openconnect-service.c"
                  (("\"/usr(/local)?/s?bin/openconnect\"") pretty-ovpn)
@@ -11608,9 +11598,9 @@ GTK+.  It integrates well with the GNOME desktop environment.")
                (wrap-program prog
                  `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,pylib))
                  `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))
-                 `("PATH" prefix (,(string-append (assoc-ref inputs "pandoc")
-                                                  "/bin"))))
-               #t))))))
+                 `("PATH" prefix (,(dirname
+                                    (search-input-file inputs
+                                                       "/bin/pandoc")))))))))))
     (inputs
      `(("glib" ,glib)
        ("gobject-introspection" ,gobject-introspection)
diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index a6ec75765c..581d6e77e2 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -447,8 +447,10 @@ gpgpme starting with version 1.7.")
                ;; When cross-compiling, the bash script 'libgcrypt-config'
                ;; must be accessible during the configure phase.
                (setenv "PATH"
-                       (string-append (assoc-ref inputs "libgcrypt")
-                                      "/bin:" (getenv "PATH")))))))))
+                       (string-append
+                        (dirname
+                         (search-input-file inputs "bin/libgcrypt-config"))
+                        ":" (getenv "PATH")))))))))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("autoconf" ,autoconf)
@@ -662,8 +664,7 @@ signing, decryption, verification, and key-listing parsing.")
         (add-before
          'build 'set-gpg-file-name
          (lambda* (#:key inputs outputs #:allow-other-keys)
-           (let* ((gpg (string-append (assoc-ref inputs "gpg")
-                                      "/bin/gpg")))
+           (let* ((gpg (search-input-file inputs "/bin/gpg")))
              (substitute* "libpius/constants.py"
                (("/usr/bin/gpg2") gpg))
              #t))))))
@@ -1164,8 +1165,7 @@ over.")
          (delete 'configure) ; no configure script
          (add-before 'install 'hardlink-gnupg
            (lambda* (#:key inputs #:allow-other-keys)
-             (let ((gpg (string-append (assoc-ref inputs "gnupg")
-                                       "/bin/gpg")))
+             (let ((gpg (search-input-file inputs "/bin/gpg")))
                (substitute* (find-files "." "jetring-[[:alpha:]]+$")
                  (("gpg -") (string-append gpg " -"))
                  (("\\\"gpg\\\"") (string-append "\"" gpg "\"")))
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index a0e72be427..f7170dfc11 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -1460,8 +1460,7 @@ standards of the IceCat project.")
                (setenv "CC" "gcc")
                (setenv "MOZ_NOSPAM" "1")
                (setenv "PYTHON"
-                       (string-append (assoc-ref inputs "python2")
-                                      "/bin/python"))
+                       (search-input-file inputs "/bin/python"))
                (setenv "MOZ_BUILD_DATE" ,%icedove-build-id) ; avoid timestamp
                (setenv "LDFLAGS" (string-append "-Wl,-rpath="
                                                 (assoc-ref outputs "out")
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 444fb7813f..58d21c9bee 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <[email-masked]>
 ;;; Copyright © 2016 Matthew Jordan <[email-masked]>
 ;;; Copyright © 2016 Andy Wingo <[email-masked]>
-;;; Copyright © 2016, 2019 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2016, 2019, 2021 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2016, 2017 Petter <[email-masked]>
 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Leo Famulari <[email-masked]>
 ;;; Copyright © 2017 Sergei Trofimovich <[email-masked]>
@@ -193,7 +193,7 @@
            (lambda* (#:key outputs inputs #:allow-other-keys)
              (let* ((output (assoc-ref outputs "out"))
                     (doc_out (assoc-ref outputs "doc"))
-                    (bash (string-append (assoc-ref inputs "bash") "bin/bash"))
+                    (bash (search-input-file inputs "bin/bash"))
                     (docs (string-append doc_out "/share/doc/" ,name "-" ,version))
                     (tests (string-append
                             (assoc-ref outputs "tests") "/share/" ,name "-" ,version)))
diff --git a/gnu/packages/graphviz.scm b/gnu/packages/graphviz.scm
index 34d6434f60..0e4a4b952e 100644
--- a/gnu/packages/graphviz.scm
+++ b/gnu/packages/graphviz.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2015 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2013, 2015, 2021 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2015, 2020 Efraim Flashner <[email-masked]>
 ;;; Copyright © 2016 Theodoros Foradis <[email-masked]>
 ;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus <[email-masked]>
@@ -357,8 +357,7 @@ Graphviz and LaTeX.")
                     ":" (assoc-ref inputs "gdk-pixbuf") "/lib/girepository-1.0"
                     ":" (assoc-ref inputs "atk") "/lib/girepository-1.0")))
                `("PATH" ":" prefix
-                 (,(string-append (assoc-ref inputs "graphviz") "/bin"))))
-             #t)))))
+                 (,(dirname (search-input-file inputs "bin/dot"))))))))))
     (inputs
      `(("atk" ,atk)
        ("gdk-pixbuf" ,gdk-pixbuf+svg)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 2874928883..51fea6c785 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -1118,9 +1118,7 @@ messaging library.")
                         ;; command.
                         (substitute* "src/hmac.scm"
                           (("openssl")
-                           (string-append (assoc-ref inputs "openssl")
-                                          "/bin/openssl")))
-                        #t))
+                           (search-input-file inputs "/bin/openssl")))))
 
                     ;; XXX: The code uses 'include' to include its own source
                     ;; files, and "-L src" isn't enough in this case.
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 1fa7310fab..0744e7e019 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2015 Siniša Biđin <[email-masked]>
 ;;; Copyright © 2015 Paul van der Walt <[email-masked]>
 ;;; Copyright © 2015, 2019 Eric Bavier <[email-masked]>
-;;; Copyright © 2016, 2018, 2019 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2016, 2018, 2019, 2021 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2016, 2017 Nikita <[email-masked]>
 ;;; Copyright © 2016, 2019 Efraim Flashner <[email-masked]>
 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <[email-masked]>
@@ -5811,8 +5811,7 @@ descriptions.")
              (let* ((out   (assoc-ref outputs "out"))
                     (elisp-file "elisp/hindent.el")
                     (dest  (string-append out "/share/emacs/site-lisp"))
-                    (emacs (string-append (assoc-ref inputs "emacs")
-                                          "/bin/emacs")))
+                    (emacs (search-input-file inputs "/bin/emacs")))
                (make-file-writable elisp-file)
                (emacs-substitute-variables elisp-file
                  ("hindent-process-path"
diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm
index cdd4708d22..12e9f3a79f 100644
--- a/gnu/packages/ibus.scm
+++ b/gnu/packages/ibus.scm
@@ -135,11 +135,14 @@
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "src/ibusenginesimple.c"
                (("/usr/share/X11/locale")
-                (string-append (assoc-ref inputs "libx11")
-                               "/share/X11/locale")))
+                (search-input-directory inputs
+                                        "share/X11/locale")))
              (substitute* "ui/gtk3/xkblayout.vala"
                (("\"(setxkbmap|xmodmap)\"" _ prog)
-                (string-append "\"" (assoc-ref inputs prog) "/bin/" prog "\"")))))
+                (string-append "\""
+                               (search-input-file inputs
+                                                  (string-append "bin/" prog))
+                               "\"")))))
          (add-before 'check 'pre-check
            (lambda _
              ;; Tests write to $HOME.
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 0ab910f0dc..c022dfc4e9 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2017, 2019 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2013, 2017, 2019, 2021 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2013, 2015, 2016 Andreas Enge <[email-masked]>
 ;;; Copyright © 2014, 2015, 2016, 2020 Mark H Weaver <[email-masked]>
 ;;; Copyright © 2014, 2015 Alex Kost <[email-masked]>
@@ -2341,9 +2341,7 @@ Wacom-style graphics tablets.")
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* (list "src/dependency.py" "src/exif.py")
                (("exiftool")
-                (string-append (assoc-ref inputs "perl-image-exiftool")
-                               "/bin/exiftool")))
-             #t))
+                (search-input-file inputs "/bin/exiftool")))))
          (add-before 'install 'check
            (lambda _
              (invoke "pytest")))
diff --git a/gnu/packages/irc.scm b/gnu/packages/irc.scm
index 7f5394c03c..9370d157cb 100644
--- a/gnu/packages/irc.scm
+++ b/gnu/packages/irc.scm
@@ -119,7 +119,7 @@
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-inxi-reference
            (lambda* (#:key inputs #:allow-other-keys)
-             (let ((inxi (string-append (assoc-ref inputs "inxi") "/bin/inxi")))
+             (let ((inxi (search-input-file inputs "/bin/inxi")))
                (symlink inxi "data/scripts/inxi")
                #t))))
        #:tests? #f)) ; no test target
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index f7840f6ca4..fdfd044926 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -198,7 +198,7 @@ and binary format defined in The Java Virtual Machine Specification.")
            (delete 'configure)
            (add-before 'install 'fix-wrapper
              (lambda* (#:key inputs #:allow-other-keys)
-               (let ((jps (string-append (assoc-ref inputs "jdk") "/bin/jps")))
+               (let ((jps (search-input-file inputs "/bin/jps")))
                  (substitute* "bin/drip"
                    (("jps") jps)
                    (("brew update && brew upgrade drip") "guix pull && guix install drip")
@@ -378,11 +378,9 @@ JNI.")
            (lambda* (#:key inputs #:allow-other-keys)
              (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
              (setenv "JAVACMD"
-                     (string-append (assoc-ref inputs "jamvm")
-                                    "/bin/jamvm"))
+                     (search-input-file inputs "/bin/jamvm"))
              (setenv "JAVAC"
-                     (string-append (assoc-ref inputs "jikes")
-                                    "/bin/jikes"))
+                     (search-input-file inputs "/bin/jikes"))
              (setenv "CLASSPATH"
                      (string-append (assoc-ref inputs "jamvm")
                                     "/lib/rt.jar"))
@@ -14163,8 +14161,7 @@ can be interpreted by IDEs and static analysis tools to improve code analysis.")
                                             "/dist/" jar-name))
                         (java-cp (string-append share "/" jar-name))
                         (bin (string-append %output "/bin"))
-                        (java (string-append (assoc-ref inputs "jdk")
-                                             "/bin/java")))
+                        (java (search-input-file inputs "/bin/java")))
                    (install-file jar share)
                    (mkdir-p bin)
                    ;; Generate wrapper scripts for bin/, which invoke common
diff --git a/gnu/packages/julia.scm b/gnu/packages/julia.scm
index 52dfc95a4d..62f0e232eb 100644
--- a/gnu/packages/julia.scm
+++ b/gnu/packages/julia.scm
@@ -286,7 +286,7 @@ libraries.  It is also a bit like @code{ldd} and @code{otool -L}.")
              ;; call our version
              (substitute* "base/Makefile"
                (("\\$\\$\\(build_depsbindir\\)/libwhich")
-                (string-append (assoc-ref inputs "libwhich") "/bin/libwhich")))
+                (search-input-file inputs "/bin/libwhich")))
              #t))
          (add-before 'check 'set-home
            ;; Some tests require a home directory to be set.
diff --git a/gnu/packages/less.scm b/gnu/packages/less.scm
index e1c93b734c..bdb93b90c7 100644
--- a/gnu/packages/less.scm
+++ b/gnu/packages/less.scm
@@ -85,12 +85,11 @@ text editors.")
                     (lambda* (#:key inputs #:allow-other-keys)
                       (substitute* "lesspipe.sh"
                         (("tput colors")
-                         (string-append (assoc-ref inputs "ncurses")
-                                        "/bin/tput colors"))
+                         (string-append (search-input-file inputs "/bin/tput")
+                                        " colors"))
                         (("file -")
-                         (string-append (assoc-ref inputs "file")
-                                        "/bin/file -")))
-                      #t)))))
+                         (string-append (search-input-file inputs "/bin/file")
+                                        " -"))))))))
     (inputs
      `(("file" ,file)
        ("ncurses" ,ncurses)))  ; for tput
diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index 429f3647b7..abcf77b5cb 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -6,7 +6,7 @@
 ;;; Copyright © 2017 Thomas Danckaert <[email-masked]>
 ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <[email-masked]>
 ;;; Copyright © 2017 Andy Wingo <[email-masked]>
-;;; Copyright © 2017, 2018, 2019 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2017, 2018, 2019, 2021 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2017, 2018, 2019 Marius Bakke <[email-masked]>
 ;;; Copyright © 2017 Rutger Helling <[email-masked]>
 ;;; Copyright © 2018, 2019 Ricardo Wurmus <[email-masked]>
@@ -1226,10 +1226,7 @@ converting QuarkXPress file format.  It supports versions 3.1 to 4.1.")
              (substitute* '("shell/source/unix/exec/shellexec.cxx"
                             "shell/source/unix/misc/senddoc.sh")
                (("/usr/bin/xdg-open")
-                (string-append (assoc-ref inputs "xdg-utils")
-                               "/bin/xdg-open")))
-
-             #t))
+                (search-input-file inputs "/bin/xdg-open")))))
          (add-after 'install 'reset-zip-timestamps
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 83921a786a..e4baf6013a 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2999,8 +2999,9 @@ processes currently causing I/O.")
              ;; it refers to the right ones.
              (substitute* '("lib/mount_util.c" "util/mount_util.c")
                (("/bin/(u?)mount" _ maybe-u)
-                (string-append (assoc-ref inputs "util-linux")
-                               "/bin/" maybe-u "mount")))
+                (search-input-file inputs
+                                   (string-append "bin/"
+                                                  maybe-u "mount"))))
              (substitute* '("util/mount.fuse.c")
                (("/bin/sh")
                 (which "sh")))
@@ -4091,27 +4092,28 @@ country-specific regulations for the wireless spectrum.")
              (substitute* '("prog/pwm/pwmconfig"
                             "prog/pwm/fancontrol")
                (("gnuplot")
-                (string-append (assoc-ref inputs "gnuplot")
-                               "/bin/gnuplot"))
+                (search-input-file inputs "/bin/gnuplot"))
                (("cat ")
-                (string-append (assoc-ref inputs "coreutils")
-                               "/bin/cat "))
+                (string-append (search-input-file inputs "/bin/cat")
+                               " "))
                (("e?grep " match)
-                (string-append (assoc-ref inputs "grep")
-                               "/bin/" match))
+                (string-append (search-input-file inputs
+                                                  (string-append
+                                                   "/bin/"
+                                                   (string-trim-right match)))
+                               " "))
                (("sed -e")
-                (string-append (assoc-ref inputs "sed")
-                               "/bin/sed -e"))
+                (string-append (search-input-file inputs "/bin/sed")
+                               " -e"))
                (("cut -d")
-                (string-append (assoc-ref inputs "coreutils")
-                               "/bin/cut -d"))
+                (string-append (search-input-file inputs "/bin/cut")
+                               " -d"))
                (("sleep ")
-                (string-append (assoc-ref inputs "coreutils")
-                               "/bin/sleep "))
+                (string-append (search-input-file inputs "/bin/sleep")
+                               " "))
                (("readlink -f")
-                (string-append (assoc-ref inputs "coreutils")
-                               "/bin/readlink -f")))
-             #t)))))
+                (string-append (search-input-file inputs "/bin/readlink")
+                               " -f"))))))))
     (home-page "https://hwmon.wiki.kernel.org/lm_sensors")
     (synopsis "Utilities to read temperature/voltage/fan sensors")
     (description
@@ -5009,7 +5011,7 @@ Bluetooth audio output devices like headphones or loudspeakers.")
                  (("hid2hci --method")
                   (string-append out "/lib/udev/hid2hci --method"))
                  (("/sbin/udevadm")
-                  (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
+                  (search-input-file inputs "/bin/udevadm")))
                #t))))))
     (native-inputs
      `(("pkg-config" ,pkg-config)
@@ -7505,15 +7507,11 @@ the superuser to make device nodes.")
           (lambda*  (#:key inputs #:allow-other-keys)
             (substitute* "scripts/fakeroot.in"
              (("getopt")
-              (string-append (assoc-ref inputs "util-linux")
-                             "/bin/getopt"))
+              (search-input-file inputs "/bin/getopt"))
              (("sed")
-              (string-append (assoc-ref inputs "sed")
-                             "/bin/sed"))
+              (search-input-file inputs "/bin/sed"))
              (("cut")
-              (string-append (assoc-ref inputs "coreutils")
-                             "/bin/cut")) )
-            #t))
+              (search-input-file inputs "/bin/cut")) )))
         (add-before 'configure 'setenv
           (lambda _
             (setenv "LIBS" "-lacl")
@@ -7614,10 +7612,8 @@ set as @code{LD_PRELOAD} to override the C library file system functions.")
          (replace 'build
            (lambda* (#:key inputs #:allow-other-keys)
              (with-directory-excursion "inputattach"
-               (invoke (string-append (assoc-ref inputs "gcc")
-                                      "/bin/gcc")
-                       "-O2" "-o" "inputattach" "inputattach.c"))
-             #t))
+               (invoke "gcc" "-O2" "-o" "inputattach"
+                       "inputattach.c"))))
          (delete 'check)
          (replace 'install
            (lambda* (#:key outputs #:allow-other-keys)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index dc4f213751..e04721db42 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -15475,7 +15475,7 @@ related C functions to get information about the mounted file system.")
              (lambda* (#:key inputs #:allow-other-keys)
                (substitute* "src/unix/cl-diskspace-list-all-disks-with-df.lisp"
                  (("grep")
-                  (string-append (assoc-ref inputs "grep") "/bin/grep")))
+                  (search-input-file inputs "/bin/grep")))
                (substitute* "src/unix/cl-diskspace-list-all-disks-with-df.lisp"
                  (("/bin/df")
                   (which "df")))
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 6dfb7def72..8e3cbf3e59 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -1106,12 +1106,11 @@ assembler, PEG) is less than 1MB.")
        (modify-phases %standard-phases
          (add-before 'install 'fix-utils-path
            (lambda* (#:key inputs #:allow-other-keys)
-             (let* ((coreutils (string-append (assoc-ref inputs "coreutils") "/bin/"))
-                    (cat (string-append coreutils "cat"))
-                    (paste (string-append coreutils "paste"))
-                    (sort (string-append coreutils "sort"))
-                    (basename (string-append coreutils "basename"))
-                    (sed (string-append (assoc-ref inputs "sed") "/bin/sed")))
+             (let* ((cat (search-input-file inputs "/bin/cat"))
+                    (paste (search-input-file inputs "/bin/paste"))
+                    (sort (search-input-file inputs "/bin/sort"))
+                    (basename (search-input-file inputs "/bin/basename"))
+                    (sed (search-input-file inputs "/bin/sed")))
                (substitute* "lisp-repl-core-dumper"
                  (("\\$\\(basename") (string-append "$(" basename))
                  (("\\<cat\\>") cat)
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 73dfa0b675..7cadba6392 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -1193,7 +1193,7 @@ enabled.")
          (delete 'configure)
          (add-before 'build 'patch-lua-calls
            (lambda* (#:key inputs #:allow-other-keys)
-             (let ((lua (string-append (assoc-ref inputs "lua") "/bin/lua")))
+             (let ((lua (search-input-file inputs "/bin/lua")))
                (setenv "LUA" lua)
                (substitute* "old/launcher.lua"
                  (("/usr/bin/env lua") lua))
@@ -1202,7 +1202,7 @@ enabled.")
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "fennel"
                (("/usr/bin/env .*lua")
-                (string-append (assoc-ref inputs "lua") "/bin/lua")))
+                (search-input-file inputs "/bin/lua")))
              #t))
          (delete 'check)
          (add-after 'install 'check
diff --git a/gnu/packages/lxde.scm b/gnu/packages/lxde.scm
index f81d7af3c4..bf32bc0994 100644
--- a/gnu/packages/lxde.scm
+++ b/gnu/packages/lxde.scm
@@ -398,9 +398,7 @@ with freedesktop.org standard.")
                 "terminal_su=/run/setuid-programs/su")
                (("#graphical_su=/usr/bin/gksu")
                 (string-append "graphical_su="
-                               (string-append (assoc-ref inputs "ktsuss")
-                                              "/bin/ktsuss"))))
-             #t)))
+                               (search-input-file inputs "/bin/ktsuss")))))))
        #:configure-flags (list
                           (string-append "--with-preferable-sudo="
                                          (assoc-ref %build-inputs "ktsuss")
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 007a15ee06..337111ed40 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -4087,7 +4087,7 @@ Git and exports them in maildir format or to an MDA through a pipe.")
                     ;; 'git' is invoked in various files of the PublicInbox
                     ;; perl module.
                     `("PATH" ":" prefix
-                      (,(string-append (assoc-ref inputs "git") "/bin")))))
+                      (,(dirname (search-input-file inputs "/bin/git"))))))
                 (find-files (string-append out "/bin"))))
              #t)))))
     (native-inputs
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 1ddeb93002..3e0b5d0c4b 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1391,11 +1391,9 @@ extremely large and complex data collections.")
                               "test/hdf5lib/junit.sh.in"
                               "examples/runExample.sh.in")
                  (("/usr/bin/test")
-                  (string-append (assoc-ref inputs "coreutils")
-                                 "/bin/test"))
+                  (search-input-file inputs "/bin/test"))
                  (("/usr/bin/uname")
-                  (string-append (assoc-ref inputs "coreutils")
-                                 "/bin/uname"))
+                  (search-input-file inputs "/bin/uname"))
                  (("CLASSPATH=[^\n]*")
                   (string-append "CLASSPATH=" class-path)))
                (setenv "CLASSPATH" class-path))
@@ -3600,13 +3598,12 @@ to BMP, JPEG or PNG image formats.")
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-paths
            (lambda* (#:key inputs #:allow-other-keys)
-             (let* ((sed (string-append (assoc-ref inputs "sed") "/bin/sed"))
+             (let* ((sed (search-input-file inputs "/bin/sed"))
                     (coreutils (assoc-ref inputs "coreutils"))
                     (dirname (string-append coreutils "/bin/dirname"))
                     (head (string-append coreutils "/bin/head"))
-                    (perl (string-append (assoc-ref inputs "perl") "/bin/perl"))
-                    (python (string-append (assoc-ref inputs "python")
-                                           "/bin/python3")))
+                    (perl (search-input-file inputs "/bin/perl"))
+                    (python (search-input-file inputs "/bin/python3")))
                (substitute* "src/maxima.in"
                  (("sed ") (string-append sed " "))
                  (("dirname") dirname)
@@ -3640,8 +3637,7 @@ to BMP, JPEG or PNG image formats.")
              (let* ((gnuplot (assoc-ref inputs "gnuplot"))
                     (out (assoc-ref outputs "out"))
                     (datadir (string-append out "/share/maxima/" ,version))
-                    (binutils (string-append (assoc-ref inputs "binutils")
-                                             "/bin")))
+                    (binutils (dirname (search-input-file inputs "/bin/as"))))
                (with-directory-excursion out
                  (mkdir-p "share/emacs")
                  (mkdir-p "share/doc")
@@ -6393,9 +6389,8 @@ of C, Java, or Ada programs.")
        (modify-phases %standard-phases
          (add-before 'configure 'export-shell
            (lambda* (#:key inputs #:allow-other-keys)
-             (setenv "CONFIG_SHELL" (string-append (assoc-ref inputs "bash")
-                                                   "/bin/sh"))
-             #t)))))
+             (setenv "CONFIG_SHELL"
+                     (search-input-file inputs "/bin/sh")))))))
     (inputs
      `(("gmp" ,gmp)))
     (propagated-inputs
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 19b4b5be63..be3261e700 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -282,9 +282,7 @@ user interfaces in a fast and easy way.  It is based on GLib and ncurses.")
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "protobufgen.sh"
                (("/bin/sh")
-                (string-append (assoc-ref inputs "bash")
-                               "/bin/sh")))
-             #t)))))
+                (search-input-file inputs "/bin/sh"))))))))
     (native-inputs
      `(("autoconf" ,autoconf)
        ("automake" ,automake)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 1935a39e65..1b09a49b3b 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -17,7 +17,7 @@
 ;;; Copyright © 2018 nee <[email-masked]>
 ;;; Copyright © 2018, 2021 Stefan Reichör <[email-masked]>
 ;;; Copyright © 2018 Pierre Neidhardt <[email-masked]>
-;;; Copyright © 2018, 2019 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2018, 2019, 2021 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2018 Björn Höfling <[email-masked]>
 ;;; Copyright © 2019 Gabriel Hondet <[email-masked]>
 ;;; Copyright © 2019 Timotej Lazar <[email-masked]>
@@ -624,7 +624,7 @@ many input formats and provides a customisable Vi-style user interface.")
              ;; Replace hard-coded diff file name.
              (substitute* "tests/integration.c"
                (("/usr/bin/diff")
-                (string-append (assoc-ref inputs "diffutils") "/bin/diff")))
+                (search-input-file inputs "/bin/diff")))
              ;; Denemo's documentation says to use this command to run its
              ;; test suite.
              (invoke "make" "-C" "tests" "check")))
@@ -632,8 +632,7 @@ many input formats and provides a customisable Vi-style user interface.")
            ;; This phase sets the default path for lilypond to its current
            ;; location in the store.
            (lambda* (#:key inputs #:allow-other-keys)
-             (let* ((lilypond (string-append (assoc-ref inputs "lilypond")
-                                             "/bin/lilypond")))
+             (let* ((lilypond (search-input-file inputs "/bin/lilypond")))
                (substitute* "src/core/prefops.c"
                  (("g_string_new \\(\"lilypond\"\\);")
                   (string-append "g_string_new (\""
@@ -3315,8 +3314,7 @@ socket or command line.")
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "curseradio/curseradio.py"
                (("/usr/bin/mpv")
-                (string-append (assoc-ref inputs "mpv") "/bin/mpv")))
-             #t)))))
+                (search-input-file inputs "/bin/mpv"))))))))
     (propagated-inputs
      `(("python-lxml" ,python-lxml)
        ("python-requests" ,python-requests)
diff --git a/gnu/packages/netpbm.scm b/gnu/packages/netpbm.scm
index 96025661ca..11fe135a17 100644
--- a/gnu/packages/netpbm.scm
+++ b/gnu/packages/netpbm.scm
@@ -143,8 +143,7 @@
                (("\"%s/gs\"")
                 "\"%s/gsc\"")
                (("/usr/bin/gs")
-                (string-append (assoc-ref inputs "ghostscript") "/bin/gsc"))))
-           #t))
+                (search-input-file inputs "/bin/gsc"))))))
        (add-before 'check 'setup-check
          (lambda _
            ;; install temporarily into /tmp/netpbm
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index c212fc3ef7..23c2575d78 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2017, 2018 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2014, 2017, 2018, 2021 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2015, 2016, 2017, 2018, 2020 Ricardo Wurmus <[email-masked]>
 ;;; Copyright © 2015 Mark H Weaver <[email-masked]>
 ;;; Copyright © 2015, 2016, 2017, 2021 Stefan Reichör <[email-masked]>
@@ -644,11 +644,12 @@ systems with no further dependencies.")
                               "blueman-mechanism.in" "blueman-report.in"
                               "blueman-rfcomm-watcher.in" "blueman-sendto.in"
                               "blueman-services.in" "blueman-tray.in")
-                 (("@PYTHON@") (string-append (assoc-ref inputs "python")
-                                              "/bin/python"
-                                              ,(version-major+minor
-                                                (package-version python))))))
-             #t))
+                 (("@PYTHON@")
+                  (search-input-file inputs
+                                     (string-append
+                                      "/bin/python"
+                                      ,(version-major+minor
+                                        (package-version python)))))))))
          ;; Fix loading of external programs.
          (add-after 'unpack 'patch-external-programs
            (lambda* (#:key inputs #:allow-other-keys)
@@ -658,12 +659,9 @@ systems with no further dependencies.")
                 (string-append (assoc-ref inputs "bluez")
                                "/libexec/bluetooth/bluetoothd"))
                (("/sbin/iptables")
-                (string-append (assoc-ref inputs "iptables")
-                               "/sbin/iptables"))
+                (search-input-file inputs "/sbin/iptables"))
                (("/usr/sbin/pppd")
-                (string-append (assoc-ref inputs "ppp")
-                               "/sbin/pppd")))
-             #t))
+                (search-input-file inputs "/sbin/pppd")))))
          ;; Fix loading of pulseaudio libraries.
          (add-after 'unpack 'patch-pulseaudio-libraries
            (lambda* (#:key inputs #:allow-other-keys)
@@ -1741,9 +1739,7 @@ TCP connection, TLS handshake and so on) in the terminal.")
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "test-suite/testheaders.sh"
                (("/bin/true")
-                (string-append (assoc-ref inputs "coreutils")
-                               "/bin/true")))
-             #t)))))
+                (search-input-file inputs "/bin/true"))))))))
     (inputs
      `(("perl" ,perl)
        ("openldap" ,openldap)
@@ -1838,8 +1834,8 @@ live network and disk I/O bandwidth monitor.")
                       #t))
                   (add-after 'build 'absolutize-tools
                     (lambda* (#:key inputs #:allow-other-keys)
-                      (let ((ethtool (string-append (assoc-ref inputs "ethtool")
-                                                    "/sbin/ethtool")))
+                      (let ((ethtool (search-input-file inputs
+                                                        "/sbin/ethtool")))
                         (substitute* "scripts/airmon-ng"
                           (("ethtool ")
                            (string-append ethtool " ")))
diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm
index 36c45e9c7a..6285138e06 100644
--- a/gnu/packages/node.scm
+++ b/gnu/packages/node.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2014 Cyrill Schenkel <[email-masked]>
 ;;; Copyright © 2015 Andreas Enge <[email-masked]>
 ;;; Copyright © 2015, 2016 David Thompson <[email-masked]>
-;;; Copyright © 2016 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2016, 2021 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2017 Mike Gerwitz <[email-masked]>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <[email-masked]>
 ;;; Copyright © 2018, 2019, 2020, 2021 Marius Bakke <[email-masked]>
@@ -169,10 +169,9 @@
                (format #t "configure flags: ~s~%" flags)
                ;; Node's configure script expects the CC environment variable to
                ;; be set.
-               (setenv "CC" (string-append (assoc-ref inputs "gcc") "/bin/gcc"))
+               (setenv "CC" (search-input-file inputs "/bin/gcc"))
                (apply invoke
-                      (string-append (assoc-ref inputs "python")
-                                     "/bin/python")
+                      (search-input-file inputs "/bin/python")
                       "configure" flags))))
          (add-after 'patch-shebangs 'patch-npm-shebang
            (lambda* (#:key outputs #:allow-other-keys)
@@ -387,8 +386,7 @@ Node.js and web browsers.")
          (delete 'configure)
          (replace 'build
            (lambda* (#:key inputs #:allow-other-keys)
-             (let ((esbuild (string-append (assoc-ref inputs "esbuild")
-                                           "/bin/esbuild")))
+             (let ((esbuild (search-input-file inputs "/bin/esbuild")))
                (invoke esbuild
                        "--platform=node"
                        "--outfile=lib/builder.js"
@@ -443,8 +441,7 @@ Node.js and web browsers.")
          (delete 'configure)
          (replace 'build
            (lambda* (#:key inputs #:allow-other-keys)
-             (let ((esbuild (string-append (assoc-ref inputs "esbuild")
-                                           "/bin/esbuild")))
+             (let ((esbuild (search-input-file inputs "/bin/esbuild")))
                (invoke esbuild
                        "--platform=node"
                        "--outfile=lib/frontend.js"
@@ -498,8 +495,7 @@ Node.js and web browsers.")
          (delete 'configure)
          (replace 'build
            (lambda* (#:key inputs #:allow-other-keys)
-             (let ((esbuild (string-append (assoc-ref inputs "esbuild")
-                                           "/bin/esbuild")))
+             (let ((esbuild (search-input-file inputs "/bin/esbuild")))
                (invoke esbuild
                        "--platform=node"
                        "--outfile=lib/api.js"
@@ -552,8 +548,7 @@ parser definition into a C output.")
        (modify-phases %standard-phases
          (replace 'configure
            (lambda* (#:key inputs #:allow-other-keys)
-             (let ((esbuild (string-append (assoc-ref inputs "esbuild")
-                                           "/bin/esbuild")))
+             (let ((esbuild (search-input-file inputs "/bin/esbuild")))
                (invoke esbuild
                        "--platform=node"
                        "--outfile=bin/generate.js"
@@ -639,8 +634,7 @@ source files.")
                  ;; be set.
                  (setenv "CC" ,(cc-for-target))
                  (apply invoke
-                        (string-append (assoc-ref inputs "python")
-                                       "/bin/python3")
+                        (search-input-file inputs "/bin/python3")
                         "configure" flags))))
            (replace 'patch-files
              (lambda* (#:key inputs #:allow-other-keys)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 1262c0e303..af64a0a4fd 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -209,8 +209,7 @@ This package produces a native @command{ocamlc} and a bytecode @command{ocamllex
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-/bin/sh-references
            (lambda* (#:key inputs #:allow-other-keys)
-             (let* ((sh (string-append (assoc-ref inputs "bash")
-                                       "/bin/sh"))
+             (let* ((sh (search-input-file inputs "/bin/sh"))
                     (quoted-sh (string-append "\"" sh "\"")))
                (with-fluids ((%default-port-encoding #f))
                  (for-each
@@ -804,8 +803,7 @@ the opam file format.")
                  (add-before 'build 'pre-build
                    (lambda* (#:key inputs make-flags #:allow-other-keys)
                      (let ((bash (assoc-ref inputs "bash"))
-                           (bwrap (string-append (assoc-ref inputs "bubblewrap")
-                                                 "/bin/bwrap")))
+                           (bwrap (search-input-file inputs "/bin/bwrap")))
                        (substitute* "src/core/opamSystem.ml"
                          (("\"/bin/sh\"")
                           (string-append "\"" bash "/bin/sh\""))
@@ -3660,8 +3658,8 @@ and 4 (random based) according to RFC 4122.")
        (modify-phases %standard-phases
          (add-before 'configure 'set-shell
            (lambda* (#:key inputs #:allow-other-keys)
-             (setenv "CONFIG_SHELL" (string-append (assoc-ref inputs "bash")
-                                                   "/bin/sh")))))))
+             (setenv "CONFIG_SHELL"
+                     (search-input-file inputs "/bin/sh")))))))
     (inputs `(("lablgtk" ,lablgtk)))
     (properties `((upstream-name . "ocamlgraph")))
     (home-page "http://ocamlgraph.lri.fr/")
diff --git a/gnu/packages/orpheus.scm b/gnu/packages/orpheus.scm
index d981be279c..8214311a18 100644
--- a/gnu/packages/orpheus.scm
+++ b/gnu/packages/orpheus.scm
@@ -76,12 +76,9 @@
              ;; To avoid propagating the mpg321 and vorbis-tools inputs, we can
              ;; make the orpheus application execute the needed players from the
              ;; store.
-             (let ((ogg123 (string-append (assoc-ref inputs "vorbis-tools")
-                                          "/bin/ogg123"))
-                   (mpg321 (string-append (assoc-ref inputs "mpg321")
-                                          "/bin/mpg321"))
-                   (which  (string-append (assoc-ref inputs "which")
-                                          "/bin/which")))
+             (let ((ogg123 (search-input-file inputs "/bin/ogg123"))
+                   (mpg321 (search-input-file inputs "/bin/mpg321"))
+                   (which  (search-input-file inputs "/bin/which")))
                (substitute* "src/orpheusconf.cc"
                  (("ogg123") ogg123)
                  (("which")  which)
diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 31fce7072b..9cf2b721b1 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -515,10 +515,8 @@ any X11 window.")
          (add-before 'install 'patch-passmenu-path
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "contrib/dmenu/passmenu"
-               (("dmenu") (string-append (assoc-ref inputs "dmenu")
-                                         "/bin/dmenu"))
-               (("xdotool") (string-append (assoc-ref inputs "xdotool")
-                                           "/bin/xdotool")))
+               (("dmenu") (search-input-file inputs "/bin/dmenu"))
+               (("xdotool") (search-input-file inputs "/bin/xdotool")))
              #t))
          (add-after 'install 'install-passmenu
            (lambda* (#:key outputs #:allow-other-keys)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 227c612a68..a3695ad674 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -812,7 +812,7 @@ ease from the desktop to a microcontroller or embedded system.")
                       (substitute* '("lib-python/3/subprocess.py")
                         ;; Fix shell path
                         (("/bin/sh")
-                         (string-append (assoc-ref inputs "bash-minimal") "/bin/sh")))
+                         (search-input-file inputs "/bin/sh")))
                       (substitute* '("lib-python/3/distutils/unixccompiler.py")
                         ;; gcc-toolchain does not provide symlink cc -> gcc
                         (("\"cc\"") "\"gcc\""))
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 19fcc2f37e..2fd9374bd5 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -170,9 +170,7 @@
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "qt5ct.pro"
                (("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease")
-                (string-append (assoc-ref inputs "qttools")
-                               "/bin/lrelease")))
-             #t))
+                (search-input-file inputs "/bin/lrelease")))))
          (replace 'configure
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out")))
diff --git a/gnu/packages/radio.scm b/gnu/packages/radio.scm
index 21843a688f..7a4f4866da 100644
--- a/gnu/packages/radio.scm
+++ b/gnu/packages/radio.scm
@@ -715,9 +715,7 @@ to access different radio hardware.")
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "git-version-gen"
                (("/bin/sh")
-                (string-append (assoc-ref inputs "bash")
-                               "/bin/bash")))
-             #t)))))
+                (search-input-file inputs "/bin/bash"))))))))
     (synopsis "DSP primitives for SDR")
     (description
      "This a C-language library for common DSP (Digital Signal Processing)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 34c0a6f79f..b333e4b9df 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014, 2015 Pjotr Prins <[email-masked]>
-;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2014, 2015, 2016, 2017, 2021 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2014, 2015 Mark H Weaver <[email-masked]>
 ;;; Copyright © 2014, 2015 David Thompson <[email-masked]>
 ;;; Copyright © 2015, 2019 Ricardo Wurmus <[email-masked]>
@@ -1173,8 +1173,7 @@ structure.  Supports custom object formatting via plugins.")
              #t))
          (add-after 'unpack 'patch-pandoc-path
            (lambda* (#:key inputs #:allow-other-keys)
-             (let ((pandoc (string-append (assoc-ref inputs "pandoc")
-                                          "/bin/pandoc")))
+             (let ((pandoc (search-input-file inputs "/bin/pandoc")))
                (substitute* "lib/pandoc-ruby.rb"
                  (("@@pandoc_path = 'pandoc'")
                   (format #f "@@pandoc_path = '~a'" pandoc)))
@@ -4848,8 +4847,7 @@ you to merge elements inside a hash together recursively.")
                     (lambda* (#:key inputs outputs #:allow-other-keys)
                       ;; Make the default git binary an absolute path to the
                       ;; store.
-                      (let ((git    (string-append (assoc-ref inputs "git")
-                                                   "/bin/git"))
+                      (let ((git    (search-input-file inputs "/bin/git"))
                             (config (string-append
                                      (assoc-ref outputs "out")
                                      "/lib/ruby/vendor_ruby/gems/git-"
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index faff349565..97944a1fb5 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -325,7 +325,7 @@ safety and thread safety guarantees.")
            (lambda* (#:key inputs #:allow-other-keys)
              (setenv "SHELL" (which "sh"))
              (setenv "CONFIG_SHELL" (which "sh"))
-             (setenv "CC" (string-append (assoc-ref inputs "gcc") "/bin/gcc"))
+             (setenv "CC" (search-input-file inputs "/bin/gcc"))
              ;; The Guix LLVM package installs only shared libraries.
              (setenv "LLVM_LINK_SHARED" "1")))
          (add-after 'unpack 'neuter-tidy
diff --git a/gnu/packages/screen.scm b/gnu/packages/screen.scm
index af40bd73f9..502e8f11af 100644
--- a/gnu/packages/screen.scm
+++ b/gnu/packages/screen.scm
@@ -132,8 +132,7 @@ controlling terminal and attach to it later.")
          (add-after
           'install 'wrap-python-scripts
           (lambda* (#:key inputs outputs #:allow-other-keys)
-            (let* ((python (string-append (assoc-ref inputs "python")
-                                          "/bin/python"))
+            (let* ((python (search-input-file inputs "/bin/python"))
                    (out    (assoc-ref outputs "out"))
                    (config (string-append out "/bin/byobu-config"))
                    (select (string-append out "/bin/byobu-select-session")))
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 2b4e1607f7..7c617711e7 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -215,8 +215,7 @@ This package also provides @command{xls2csv} to export Excel files to CSV.")
              #t))
          (add-before 'configure 'patch-uname
            (lambda* (#:key inputs #:allow-other-keys)
-             (let ((uname-bin (string-append (assoc-ref inputs "coreutils")
-                                             "/bin/uname")))
+             (let ((uname-bin (search-input-file inputs "/bin/uname")))
                (substitute* "src/scripts/R.sh.in"
                  (("uname") uname-bin)))
              #t))
diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm
index 65f4fa85a9..0f0491b39b 100644
--- a/gnu/packages/suckless.scm
+++ b/gnu/packages/suckless.scm
@@ -353,8 +353,8 @@ drawing.")
          (add-before 'build 'set-dmenu-and-xprop-file-name
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "config.def.h"
-               (("dmenu") (string-append (assoc-ref inputs "dmenu") "/bin/dmenu"))
-               (("xprop") (string-append (assoc-ref inputs "xprop") "/bin/xprop")))
+               (("dmenu") (search-input-file inputs "/bin/dmenu"))
+               (("xprop") (search-input-file inputs "/bin/xprop")))
              #t)))))
     (inputs
      `(("dmenu" ,dmenu)
diff --git a/gnu/packages/syndication.scm b/gnu/packages/syndication.scm
index de106e1882..b9ef430744 100644
--- a/gnu/packages/syndication.scm
+++ b/gnu/packages/syndication.scm
@@ -599,7 +599,7 @@ that aims to be quite fast and comfortable to its user.")
          (add-after 'unpack 'patch-mpv-path
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "gfeeds/confManager.py"
-               (("mpv") (string-append (assoc-ref inputs "mpv") "/bin/mpv")))
+               (("mpv") (search-input-file inputs "/bin/mpv")))
              #t))
          (add-after 'install 'wrap-gfeeds
            (lambda* (#:key outputs #:allow-other-keys)
diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index 37ff103c42..9924031993 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -556,8 +556,8 @@ address of one of the participants.")
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (invoke "qmake" "main.pro" "QMAKE_LRELEASE=lrelease"
                      (string-append "MUMBLE_PYTHON="
-                                    (string-append (assoc-ref inputs "python")
-                                                   "/bin/python3"))
+                                    (search-input-file inputs
+                                                       "/bin/python3"))
                      (string-append "CONFIG+="
                                     (string-join
                                      ;; Options used are listed in the same order
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 735373dfa7..496b725543 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -1350,7 +1350,7 @@ basic input/output.")
                     (bin   (string-append out "/bin"))
                     (share (string-append out "/share"))
                     (icons (string-append share "/icons/hicolor/scalable/apps"))
-                    (tic   (string-append (assoc-ref inputs "ncurses") "/bin/tic"))
+                    (tic   (search-input-file inputs "/bin/tic"))
                     (man   (string-append share "/man/man1"))
                     (alacritty-bin "target/release/alacritty"))
                ;; Install the executable.
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index f8ef791c71..ab68355ced 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -470,8 +470,8 @@ files from LOCATIONS with expected checksum HASH.  CODE is not currently in use.
                                              (cut member <> '("." ".."))))))
                     (tlpkg-src (string-append tl-extra-root "/" tl-extra-dir
                                               "/tlpkg"))
-                    (config.guess (string-append (assoc-ref inputs "config")
-                                                 "/bin/config.guess")))
+                    (config.guess (search-input-file inputs
+                                                     "/bin/config.guess")))
 
                ;; Create symbolic links for the latex variants and their
                ;; man pages.
diff --git a/gnu/packages/uml.scm b/gnu/packages/uml.scm
index ad766beece..83f10a08a1 100644
--- a/gnu/packages/uml.scm
+++ b/gnu/packages/uml.scm
@@ -54,8 +54,7 @@
              #t))
          (add-after 'delete-extra-from-classpath 'patch-usr-bin-dot
            (lambda* (#:key inputs #:allow-other-keys)
-             (let ((dot (string-append (assoc-ref inputs "graphviz")
-                                       "/bin/dot")))
+             (let ((dot (search-input-file inputs "/bin/dot")))
                (substitute*
                    "src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizLinux.java"
                  (("/usr/bin/dot") dot)))
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 3691336d3f..8bdac8df53 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Nikita Karetnikov <[email-masked]>
 ;;; Copyright © 2013 Cyril Roelandt <[email-masked]>
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2013, 2014 Andreas Enge <[email-masked]>
 ;;; Copyright © 2015, 2016 Mathieu Lirzin <[email-masked]>
 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <[email-masked]>
@@ -1035,9 +1035,8 @@ a built-in cache to decrease server I/O pressure.")
                                (assoc-ref inputs "git") "/bin/git"
                                "'"))
                (("/usr/sbin/sendmail")
-                (string-append (assoc-ref inputs "sendmail")
-                               "/usr/sbin/sendmail")))
-             #t)))))
+                (search-input-file inputs
+                                   "/usr/sbin/sendmail"))))))))
     (inputs
      `(("git" ,git)
        ("sendmail" ,sendmail)))
@@ -1424,8 +1423,7 @@ also walk each side of a merge and test those changes individually.")
                   (delete 'build)
                   (add-before 'install 'patch-scripts
                     (lambda* (#:key inputs #:allow-other-keys)
-                      (let ((perl (string-append (assoc-ref inputs "perl")
-                                                 "/bin/perl")))
+                      (let ((perl (search-input-file inputs "/bin/perl")))
                         ;; This seems to take care of every shell script that
                         ;; invokes Perl.
                         (substitute* (find-files "." ".*")
@@ -1462,8 +1460,7 @@ also walk each side of a merge and test those changes individually.")
                       (substitute* '("src/lib/Gitolite/Hooks/PostUpdate.pm"
                                      "src/lib/Gitolite/Hooks/Update.pm")
                         (("/usr/bin/perl")
-                         (string-append (assoc-ref inputs "perl")
-                                        "/bin/perl")))
+                         (search-input-file inputs "/bin/perl")))
 
                       (substitute* "src/lib/Gitolite/Common.pm"
                         (("\"ssh-keygen")
@@ -1759,10 +1756,8 @@ history.  It implements the changeset evolution concept for Mercurial.")
          (modify-phases %standard-phases
            (add-after 'unpack 'patch-paths
            (lambda* (#:key inputs #:allow-other-keys)
-             (let ((gpg (string-append (assoc-ref inputs "gnupg")
-                                       "/bin/gpg"))
-                   (openssl (string-append (assoc-ref inputs "openssl")
-                                           "/bin/openssl")))
+             (let ((gpg (search-input-file inputs "/bin/gpg"))
+                   (openssl (search-input-file inputs "/bin/openssl")))
                (substitute* "commitsigs.py"
                  (("b'gpg',") (string-append "b'" gpg "',"))
                  (("b'openssl',") (string-append "b'" openssl "',")))))))
@@ -2707,8 +2702,7 @@ directory full of HOWTOs.")
                #t))
            (add-before 'install 'patch-git
              (lambda* (#:key inputs #:allow-other-keys)
-               (let ((git (string-append (assoc-ref inputs "git")
-                                         "/bin/git")))
+               (let ((git (search-input-file inputs "/bin/git")))
                  (substitute* "bin/git-when-merged"
                    (("'git'") (string-append "'" git "'")))
                  #t)))
@@ -2752,8 +2746,7 @@ how information about the merge is displayed.")
          (delete 'configure)
          (add-before 'install 'patch-git
            (lambda* (#:key inputs #:allow-other-keys)
-             (let ((git (string-append (assoc-ref inputs "git")
-                                       "/bin/git")))
+             (let ((git (search-input-file inputs "/bin/git")))
                (substitute* "git-imerge"
                  (("'git'") (string-append "'" git "'")))
                #t)))
@@ -3045,11 +3038,10 @@ defects faster.")
                (substitute* "tests/test_main.py"
                  (("'gita\\\\n'") "'source\\n'")
                  (("'gita'") "'source'"))
-               (invoke (string-append (assoc-ref inputs "git") "/bin/git")
+               (invoke (search-input-file inputs "/bin/git")
                        "init")
                (add-installed-pythonpath inputs outputs)
-               (invoke (string-append (assoc-ref inputs "python-pytest")
-                                      "/bin/pytest")
+               (invoke (search-input-file inputs "/bin/pytest")
                        "-vv" "tests")))
            (add-after 'install 'install-shell-completions
              (lambda* (#:key outputs #:allow-other-keys)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 3fe6d11653..1fc92a6dec 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -2402,8 +2402,7 @@ other site that youtube-dl supports.")
            ;; Explicitly invoke the input ffmpeg, instead of whichever one
            ;; happens to be in the user's $PATH at run time.
            (lambda* (#:key inputs #:allow-other-keys)
-             (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
-                                          "/bin/ffmpeg")))
+             (let ((ffmpeg (search-input-file inputs "/bin/ffmpeg")))
                (substitute* "src/you_get/processor/ffmpeg.py"
                  ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
                  ;; same string is also used when sniffing ffmpeg's output.
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 6145a77dc4..f014585de4 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -766,8 +766,7 @@ refactor Vim in order to:
        (modify-phases %standard-phases
          (add-after 'configure 'reference-nvim
            (lambda* (#:key inputs #:allow-other-keys)
-             (let ((nvim (string-append (assoc-ref inputs "neovim")
-                                        "/bin/nvim")))
+             (let ((nvim (search-input-file inputs "/bin/nvim")))
                ;; This substitution should change one line, and replaces the default
                ;; value in the struct of options with an absolute store reference.
                (substitute* "../source/src/main.c"
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index b0041de976..be7bd3dee0 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2020 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2020, 2021 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2015, 2016, 2017, 2018 Mark H Weaver <[email-masked]>
 ;;; Copyright © 2016, 2017, 2018. 2019, 2020 Efraim Flashner <[email-masked]>
 ;;; Copyright © 2016, 2017 Ricardo Wurmus <[email-masked]>
@@ -246,7 +246,7 @@
          ;; Configure, build and install QEMU user-emulation static binaries.
          (add-after 'configure 'configure-user-static
            (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((gcc (string-append (assoc-ref inputs "gcc") "/bin/gcc"))
+             (let* ((gcc (search-input-file inputs "/bin/gcc"))
                     (static (assoc-ref outputs "static"))
                     ;; This is the common set of configure flags; it is
                     ;; duplicated here to isolate this phase from manipulations
@@ -1232,8 +1232,8 @@ virtualization library.")
            (lambda* (#:key inputs #:allow-other-keys)
              ;; Xen is not available for now - so only patch qemu.
              (substitute* "virtManager/createconn.py"
-               (("/usr(/bin/qemu-system)" _ suffix)
-                (string-append (assoc-ref inputs "qemu") suffix)))
+               (("/usr(/bin/qemu-system-[a-zA-Z0-9_-]+)" _ suffix)
+                (search-input-file inputs suffix)))
              #t))
          (add-before 'wrap 'wrap-with-GI_TYPELIB_PATH
            (lambda* (#:key inputs outputs #:allow-other-keys)
@@ -1364,9 +1364,7 @@ domains, their live performance and resource utilization statistics.")
                (("\\$\\(PYTHON\\)") "python2"))
              (substitute* "lib/Makefile"
                (("\\$\\(PYTHON\\)")
-                (string-append (assoc-ref inputs "python")
-                               "/bin/python")))
-             #t))
+                (search-input-file inputs "/bin/python")))))
          (add-before 'build 'fix-symlink
            (lambda* (#:key inputs #:allow-other-keys)
              ;; The file 'images/google/protobuf/descriptor.proto' points to
diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
index 8e91f19ce4..ddb9121fe2 100644
--- a/gnu/packages/vpn.scm
+++ b/gnu/packages/vpn.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Andreas Enge <[email-masked]>
-;;; Copyright © 2013, 2016, 2018, 2019, 2020 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2013, 2016, 2018, 2019, 2020, 2021 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2014 Eric Bavier <[email-masked]>
 ;;; Copyright © 2015 Jeff Mickey <[email-masked]>
 ;;; Copyright © 2016, 2017, 2019, 2021 Efraim Flashner <[email-masked]>
@@ -116,7 +116,7 @@ endpoints.")
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "src/libstrongswan/utils/process.c"
                (("/bin/sh")
-                (string-append (assoc-ref inputs "bash") "/bin/sh")))
+                (search-input-file inputs "/bin/sh")))
 
              (substitute* "src/libstrongswan/tests/suites/test_process.c"
                (("/bin/sh") (which "sh"))
@@ -907,8 +907,7 @@ public keys and can roam across IP addresses.")
                     (lambda* (#:key inputs #:allow-other-keys)
                       (substitute* "l2tp.h"
                         (("/usr/sbin/pppd")
-                         (string-append (assoc-ref inputs "ppp")
-                                        "/sbin/pppd")))
+                         (search-input-file inputs "/sbin/pppd")))
                       (setenv "KERNELSRC"
                               (assoc-ref inputs "linux-libre-headers"))
                       #t)))
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index f7a9dda800..2a92051ffb 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -8,7 +8,7 @@
 ;;; Copyright © 2016, 2019, 2020 Efraim Flashner <[email-masked]>
 ;;; Copyright © 2016 Al McElrath <[email-masked]>
 ;;; Copyright © 2016 Carlo Zancanaro <[email-masked]>
-;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2016, 2017, 2018, 2019, 2021 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2016, 2017, 2018, 2020 Nikita <[email-masked]>
 ;;; Copyright © 2016 doncatnip <[email-masked]>
 ;;; Copyright © 2016 Ivan Vilata i Balaguer <[email-masked]>
@@ -612,14 +612,10 @@ Features include:
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
                     (icons (string-append out "/share/i3lock-fancy/icons/"))
-                    (wmctrl (string-append (assoc-ref inputs "wmctrl")
-                                           "/bin/wmctrl"))
-                    (mconvert (string-append (assoc-ref inputs "imagemagick")
-                                             "/bin/convert"))
-                    (mimport (string-append (assoc-ref inputs "imagemagick")
-                                            "/bin/import"))
-                    (awk (string-append (assoc-ref inputs "gawk")
-                                        "/bin/gawk")))
+                    (wmctrl (search-input-file inputs "/bin/wmctrl"))
+                    (mconvert (search-input-file inputs "/bin/convert"))
+                    (mimport (search-input-file inputs "/bin/import"))
+                    (awk (search-input-file inputs "/bin/gawk")))
 
                (substitute* "lock"
                  (("\\$\\(command -V wmctrl\\)") wmctrl)
diff --git a/gnu/packages/wxwidgets.scm b/gnu/packages/wxwidgets.scm
index 423da37a3c..83801176b4 100644
--- a/gnu/packages/wxwidgets.scm
+++ b/gnu/packages/wxwidgets.scm
@@ -216,7 +216,7 @@ and many other languages.")
              (setenv "WXWIN" (assoc-ref inputs "wxwidgets"))
              ;; Copy the waf executable to the source directory since it needs
              ;; to be in a writable directory.
-             (copy-file (string-append (assoc-ref inputs "python-waf") "/bin/waf")
+             (copy-file (search-input-file inputs "/bin/waf")
                         "bin/waf")
              (setenv "WAF" "bin/waf")
              ;; The build script tries to copy license files from the
@@ -306,8 +306,9 @@ provide a 100% native look and feel for the application.")
              (setenv "WXWIN" (assoc-ref inputs "wxwidgets"))
              (use-modules (ice-9 popen) (ice-9 rdelim))
              (let ((port (open-pipe* OPEN_READ
-                                     (string-append (assoc-ref inputs "wxwidgets")
-                                                    "/bin/wx-config") "--cppflags")))
+                                     (search-input-file inputs
+                                                        "/bin/wx-config")
+                                     "--cppflags")))
                (setenv "CPPFLAGS" (read-string port))
                (close-pipe port))
              #t)))))
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index d0da2d28d1..b4723920c4 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <[email-masked]>
 ;;; Copyright © 2014 Eric Bavier <[email-masked]>
 ;;; Copyright © 2014, 2015, 2016 Alex Kost <[email-masked]>
-;;; Copyright © 2013, 2015, 2017, 2018, 2019 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2013, 2015, 2017, 2018, 2019, 2021 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2015, 2016 Mathieu Lirzin <[email-masked]>
 ;;; Copyright © 2015 Alexander I.Grafov <[email-masked]>
 ;;; Copyright © 2015 Andy Wingo <[email-masked]>
@@ -230,8 +230,7 @@ program.")
        (modify-phases %standard-phases
          (add-before 'build 'configure
            (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let ((xrandr (string-append (assoc-ref inputs "xrandr")
-                                          "/bin/xrandr")))
+             (let ((xrandr (search-input-file inputs "/bin/xrandr")))
                (substitute* "contrib/etc/xdg/autostart/autorandr.desktop"
                  (("/usr") (assoc-ref outputs "out")))
                (substitute* "autorandr.py"
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index b54523f3b1..3c4ca3bf17 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2013, 2014 Andreas Enge <[email-masked]>
 ;;; Copyright © 2014, 2015, 2017, 2018, 2020 Mark H Weaver <[email-masked]>
 ;;; Copyright © 2014, 2015 Eric Bavier <[email-masked]>
-;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2015 Eric Dvorsak <[email-masked]>
 ;;; Copyright © 2016 Mathieu Lirzin <[email-masked]>
 ;;; Copyright © 2015 Cyrill Schenkel <[email-masked]>
@@ -2288,8 +2288,7 @@ X server: @code{handhelds}, @code{redglass} and @code{whiteglass}.")
            (delete 'configure)
            (add-before 'build 'set-inkscape-environment-variable
              (lambda* (#:key inputs #:allow-other-keys)
-               (let ((inkscape (string-append (assoc-ref inputs "inkscape")
-                                              "/bin/inkscape")))
+               (let ((inkscape (search-input-file inputs "/bin/inkscape")))
                  (setenv "INKSCAPE" inkscape)
                  #t)))
            (add-before 'build 'placate-inkscape-warnings
@@ -3592,8 +3591,7 @@ X server.")
                (format #t "decompressing x86emu source code~%")
                (with-directory-excursion "libs"
                  (let ((srcs (assoc-ref inputs "xorg-server-sources"))
-                       (tar-binary (string-append (assoc-ref inputs "tar")
-                                                  "/bin/tar")))
+                       (tar-binary (search-input-file inputs "/bin/tar")))
                    (invoke tar-binary "xvf" srcs "--strip-components=3"
                            "--wildcards" "*/hw/xfree86/x86emu/")
                    ;; extract license:
@@ -4964,9 +4962,8 @@ protocol and arbitrary X extension protocol.")
              (wrap-program (string-append (assoc-ref outputs "out")
                                           "/bin/mkfontdir")
                `("PATH" ":" prefix
-                 (,(string-append (assoc-ref inputs "mkfontscale")
-                                  "/bin"))))
-             #t)))))
+                 (,(dirname
+                    (search-input-file inputs "/bin/mkfontscale"))))))))))
     (inputs
       `(("mkfontscale" ,mkfontscale)))
     (native-inputs
@@ -6403,7 +6400,8 @@ basic eye-candy effects.")
                ;; The trailing -- is intentional, so we only replace it inside
                ;; a command line.
                (("dbus-launch --")
-                (string-append (assoc-ref inputs "dbus") "/bin/dbus-launch --")))
+                (string-append (search-input-file inputs "/bin/dbus-launch")
+                               " --")))
              ;; /run/user does not exist on guix system
              (substitute* "./xpra/scripts/config.py"
                (("socket-dir.*: \"\",")
-- 
2.32.0