summary refs log tree commit diff
path: root/gnu/packages/bootloaders.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-07-16 17:20:09 +0200
committerLudovic Courtès <ludo@gnu.org>2021-07-24 16:23:24 +0200
commitd468a03a00738bb0742148e056f7a557aae08f2f (patch)
tree6f2012c47d4aad57565fb31a1da8b180c699b125 /gnu/packages/bootloaders.scm
parent828cfdc47e567d75b4629a7af7afed3a20adcf5a (diff)
downloadguix-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.
Diffstat (limited to 'gnu/packages/bootloaders.scm')
-rw-r--r--gnu/packages/bootloaders.scm29
1 files changed, 11 insertions, 18 deletions
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)))))