Subject: [PATCH 4/9] gnu: u-boot-pinebook-pro-rk3399: Remove input labels and use gexps.

From: Maxim Cournoyer <[email-masked]>
Date: Tue, 20 Dec 2022 13:34:22 -0500

* gnu/packages/bootloaders.scm (u-boot-pinebook-pro-rk3399)
[arguments]: Use gexps.
[phases] {set-environment}: Look also in native-inputs (for
cross-compilation).
[native-inputs]: Remove input labels and use modify-inputs.
---

 gnu/packages/bootloaders.scm | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 6893d12745..7e78b9af41 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -1145,17 +1145,18 @@ (define-public u-boot-pinebook-pro-rk3399
       (arguments
        (substitute-keyword-arguments (package-arguments base)
          ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'set-environment
-               (lambda* (#:key inputs #:allow-other-keys)
-                 (setenv "BL31"
-                         (search-input-file inputs "/bl31.elf"))))
-             ;; Phases do not succeed on the bl31 ELF.
-             (delete 'strip)
-             (delete 'validate-runpath)))))
+          #~(modify-phases #$phases
+              (add-after 'unpack 'set-environment
+                (lambda* (#:key native-inputs inputs #:allow-other-keys)
+                  (setenv "BL31"
+                          (search-input-file (or native-inputs inputs)
+                                             "bl31.elf"))))
+              ;; Phases do not succeed on the bl31 ELF.
+              (delete 'strip)
+              (delete 'validate-runpath)))))
       (native-inputs
-       `(("firmware" ,arm-trusted-firmware-rk3399)
-         ,@(package-native-inputs base))))))
+       (modify-inputs (package-native-inputs base)
+         (append arm-trusted-firmware-rk3399))))))
 
 (define*-public (make-u-boot-bin-package u-boot-package
                                          #:key
-- 
2.38.1