From 6bc94758ba959fd2c8f44075905de31e1180bb98 Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Sat, 17 May 2025 22:05:01 +0200 Subject: [PATCH] gnu: fwupd: Install fwupd-efi into fwupd's prefix. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This way, fwupd finds the EFI executable that it needs when updating firmware. * gnu/packages/firmware.scm (fwupd) [arguments] : Add 'install-fwupd.efi phase. Change-Id: If015408c30b7b6dccbf94d5ff691535393c182f4 Signed-off-by: Ludovic Courtès --- gnu/packages/firmware.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index 5bcbaac98d..8b751e21ee 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -317,7 +317,17 @@ used in the process of installing and updating firmware.") (substitute* (find-files (string-append #$output "/etc") "\\.conf$") (("Enabled=true") - "Enabled=false"))))))) + "Enabled=false")))) + (add-after 'glib-or-gtk-wrap 'install-fwupd.efi + ;; fwupd looks for its .efi file within its own prefix, so link + ;; the directory containing the arch-specific executable here. + ;; If we install a symlink to the efi directory before + ;; 'glib-or-gtk-wrap, then the wrapping procedure mistakes the + ;; directory symlink for an executable and tries to wrap it. + (lambda _ + (symlink (string-append #$(this-package-input "fwupd-efi") + "/libexec/fwupd/efi") + (string-append #$output "/libexec/fwupd/efi"))))))) (native-inputs (list gobject-introspection python-pygobject python-pillow @@ -345,6 +355,7 @@ used in the process of installing and updating firmware.") efivar pango protobuf-c + fwupd-efi mingw-w64-tools gnu-efi) (if (supported-package? libsmbios