From bc64d9554b337d4baaeccbcce22ea08a184c9e4c Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 16 Jul 2021 16:50:56 +0200 Subject: gnu: Use 'search-input-file' when looking for executables. * 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 | 59 ++++++++++++++++---------------------- 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 | 7 ++--- gnu/packages/games.scm | 17 +++++------ gnu/packages/geo.scm | 3 +- gnu/packages/glib.scm | 10 +++---- 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 | 60 ++++++++++++++++++--------------------- 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, 279 insertions(+), 397 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 9d1654ef91..cf37a96b15 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -1259,8 +1259,7 @@ (define-public isc-dhcp (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" @@ -1561,8 +1560,7 @@ (define-public rottlog (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 b740f0ffed..6535c87ea1 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -5223,11 +5223,10 @@ (define-public ableton-link (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 78b491d50d..577196e3df 100644 --- a/gnu/packages/benchmark.scm +++ b/gnu/packages/benchmark.scm @@ -69,8 +69,7 @@ (define-public fio '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 965dd91853..75668418f0 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -5704,7 +5704,7 @@ (define-public roary (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 @@ (define-public ngless (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 ;;; Copyright © 2015 Andreas Enge ;;; Copyright © 2016 Eric Bavier -;;; Copyright © 2015, 2019, 2020 Ludovic Courtès +;;; Copyright © 2015, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2017 Thomas Danckaert ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018 Arun Isaac @@ -252,7 +252,7 @@ (define-public boost-for-irods (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 742992a119..61f0c14d9c 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 +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2021 Ludovic Courtès ;;; Copyright © 2015, 2018 Mark H Weaver ;;; Copyright © 2015 Leo Famulari ;;; Copyright © 2016, 2020 Jan (janneke) Nieuwenhuizen @@ -139,9 +139,9 @@ (define-public grub ;; 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 @@ -315,9 +315,8 @@ (define-public grub-efi (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 @@ (define-public inchi (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 +;;; Copyright © 2014, 2015, 2016, 2021 Ludovic Courtès ;;; Copyright © 2016, 2017, 2018, 2020, 2021 Efraim Flashner ;;; Copyright © 2016 Sou Bunnbu ;;; Copyright © 2017, 2018, 2019, 2021 Nicolas Goaziou @@ -178,8 +178,7 @@ (define-public ding (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 @@ (define-public ldc (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 02aacf353c..d21c8ea7da 100644 --- a/gnu/packages/education.scm +++ b/gnu/packages/education.scm @@ -513,8 +513,7 @@ (define-public childsplay #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 e85b5f40ae..973d944a9c 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 Taylan Ulrich Bayirli/Kammer -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2014, 2015, 2016, 2017, 2018 Mark H Weaver ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Alex Kost ;;; Copyright © 2015 Federico Beffa @@ -484,8 +484,7 @@ (define-public emacs-hyperbole (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 @@ -1413,7 +1412,7 @@ (define (el-dir store-dir) ((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") @@ -2568,7 +2567,7 @@ (define-public emacs-auctex (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") @@ -2932,8 +2931,7 @@ (define-public emacs-ggtags (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 @@ -3039,7 +3037,7 @@ (define-public emacs-graphviz-dot-mode (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" @@ -5503,8 +5501,7 @@ (define-public emacs-flycheck-grammalecte (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") @@ -9276,9 +9273,7 @@ (define-public emacs-counsel-notmuch (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) @@ -12973,8 +12968,7 @@ (define-public emacspeak (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 @@ -13700,10 +13694,10 @@ (define-public emacs-exwm (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")) @@ -13816,10 +13810,10 @@ (define-public emacs-exwm-x (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)))))) @@ -23332,7 +23326,7 @@ (define-public emacs-treemacs (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")))) @@ -26285,14 +26279,14 @@ (define-public emacs-telega (add-after 'unpack 'patch-sources (lambda* (#:key inputs #:allow-other-keys) ;; Hard-code paths to `ffplay` and `ffmpeg`. - (let* ((ffmpeg (assoc-ref inputs "ffmpeg")) - (ffmpeg-bin (string-append ffmpeg "/bin/ffmpeg")) - (ffplay-bin (string-append ffmpeg "/bin/ffplay"))) + (let* ((ffplay-bin (search-input-file inputs "/bin/ffplay")) + (ffmpeg-bin (search-input-file inputs "/bin/ffmpeg"))) (substitute* '("telega-ffplay.el" "telega-vvnote.el") (("(shell-command-to-string\|concat) \"(ffmpeg\|ffprobe)" all func cmd) - (string-append func " \"" (assoc-ref inputs "ffmpeg") - "/bin/" cmd)) + (string-append func " \"" + (search-input-file + inputs (string-append "/bin/" cmd)))) (("\\(executable-find \"ffplay\"\\)") (string-append "(and (file-executable-p \"" ffplay-bin "\")" "\"" ffplay-bin "\")")) @@ -26303,8 +26297,7 @@ (define-public emacs-telega (lambda* (#:key inputs outputs #:allow-other-keys) (substitute* "telega-server.el" (("@TELEGA_SERVER_BIN@") - (string-append (assoc-ref inputs "emacs-telega-server") - "/bin/telega-server"))) + (search-input-file inputs "/bin/telega-server"))) (substitute* "telega-util.el" (("@TELEGA_SHARE@") (string-append (assoc-ref outputs "out") @@ -27596,9 +27589,7 @@ (define-public emacs-exiftool (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 a5edc918e2..2394342d26 100644 --- a/gnu/packages/emulators.scm +++ b/gnu/packages/emulators.scm @@ -615,8 +615,7 @@ (define-public higan (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 4e01bf8b3e..74e95cfc9e 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -1964,19 +1964,14 @@ (define-public freehdl (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" @@ -1987,7 +1982,7 @@ (define-public freehdl (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")) @@ -2066,8 +2061,7 @@ (define-public librepcb (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 @@ (define-public entr (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 b6d0bcbc55..94f3c7e6d7 100644 --- a/gnu/packages/file-systems.scm +++ b/gnu/packages/file-systems.scm @@ -868,7 +868,8 @@ (define-public libeatmydata (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 @@ -1046,11 +1047,9 @@ (define-public xfstests (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" ".*") @@ -1097,8 +1096,7 @@ (define-public xfstests (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) @@ -1407,8 +1405,9 @@ (define-public mergerfs (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" command) (string-append (assoc-ref inputs "bash-minimal") command)))))))) @@ -1461,10 +1460,9 @@ (define-public mergerfs-tools (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 f88b578085..e6c2a42e71 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -823,8 +823,7 @@ (define-public monero-gui ;; 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 ;;; Copyright © 2014 Manolis Fragkiskos Ragkousis ;;; Copyright © 2016 Hartmut Goebel -;;; Copyright © 2016, 2018 Ludovic Courtès +;;; Copyright © 2016, 2018, 2021 Ludovic Courtès ;;; Copyright © 2016, 2019 Efraim Flashner ;;; Copyright © 2017 Jonathan Brielmaier ;;; Copyright © 2017 Julien Lepiller @@ -83,9 +83,7 @@ (define-public flashrom (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 b4ef9f5c24..6ef09455b5 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -696,7 +696,8 @@ (define-public fontforge (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 17b52e2694..e7be20d580 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 ;;; Copyright © 2015 Mark H Weaver -;;; Copyright © 2015, 2018 Ludovic Courtès +;;; Copyright © 2015, 2018, 2021 Ludovic Courtès ;;; Copyright © 2015, 2018 Alex Kost ;;; Copyright © 2015, 2016, 2017 David Thompson ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner @@ -1203,9 +1203,8 @@ (define-public python2-renpy (add-after 'set-paths 'set-build-vars (lambda* (#:key inputs native-inputs #:allow-other-keys) (setenv "RENPY_CYTHON" - (string-append (assoc-ref (or native-inputs inputs) - "python2-cython") - "/bin/cython")) + (search-input-file (or native-inputs 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 8362300bef..38b5782547 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -1555,8 +1555,7 @@ (define-public opensurge ;; 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. @@ -3353,7 +3352,8 @@ (define-public xboard (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) @@ -5848,7 +5848,7 @@ (define-public hyperrogue (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 @@ -9045,10 +9045,8 @@ (define-public flare-game ;; 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 @@ -11919,8 +11917,7 @@ (define-public chessx (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 61c104fdfb..cb53afdc54 100644 --- a/gnu/packages/geo.scm +++ b/gnu/packages/geo.scm @@ -1964,8 +1964,7 @@ (define-public grass (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 6a7e9696b2..ae88dbe9e7 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -246,11 +246,11 @@ (define glib "gobject/glib-genmarshal.in" "gobject/glib-mkenums.in") (("@PYTHON@") - (string-append (assoc-ref (or native-inputs inputs) "python") - "/bin/python" - ,(version-major+minor - (package-version python))))) - #t)) + (search-input-file (or native-inputs inputs) + (string-append + "/bin/python" + ,(version-major+minor + (package-version python)))))))) (add-before 'check 'pre-check (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) ;; For tests/gdatetime.c. diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 1b35645694..24c5adc44a 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -1129,15 +1129,10 @@ (define-public mm-common (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) @@ -7833,10 +7828,8 @@ (define-public network-manager-openvpn (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) @@ -7889,10 +7882,8 @@ (define-public network-manager-vpnc (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) @@ -7938,10 +7929,9 @@ (define-public network-manager-openconnect (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) @@ -11611,9 +11601,9 @@ (define-public apostrophe (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 10f21f6a6d..4584310e55 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -469,8 +469,10 @@ (define-public guile-gcrypt ;; 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) @@ -684,8 +686,7 @@ (define-public pius (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)))))) @@ -1213,8 +1214,7 @@ (define-public jetring (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 74403751a9..1dc340c082 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -1460,8 +1460,7 @@ (define-public icedove (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 703b5fc57c..d3ef39a2e6 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner ;;; Copyright © 2016 Matthew Jordan ;;; Copyright © 2016 Andy Wingo -;;; Copyright © 2016, 2019 Ludovic Courtès +;;; Copyright © 2016, 2019, 2021 Ludovic Courtès ;;; Copyright © 2016, 2017 Petter ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Leo Famulari ;;; Copyright © 2017 Sergei Trofimovich @@ -1140,7 +1140,7 @@ (define-public go-1.4 (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 43eaecace4..3bfbcb2250 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 +;;; Copyright © 2013, 2015, 2021 Ludovic Courtès ;;; Copyright © 2015, 2020 Efraim Flashner ;;; Copyright © 2016 Theodoros Foradis ;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus @@ -359,8 +359,7 @@ (define-public xdot ":" (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 6c834698b8..78f77d2547 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -1126,9 +1126,7 @@ (define-public jupyter-guile-kernel ;; 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 7ed0db6c66..2c48ce9586 100644 --- a/gnu/packages/haskell-xyz.scm +++ b/gnu/packages/haskell-xyz.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2015 Siniša Biđin ;;; Copyright © 2015 Paul van der Walt ;;; Copyright © 2015, 2019 Eric Bavier -;;; Copyright © 2016, 2018, 2019 Ludovic Courtès +;;; Copyright © 2016, 2018, 2019, 2021 Ludovic Courtès ;;; Copyright © 2016, 2017 Nikita ;;; Copyright © 2016, 2019 Efraim Flashner ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus @@ -5895,8 +5895,7 @@ (define-public ghc-hindent (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 @@ (define-public ibus (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 c55a87ba9f..19bbb2d63d 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 +;;; Copyright © 2013, 2017, 2019, 2021 Ludovic Courtès ;;; Copyright © 2013, 2015, 2016 Andreas Enge ;;; Copyright © 2014, 2015, 2016, 2020 Mark H Weaver ;;; Copyright © 2014, 2015 Alex Kost @@ -2343,9 +2343,7 @@ (define-public phockup (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 e386e54e77..470c7ec8f3 100644 --- a/gnu/packages/irc.scm +++ b/gnu/packages/irc.scm @@ -119,7 +119,7 @@ (define-public quassel (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 @@ (define-public drip (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 @@ (define ant-bootstrap (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 @@ (define (input-jar input) "/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 c637c36f61..97218656cc 100644 --- a/gnu/packages/julia.scm +++ b/gnu/packages/julia.scm @@ -286,7 +286,7 @@ (define-public julia ;; 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 32133943ae..c9b18ea36b 100644 --- a/gnu/packages/less.scm +++ b/gnu/packages/less.scm @@ -85,12 +85,11 @@ (define-public lesspipe (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 0dcdf46ff1..c1e7a58c59 100644 --- a/gnu/packages/libreoffice.scm +++ b/gnu/packages/libreoffice.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2017 Thomas Danckaert ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice ;;; Copyright © 2017 Andy Wingo -;;; Copyright © 2017, 2018, 2019 Ludovic Courtès +;;; Copyright © 2017, 2018, 2019, 2021 Ludovic Courtès ;;; Copyright © 2017, 2018, 2019 Marius Bakke ;;; Copyright © 2017 Rutger Helling ;;; Copyright © 2018, 2019 Ricardo Wurmus @@ -1228,10 +1228,7 @@ (define-public libreoffice (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 ac584787b9..9e3ad367e2 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -3143,11 +3143,12 @@ (define-public fuse ;; 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"))) - (substitute* "util/mount.fuse.c" - (("/bin/sh" command) - (string-append (assoc-ref inputs "bash-minimal") command))) + (search-input-file inputs + (string-append "bin/" + maybe-u "mount")))) + (substitute* '("util/mount.fuse.c") + (("/bin/sh") + (search-input-file inputs "/bin/sh"))) ;; This hack leads libfuse to search for 'fusermount' in ;; $PATH, where it may find a setuid-root binary, instead of @@ -4234,27 +4235,28 @@ (define-public lm-sensors (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 @@ -5152,7 +5154,7 @@ (define-public bluez (("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) @@ -7686,15 +7688,11 @@ (define-public fakeroot (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") @@ -7795,10 +7793,8 @@ (define-public inputattach (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 dcb520d58a..72afc5cd68 100644 --- a/gnu/packages/lisp-xyz.scm +++ b/gnu/packages/lisp-xyz.scm @@ -15634,7 +15634,7 @@ (define-public sbcl-cl-diskspace (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 be34b6c416..63f5ba744e 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -1106,12 +1106,11 @@ (define-public lisp-repl-core-dumper (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) 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 @@ (define-public fennel (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 @@ (define-public fennel (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 @@ (define-public spacefm "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 a414eb2dda..496c0d6200 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -4120,7 +4120,7 @@ (define-public public-inbox ;; '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 0bfc6ef8c2..379ec222d2 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -1390,11 +1390,9 @@ (define-public hdf-java "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)) @@ -3630,13 +3628,12 @@ (define-public maxima (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) @@ -3670,8 +3667,7 @@ (define-public maxima (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") @@ -6438,9 +6434,8 @@ (define-public frama-c (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 29f9a0d08c..d289dbf170 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -282,9 +282,7 @@ (define-public libgadu (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 7c57b45029..492103b715 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -17,7 +17,7 @@ ;;; Copyright © 2018 nee ;;; Copyright © 2018, 2021 Stefan Reichör ;;; Copyright © 2018 Pierre Neidhardt -;;; Copyright © 2018, 2019 Ludovic Courtès +;;; Copyright © 2018, 2019, 2021 Ludovic Courtès ;;; Copyright © 2018 Björn Höfling ;;; Copyright © 2019 Gabriel Hondet ;;; Copyright © 2019 Timotej Lazar @@ -625,7 +625,7 @@ (define-public denemo ;; 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"))) @@ -633,8 +633,7 @@ (define-public denemo ;; 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 (\"" @@ -3316,8 +3315,7 @@ (define-public curseradio (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 @@ (define-syntax drop (("\"%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 dfa91cd553..64cbec4c08 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 +;;; Copyright © 2014, 2017, 2018, 2021 Ludovic Courtès ;;; Copyright © 2015, 2016, 2017, 2018, 2020 Ricardo Wurmus ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2015, 2016, 2017, 2021 Stefan Reichör @@ -643,11 +643,12 @@ (define-public blueman "blueman-manager.in" "blueman-mechanism.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) @@ -657,12 +658,9 @@ (define-public blueman (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) @@ -1740,9 +1738,7 @@ (define-public squid (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) @@ -1837,8 +1833,8 @@ (define-public aircrack-ng #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 ;;; Copyright © 2015 Andreas Enge ;;; Copyright © 2015, 2016 David Thompson -;;; Copyright © 2016 Ludovic Courtès +;;; Copyright © 2016, 2021 Ludovic Courtès ;;; Copyright © 2017 Mike Gerwitz ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018, 2019, 2020, 2021 Marius Bakke @@ -169,10 +169,9 @@ (define-public node (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 @@ (define-public node-llparse-builder-bootstrap (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 @@ (define-public node-llparse-frontend-bootstrap (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 @@ (define-public node-llparse-bootstrap (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 @@ (define-public llhttp-bootstrap (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 @@ (define-public node-lts ;; 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 fd09459f24..d987201508 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -210,8 +210,7 @@ (define-public ocaml-4.11 (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 @@ -805,8 +804,7 @@ (define-public opam (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\"")) @@ -3674,8 +3672,8 @@ (define-public ocaml-graph (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 @@ (define-public orpheus ;; 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 7da8b23fe1..504a908100 100644 --- a/gnu/packages/password-utils.scm +++ b/gnu/packages/password-utils.scm @@ -523,11 +523,11 @@ (define-public password-store (substitute* "contrib/dmenu/passmenu" (("dmenu=dmenu\n") (string-append "dmenu=" - (assoc-ref inputs "dmenu") "/bin/dmenu\n")) + (search-input-file inputs "/bin/dmenu") + "\n")) (("xdotool=\"xdotool") (string-append "xdotool=\"" - (assoc-ref inputs "xdotool") "/bin/xdotool"))) - #t)) + (search-input-file inputs "/bin/xdotool")))))) (add-after 'install 'install-passmenu (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index f4d574e2b2..aa6b29df26 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -822,7 +822,7 @@ (define-public pypy3 (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 95618a9787..f80ea336d8 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -168,9 +168,7 @@ (define-public qt5ct (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 443b115d46..d8f4161eb7 100644 --- a/gnu/packages/radio.scm +++ b/gnu/packages/radio.scm @@ -723,9 +723,7 @@ (define-public libosmo-dsp (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 cfc91f73af..2fe60c4fa2 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 -;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès +;;; Copyright © 2014, 2015, 2016, 2017, 2021 Ludovic Courtès ;;; Copyright © 2014, 2015 Mark H Weaver ;;; Copyright © 2014, 2015 David Thompson ;;; Copyright © 2015, 2019 Ricardo Wurmus @@ -1175,8 +1175,7 @@ (define-public ruby-pandoc-ruby #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))) @@ -4850,8 +4849,7 @@ (define-public ruby-git (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 0e0c33068f..fd6233fc94 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -325,7 +325,7 @@ (define-public rust-1.30 (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 @@ (define-public byobu (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 e03761f87f..bdc72d218b 100644 --- a/gnu/packages/statistics.scm +++ b/gnu/packages/statistics.scm @@ -216,8 +216,7 @@ (define r-with-tests #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 @@ (define-public surf (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 cda7569dfa..58db738130 100644 --- a/gnu/packages/syndication.scm +++ b/gnu/packages/syndication.scm @@ -599,7 +599,7 @@ (define-public gfeeds (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 @@ (define-public mumble (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 @@ (define-public alacritty (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 681a1aa972..33d9064c80 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -466,8 +466,8 @@ (define (substitute-commands scripts) (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 @@ (define-public plantuml #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 ;;; Copyright © 2013 Cyril Roelandt -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2013, 2014 Andreas Enge ;;; Copyright © 2015, 2016 Mathieu Lirzin ;;; Copyright © 2014, 2015, 2016 Mark H Weaver @@ -1035,9 +1035,8 @@ (define-public python-git-multimail (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 @@ (define-public gitolite (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 @@ (define-public gitolite (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 @@ (define-public hg-commitsigs (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 @@ (define-public git-when-merged #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 @@ (define-public git-imerge (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 @@ (define-public gita (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 b2bb7b8d3b..12b98fe9a1 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -2435,8 +2435,7 @@ (define-public you-get ;; 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 609349cd8f..e14c5aadca 100644 --- a/gnu/packages/vim.scm +++ b/gnu/packages/vim.scm @@ -771,8 +771,7 @@ (define-public eovim (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 c3459ebb15..b223016d17 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 +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2020, 2021 Ludovic Courtès ;;; Copyright © 2015, 2016, 2017, 2018 Mark H Weaver ;;; Copyright © 2016, 2017, 2018. 2019, 2020 Efraim Flashner ;;; Copyright © 2016, 2017 Ricardo Wurmus @@ -247,7 +247,7 @@ (define-public qemu ;; 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 @@ -1239,8 +1239,8 @@ (define-public virt-manager (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) @@ -1371,9 +1371,7 @@ (define-public criu (("\\$\\(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 f3db1c198f..852d0038c7 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 -;;; Copyright © 2013, 2016, 2018, 2019, 2020 Ludovic Courtès +;;; Copyright © 2013, 2016, 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2015 Jeff Mickey ;;; Copyright © 2016, 2017, 2019, 2021 Efraim Flashner @@ -323,7 +323,7 @@ (define-public strongswan "/bin/" command))) (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")) @@ -1115,8 +1115,7 @@ (define-public xl2tpd (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 51034cac4b..66440e5008 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -8,7 +8,7 @@ ;;; Copyright © 2016, 2019, 2020 Efraim Flashner ;;; Copyright © 2016 Al McElrath ;;; Copyright © 2016 Carlo Zancanaro -;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès +;;; Copyright © 2016, 2017, 2018, 2019, 2021 Ludovic Courtès ;;; Copyright © 2016, 2017, 2018, 2020 Nikita ;;; Copyright © 2016 doncatnip ;;; Copyright © 2016 Ivan Vilata i Balaguer @@ -613,14 +613,10 @@ (define-public i3lock-fancy (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 54d385fd53..15a995462a 100644 --- a/gnu/packages/wxwidgets.scm +++ b/gnu/packages/wxwidgets.scm @@ -216,7 +216,7 @@ (define-public python-wxpython (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 @@ (define-public python2-wxpython (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 11e815bd72..d13392ae77 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2014, 2015, 2016 Mark H Weaver ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2014, 2015, 2016 Alex Kost -;;; Copyright © 2013, 2015, 2017, 2018, 2019 Ludovic Courtès +;;; Copyright © 2013, 2015, 2017, 2018, 2019, 2021 Ludovic Courtès ;;; Copyright © 2015, 2016 Mathieu Lirzin ;;; Copyright © 2015 Alexander I.Grafov ;;; Copyright © 2015 Andy Wingo @@ -231,8 +231,7 @@ (define-public autorandr (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 9978480e4b..8d6dc21c4f 100644 --- a/gnu/packages/xorg.scm +++ b/gnu/packages/xorg.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2013, 2014 Andreas Enge ;;; Copyright © 2014, 2015, 2017, 2018, 2020 Mark H Weaver ;;; Copyright © 2014, 2015 Eric Bavier -;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès +;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2015 Eric Dvorsak ;;; Copyright © 2016 Mathieu Lirzin ;;; Copyright © 2015 Cyrill Schenkel @@ -2289,8 +2289,7 @@ (define-public hackneyed-x11-cursors (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 @@ -3593,8 +3592,7 @@ (define-public v86d (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: @@ -4991,9 +4989,8 @@ (define-public mkfontdir (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 @@ -6430,7 +6427,8 @@ (define (append-to-file name body) ;; 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.*: \"\",") -- cgit v1.2.3