diff options
author | Ludovic Courtès <ludo@gnu.org> | 2021-07-16 17:20:09 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-07-24 16:23:24 +0200 |
commit | d468a03a00738bb0742148e056f7a557aae08f2f (patch) | |
tree | 6f2012c47d4aad57565fb31a1da8b180c699b125 | |
parent | 828cfdc47e567d75b4629a7af7afed3a20adcf5a (diff) | |
download | guix-d468a03a00738bb0742148e056f7a557aae08f2f.tar.gz |
gnu: Use 'search-input-directory' and 'search-input-file' where appropriate.
This changes some of the remaining uses of this idiom: (string-append (assoc-ref inputs "LABEL") "FILE") to one of: (search-input-file inputs "FILE") (search-input-directory inputs "FILE") * gnu/packages/axoloti.scm (axoloti-patcher): Use 'search-input-directory'. (axoloti-patcher-next): Likewise. * gnu/packages/bioinformatics.scm (java-picard): Likewise. * gnu/packages/bootloaders.scm (grub-hybrid): Likewise. (u-boot-puma-rk3399): Likewise. (u-boot-rock64-rk3328): Likewise. (u-boot-firefly-rk3399): Likewise. (u-boot-rockpro64-rk3399): Likewise. (u-boot-pinebook-pro-rk3399): Likewise. * gnu/packages/cran.scm (r-shiny): Likewise. (r-shinytree): Likewise. * gnu/packages/education.scm (anki): Likewise. * gnu/packages/emacs-xyz.scm (emacs-flycheck-grammalecte): Likewise. (emacs-rime): Likewise. * gnu/packages/emulators.scm (dolphin-emu): Likewise. * gnu/packages/games.scm (bsd-games): Likewise. (seahorse-adventures): Likewise. (einstein): Likewise. * gnu/packages/gimp.scm (gimp-fourier): Likewise. * gnu/packages/gnome.scm (gspell): Likewise. * gnu/packages/guile-xyz.scm (guile-libyaml): Likewise. * gnu/packages/java.scm (icedtea-7): Likewise. * gnu/packages/language.scm (nimf): Likewise. * gnu/packages/lxde.scm (spacefm): Likewise. * gnu/packages/mail.scm (claws-mail): Likewise. * gnu/packages/netpbm.scm (netpbm): Likewise. * gnu/packages/networking.scm (blueman): Likewise. * gnu/packages/scheme.scm (scm): Likewise. * gnu/packages/security-token.scm (python-fido2): Likewise. * gnu/packages/syndication.scm (rtv): Likewise. * gnu/packages/tls.scm (acme-client): Likewise. * gnu/packages/web.scm (netsurf): Likewise. * gnu/packages/wine.scm (wine-staging): Likewise. * gnu/packages/wxwidgets.scm (wxwidgets): Likewise.
-rw-r--r-- | gnu/packages/axoloti.scm | 8 | ||||
-rw-r--r-- | gnu/packages/bioinformatics.scm | 5 | ||||
-rw-r--r-- | gnu/packages/bootloaders.scm | 29 | ||||
-rw-r--r-- | gnu/packages/cran.scm | 20 | ||||
-rw-r--r-- | gnu/packages/education.scm | 4 | ||||
-rw-r--r-- | gnu/packages/emacs-xyz.scm | 15 | ||||
-rw-r--r-- | gnu/packages/emulators.scm | 4 | ||||
-rw-r--r-- | gnu/packages/games.scm | 13 | ||||
-rw-r--r-- | gnu/packages/gimp.scm | 6 | ||||
-rw-r--r-- | gnu/packages/gnome.scm | 4 | ||||
-rw-r--r-- | gnu/packages/guile-xyz.scm | 4 | ||||
-rw-r--r-- | gnu/packages/java.scm | 4 | ||||
-rw-r--r-- | gnu/packages/language.scm | 3 | ||||
-rw-r--r-- | gnu/packages/llvm.scm | 2 | ||||
-rw-r--r-- | gnu/packages/lxde.scm | 5 | ||||
-rw-r--r-- | gnu/packages/mail.scm | 6 | ||||
-rw-r--r-- | gnu/packages/netpbm.scm | 5 | ||||
-rw-r--r-- | gnu/packages/networking.scm | 4 | ||||
-rw-r--r-- | gnu/packages/python.scm | 2 | ||||
-rw-r--r-- | gnu/packages/scheme.scm | 8 | ||||
-rw-r--r-- | gnu/packages/security-token.scm | 11 | ||||
-rw-r--r-- | gnu/packages/syndication.scm | 5 | ||||
-rw-r--r-- | gnu/packages/tls.scm | 3 | ||||
-rw-r--r-- | gnu/packages/web.scm | 4 | ||||
-rw-r--r-- | gnu/packages/wine.scm | 4 | ||||
-rw-r--r-- | gnu/packages/wxwidgets.scm | 3 |
26 files changed, 81 insertions, 100 deletions
diff --git a/gnu/packages/axoloti.scm b/gnu/packages/axoloti.scm index c6dd748773..411ebbc610 100644 --- a/gnu/packages/axoloti.scm +++ b/gnu/packages/axoloti.scm @@ -318,8 +318,8 @@ runtime.") (lambda () (let* ((dir (string-append (assoc-ref outputs "out") "/share/axoloti")) - (runtime (string-append (assoc-ref inputs "axoloti-runtime") - "/share/axoloti")) + (runtime (search-input-directory inputs + "share/axoloti")) (toolchain (assoc-ref inputs "cross-toolchain")) (includes (string-append toolchain @@ -530,8 +530,8 @@ patcher application."))) ;; Install old firmware (let ((target (string-append share "/old_firmware/firmware-1.0.12")) (old-firmware - (string-append (assoc-ref inputs "axoloti-runtime") - "/share/axoloti/firmware/"))) + (search-input-directory inputs + "share/axoloti/firmware"))) (mkdir-p target) (install-file (string-append old-firmware "flasher/flasher_build/flasher.bin") diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 1719cf86ae..002b417b54 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -4222,9 +4222,8 @@ manipulating HTS data.") (lambda* (#:key inputs #:allow-other-keys) (substitute* "build.xml" (("\\$\\{htsjdk\\}/lib") - (string-append (assoc-ref inputs "java-htsjdk") - "/share/java/htsjdk/"))) - #t)) + (search-input-directory inputs + "share/java/htsjdk"))))) (add-after 'unpack 'make-test-target-independent (lambda* (#:key inputs #:allow-other-keys) (substitute* "build.xml" diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 61f0c14d9c..b4bf72224a 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -351,8 +351,8 @@ menu to select one of the installed operating systems.") `(modify-phases ,phases (add-after 'install 'install-non-efi (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((input-dir (string-append (assoc-ref inputs "grub") - "/lib/grub")) + (let ((input-dir (search-input-directory inputs + "/lib/grub")) (output-dir (string-append (assoc-ref outputs "out") "/lib/grub"))) (for-each @@ -852,9 +852,8 @@ to Novena upstream, does not load u-boot.img from the first partition.") `(modify-phases ,phases (add-after 'unpack 'set-environment (lambda* (#:key inputs #:allow-other-keys) - (setenv "BL31" (string-append (assoc-ref inputs "firmware") - "/bl31.elf")) - #t)) + (setenv "BL31" + (search-input-file inputs "/bl31.elf")))) ;; Phases do not succeed on the bl31 ELF. (delete 'strip) (delete 'validate-runpath))))) @@ -894,10 +893,8 @@ to Novena upstream, does not load u-boot.img from the first partition.") `(modify-phases ,phases (add-after 'unpack 'set-environment (lambda* (#:key inputs #:allow-other-keys) - (let ((bl31 (string-append (assoc-ref inputs "firmware") - "/bl31.elf"))) - (setenv "BL31" bl31)) - #t)))))) + (let ((bl31 (search-input-file inputs "/bl31.elf"))) + (setenv "BL31" bl31)))))))) (native-inputs `(("firmware" ,arm-trusted-firmware-rk3328) ,@(package-native-inputs base)))))) @@ -912,9 +909,7 @@ to Novena upstream, does not load u-boot.img from the first partition.") `(modify-phases ,phases (add-after 'unpack 'set-environment (lambda* (#:key inputs #:allow-other-keys) - (setenv "BL31" (string-append (assoc-ref inputs "firmware") - "/bl31.elf")) - #t)) + (setenv "BL31" (search-input-file inputs "/bl31.elf")))) ;; Phases do not succeed on the bl31 ELF. (delete 'strip) (delete 'validate-runpath))))) @@ -932,9 +927,8 @@ to Novena upstream, does not load u-boot.img from the first partition.") `(modify-phases ,phases (add-after 'patch-rockpro64-config 'set-environment (lambda* (#:key inputs #:allow-other-keys) - (setenv "BL31" (string-append (assoc-ref inputs "firmware") - "/bl31.elf")) - #t)) + (setenv "BL31" + (search-input-file inputs "/bl31.elf")))) ;; Phases do not succeed on the bl31 ELF. (delete 'strip) (delete 'validate-runpath))))) @@ -954,9 +948,8 @@ to Novena upstream, does not load u-boot.img from the first partition.") `(modify-phases ,phases (add-after 'unpack 'set-environment (lambda* (#:key inputs #:allow-other-keys) - (setenv "BL31" (string-append (assoc-ref inputs "firmware") - "/bl31.elf")) - #t)) + (setenv "BL31" + (search-input-file inputs "/bl31.elf")))) ;; Phases do not succeed on the bl31 ELF. (delete 'strip) (delete 'validate-runpath))))) diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm index b4728ac60c..fcdbf58d65 100644 --- a/gnu/packages/cran.scm +++ b/gnu/packages/cran.scm @@ -1986,17 +1986,17 @@ previewing themes in real time.") ;; replace them. (with-directory-excursion "inst/www/shared" (replace-file "strftime/strftime-min.js" - (string-append (assoc-ref inputs "js-strftime") - "/share/javascript/strftime.min.js")) + (search-input-file inputs + "/share/javascript/strftime.min.js")) (replace-file "highlight/highlight.pack.js" - (string-append (assoc-ref inputs "js-highlight") - "/share/javascript/highlight.min.js")) + (search-input-file inputs + "/share/javascript/highlight.min.js")) (replace-file "datatables/js/jquery.dataTables.min.js" - (string-append (assoc-ref inputs "js-datatables") - "/share/javascript/jquery.dataTables.min.js")) + (search-input-file inputs + "/share/javascript/jquery.dataTables.min.js")) (replace-file "selectize/js/selectize.min.js" - (string-append (assoc-ref inputs "js-selectize") - "/share/javascript/selectize.min.js")) + (search-input-file inputs + "/share/javascript/selectize.min.js")) (for-each (match-lambda ((source . target) (minify source #:target target))) @@ -2100,8 +2100,8 @@ responsive, and powerful applications with minimal effort.") (add-after 'unpack 'replace-minified-javascript (lambda* (#:key inputs #:allow-other-keys) (with-directory-excursion "inst/www/jsTree-3.3.7/" - (symlink (string-append (assoc-ref inputs "js-requirejs") - "/share/javascript/require.min.js") + (symlink (search-input-file inputs + "/share/javascript/require.min.js") "libs/require.js") (call-with-values (lambda () diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm index d21c8ea7da..4fee50e5ff 100644 --- a/gnu/packages/education.scm +++ b/gnu/packages/education.scm @@ -867,8 +867,8 @@ stored and user can review his performance in any time.") (string-prefix? "python-" label))) inputs))) (qtwebengineprocess - (string-append (assoc-ref inputs "qtwebengine") - "/lib/qt5/libexec/QtWebEngineProcess"))) + (search-input-file inputs + "lib/qt5/libexec/QtWebEngineProcess"))) ;; The program fails to find the QtWebEngineProcess program, so ;; we set QTWEBENGINEPROCESS_PATH to help it. PYTHONPATH is ;; wrapped to avoid declaring Python libraries as propagated diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 973d944a9c..e92bf6bd4b 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -5512,11 +5512,11 @@ for Flow files.") (make-file-writable "flycheck-grammalecte.el") (emacs-substitute-variables "flycheck-grammalecte.el" ("flycheck-grammalecte-grammalecte-directory" - (string-append (assoc-ref inputs "grammalecte") - "/lib/python" - ,(version-major+minor (package-version python)) - "/site-packages/grammalecte"))) - #t)) + (search-input-directory + inputs + (string-append "lib/python" + ,(version-major+minor (package-version python)) + "/site-packages/grammalecte")))))) (add-after 'unpack 'do-not-phone-home ;; The package wants to check upstream Grammalecte version to ;; decide if an update is in order. Always return version @@ -26613,9 +26613,8 @@ REPL appropriate to the current major mode.") (make-file-writable "rime.el") (emacs-substitute-variables "rime.el" ("rime-share-data-dir" - (string-append (assoc-ref inputs "rime-data") - "/share/rime-data"))) - #t)) + (search-input-directory inputs + "share/rime-data"))))) (add-before 'install 'build-emacs-module (lambda _ (invoke "make" "lib")))))) diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm index 2394342d26..dcda07d4a4 100644 --- a/gnu/packages/emulators.scm +++ b/gnu/packages/emulators.scm @@ -283,8 +283,8 @@ console.") (add-before 'configure 'generate-fonts&hardcore-libvulkan-path (lambda* (#:key inputs outputs #:allow-other-keys) (let ((fontfile - (string-append (assoc-ref inputs "font-wqy-microhei") - "/share/fonts/truetype/wqy-microhei.ttc")) + (search-input-file inputs + "/share/fonts/truetype/wqy-microhei.ttc")) (libvulkan (search-input-file inputs "/lib/libvulkan.so"))) (chdir "docs") diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 38b5782547..2c8b3c083f 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Eric Bavier <bavier@posteo.net> ;;; Copyright © 2014 Cyrill Schenkel <cyrill.schenkel@gmail.com> ;;; Copyright © 2014 Sylvain Beucler <beuc@beuc.net> -;;; Copyright © 2014, 2015, 2018, 2019 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2014, 2015, 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014, 2015, 2016 Sou Bunnbu <iyzsong@gmail.com> ;;; Copyright © 2014, 2015, 2019 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2015, 2016 Andreas Enge <andreas@enge.fr> @@ -678,8 +678,7 @@ possible, while battling many vicious aliens.") (bin (string-append out "/bin")) (doc (string-append out "/share/doc/bsd-games-" ,version)) (man (string-append out "/share/man")) - (word-list (string-append (assoc-ref inputs "miscfiles") - "/share/web2")) + (word-list (search-input-file inputs "/share/web2")) (static-data (string-append out "/share/games/bsd-games")) ;; Not a "./" because of substitute* in 'patch-install ;; below. The .// allow us not to mess with the games' @@ -2346,8 +2345,8 @@ can be explored and changed freely.") (lambda* (#:key outputs inputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (data (string-append out "/share/seahorse-adventures")) - (vera (string-append (assoc-ref inputs "font-bitstream-vera") - "/share/fonts/truetype/Vera.ttf"))) + (vera (search-input-file + inputs "/share/fonts/truetype/Vera.ttf"))) (let ((themes-dir (string-append data "/data/themes/"))) (for-each (lambda (theme) @@ -4772,8 +4771,8 @@ players.") (replace 'configure (lambda* (#:key outputs inputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) - (dejavu (string-append (assoc-ref inputs "font-dejavu") - "/share/fonts/truetype/DejaVuSans.ttf"))) + (dejavu (search-input-file + inputs "/share/fonts/truetype/DejaVuSans.ttf"))) (substitute* "Makefile" (("PREFIX=/usr/local") (string-append "PREFIX=" out))) ;; The patch above registers a free font for use by the binary, diff --git a/gnu/packages/gimp.scm b/gnu/packages/gimp.scm index a0490e5421..81c56946ad 100644 --- a/gnu/packages/gimp.scm +++ b/gnu/packages/gimp.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2014, 2015, 2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2016, 2018 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2016, 2017, 2018, 2020 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> @@ -367,8 +367,8 @@ that is extensible via a plugin system.") (replace 'configure (lambda* (#:key inputs #:allow-other-keys) (mkdir-p "tmppkgconfig") - (copy-file (string-append (assoc-ref inputs "gegl") - "/lib/pkgconfig/gegl-0.4.pc") + (copy-file (search-input-file inputs + "/lib/pkgconfig/gegl-0.4.pc") "tmppkgconfig/gegl-0.3.pc") (setenv "PKG_CONFIG_PATH" (string-append "tmppkgconfig:" diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 24c5adc44a..de5ec66ccc 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -10196,9 +10196,7 @@ that support the Assistive Technology Service Provider Interface (AT-SPI).") ;; Allow Enchant and its Aspell backend to find the en_US ;; dictionary. (setenv "ASPELL_DICT_DIR" - (string-append (assoc-ref inputs "aspell-dict-en") - "/lib/aspell")) - #t))))) + (search-input-directory inputs "/lib/aspell"))))))) (inputs `(("gtk+" ,gtk+) ("glib" ,glib) diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index 78f77d2547..7e4d6251c1 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -4671,8 +4671,8 @@ schedulers.") "yaml/libyaml.scm" ;; This file is mismatched with the generated FFI code. "yaml/ffi-help-rt.scm")) - (copy-file (string-append (assoc-ref inputs "nyacc") - "/share/guile/site/3.0/system/ffi-help-rt.scm") + (copy-file (search-input-file + inputs "/share/guile/site/3.0/system/ffi-help-rt.scm") "yaml/ffi-help-rt.scm") (substitute* "yaml/ffi-help-rt.scm" (("system ffi-help-rt") "yaml ffi-help-rt")) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index f4a426e559..6c7e5f9b15 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1569,8 +1569,8 @@ bootstrapping purposes.") (add-after 'install 'install-keystore (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((keystore "cacerts") - (certs-dir (string-append (assoc-ref inputs "nss-certs") - "/etc/ssl/certs")) + (certs-dir (search-input-directory inputs + "etc/ssl/certs")) (keytool (string-append (assoc-ref outputs "jdk") "/bin/keytool"))) (define (extract-cert file target) diff --git a/gnu/packages/language.scm b/gnu/packages/language.scm index 1aa2d5971e..561c399eeb 100644 --- a/gnu/packages/language.scm +++ b/gnu/packages/language.scm @@ -130,8 +130,7 @@ (lambda* (#:key inputs outputs #:allow-other-keys) (substitute* "configure.ac" (("/usr/share/anthy/anthy.dic") - (string-append (assoc-ref inputs "anthy") - "/share/anthy/anthy.dic"))) + (search-input-file inputs "/share/anthy/anthy.dic"))) (substitute* "configure.ac" (("/usr/bin:\\$GTK3_LIBDIR/libgtk-3-0") (string-append (assoc-ref inputs "gtk+:bin") diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index f39a3ad49d..4107117c76 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2016, 2018 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> -;;; Copyright © 2015, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2015, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2016 Dennis Mungai <dmngaie@gmail.com> ;;; Copyright © 2016, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2017 Roel Janssen <roel@gnu.org> diff --git a/gnu/packages/lxde.scm b/gnu/packages/lxde.scm index bf32bc0994..7f483cfe1f 100644 --- a/gnu/packages/lxde.scm +++ b/gnu/packages/lxde.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2017 Brendan Tildesley <mail@brendan.scot> ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018 ison <ison@airmail.cc> -;;; Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2019 Meiyo Peng <meiyo@riseup.net> ;;; @@ -370,8 +370,7 @@ with freedesktop.org standard.") #t))) (add-after 'patch-share-dirs 'patch-mime-dirs (lambda* (#:key inputs #:allow-other-keys) - (let* ((mime (string-append (assoc-ref inputs "shared-mime-info") - "/share/mime"))) + (let* ((mime (search-input-directory inputs "/share/mime"))) (with-directory-excursion "src" (substitute* '("mime-type/mime-type.c" "ptk/ptk-file-menu.c") (("/usr(/local)?/share/mime") mime))) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 496c0d6200..bdfc432880 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014, 2015, 2017, 2020 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net> ;;; Copyright © 2014 Sou Bunnbu <iyzsong@gmail.com> @@ -1632,8 +1632,8 @@ compresses it.") (lambda* (#:key inputs #:allow-other-keys) (substitute* "src/procmime.c" (("/usr/share/mime/globs") - (string-append (assoc-ref inputs "shared-mime-info") - "/share/mime/globs")))))))) + (search-input-directory inputs + "/share/mime/globs")))))))) (native-inputs `(("bison" ,bison) ;;("docbook-utils" ,docbook-utils) diff --git a/gnu/packages/netpbm.scm b/gnu/packages/netpbm.scm index 11fe135a17..5f3dcdb8ea 100644 --- a/gnu/packages/netpbm.scm +++ b/gnu/packages/netpbm.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr> -;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2015, 2016, 2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> ;;; ;;; This file is part of GNU Guix. @@ -132,8 +132,7 @@ (display (string-append "LDFLAGS += -Wl,-rpath=" %output "/lib") f) (close-port f)) - (let ((rgb (string-append (assoc-ref inputs "xorg-rgb") - "/share/X11/rgb.txt"))) + (let ((rgb (search-input-file inputs "/share/X11/rgb.txt"))) (substitute* "config.mk" (("/usr/share/netpbm/rgb.txt") rgb)) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index 64cbec4c08..71f8388efc 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -655,8 +655,8 @@ systems with no further dependencies.") (substitute* '("blueman/main/NetConf.py" "blueman/main/PPPConnection.py") (("/usr/sbin/bluetoothd") - (string-append (assoc-ref inputs "bluez") - "/libexec/bluetooth/bluetoothd")) + (search-input-directory inputs + "/libexec/bluetooth/bluetoothd")) (("/sbin/iptables") (search-input-file inputs "/sbin/iptables")) (("/usr/sbin/pppd") diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index aa6b29df26..9e637a03d0 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2014, 2017, 2019 Eric Bavier <bavier@member.fsf.org> diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm index f04aeb86a4..3a87dad69f 100644 --- a/gnu/packages/scheme.scm +++ b/gnu/packages/scheme.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016, 2018, 2020 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015, 2016, 2018, 2020, 2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> ;;; Copyright © 2015, 2016 Federico Beffa <beffa@fbengineering.ch> ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net> @@ -621,8 +621,7 @@ utility functions for all standard Scheme implementations.") (replace 'build (lambda* (#:key inputs outputs #:allow-other-keys) (setenv "SCHEME_LIBRARY_PATH" - (string-append (assoc-ref inputs "slib") - "/lib/slib/")) + (search-input-directory inputs "lib/slib")) (invoke "make" "scmlit" "CC=gcc") (invoke "make" "all"))) (add-after 'install 'post-install @@ -632,8 +631,7 @@ utility functions for all standard Scheme implementations.") (delete-file req) (format (open req (logior O_WRONLY O_CREAT)) "(define (library-vicinity) ~s)\n" - (string-append (assoc-ref inputs "slib") - "/lib/slib/")) + (search-input-directory inputs "lib/slib")) ;; We must generate the slibcat file. (invoke (string-append out "/bin/scm") diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm index 1d2493dbd5..f722c27cd7 100644 --- a/gnu/packages/security-token.scm +++ b/gnu/packages/security-token.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2014, 2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016 Mike Gerwitz <mtg@gnu.org> ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com> @@ -614,10 +614,11 @@ your existing infrastructure.") (add-after 'unpack 'install-public-suffix-list (lambda* (#:key inputs #:allow-other-keys) (copy-file - (string-append (assoc-ref inputs "public-suffix-list") - "/share/public-suffix-list-" - ,(package-version public-suffix-list) - "/public_suffix_list.dat") + (search-input-file inputs + (string-append + "/share/public-suffix-list-" + ,(package-version public-suffix-list) + "/public_suffix_list.dat")) "fido2/public_suffix_list.dat") #t))))) (propagated-inputs diff --git a/gnu/packages/syndication.scm b/gnu/packages/syndication.scm index 58db738130..a55f1180f7 100644 --- a/gnu/packages/syndication.scm +++ b/gnu/packages/syndication.scm @@ -434,9 +434,8 @@ a simple interface that makes it easy to organize and browse feeds.") (lambda* (#:key inputs #:allow-other-keys) (setenv "HOME" (getcwd)) (setenv "TERM" "linux") - (setenv "TERMINFO" (string-append (assoc-ref inputs "ncurses") - "/share/terminfo")) - #t))) + (setenv "TERMINFO" + (search-input-directory inputs "share/terminfo"))))) #:tests? #f)) ; tests fail: _curses.error: nocbreak() returned ERR (propagated-inputs `(("python-beautifulsoup4" ,python-beautifulsoup4) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 58876a408f..eca20964ed 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -867,8 +867,7 @@ number generator") (modify-phases %standard-phases (add-after 'unpack 'patch-paths (lambda* (#:key inputs #:allow-other-keys) - (let ((pem (string-append (assoc-ref inputs "libressl") - "/etc/ssl/cert.pem"))) + (let ((pem (search-input-file inputs "/etc/ssl/cert.pem"))) (substitute* "http.c" (("/etc/ssl/cert.pem") pem)) #t))) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index aac6a407ee..ea3c5e9114 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2013 Aljosha Papsch <misc@rpapsch.de> -;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2018 Raoul Jean Pierre Bonnal <ilpuccio.febo@gmail.com> @@ -5725,7 +5725,7 @@ w3c webidl files and a binding configuration file.") (lambda* (#:key inputs #:allow-other-keys) (substitute* '("test/bloom.c" "test/hashtable.c") (("/usr/share/dict/words") - (string-append (assoc-ref inputs "miscfiles") "/share/web2"))) + (search-input-file inputs "/share/web2"))) #t)) (add-after 'install 'install-more (lambda* (#:key outputs #:allow-other-keys) diff --git a/gnu/packages/wine.scm b/gnu/packages/wine.scm index 5c6d02eec5..d05b5c1b8c 100644 --- a/gnu/packages/wine.scm +++ b/gnu/packages/wine.scm @@ -417,10 +417,10 @@ integrate Windows applications into your desktop.") (let* ((out (assoc-ref outputs "out")) (icd (string-append out "/share/vulkan/icd.d"))) (mkdir-p icd) - (copy-file (string-append (assoc-ref inputs "mesa") + (copy-file (search-input-file inputs "/share/vulkan/icd.d/radeon_icd.i686.json") (string-append icd "/radeon_icd.i686.json")) - (copy-file (string-append (assoc-ref inputs "mesa") + (copy-file (search-input-file inputs "/share/vulkan/icd.d/intel_icd.i686.json") (string-append icd "/intel_icd.i686.json")) (wrap-program (string-append out "/bin/wine-preloader") diff --git a/gnu/packages/wxwidgets.scm b/gnu/packages/wxwidgets.scm index 15a995462a..475b5efe15 100644 --- a/gnu/packages/wxwidgets.scm +++ b/gnu/packages/wxwidgets.scm @@ -100,8 +100,7 @@ (modify-phases %standard-phases (add-after 'unpack 'refer-to-inputs (lambda* (#:key inputs #:allow-other-keys) - (let* ((mime (string-append (assoc-ref inputs "shared-mime-info") - "/share/mime"))) + (let* ((mime (search-input-directory inputs "/share/mime"))) (substitute* "src/unix/utilsx11.cpp" (("wxExecute\\(xdg_open \\+") (string-append "wxExecute(\"" (which "xdg-open") "\""))) |