fwupd: do not wrap efi capsule (#45719)

wrapGAppsHook is not able to skip efi capsules so we need to
switch to manual wrapping.

Closes: https://github.com/NixOS/nixpkgs/issues/45715

Changed files
+13
pkgs
os-specific
linux
firmware
fwupd
+13
pkgs/os-specific/linux/firmware/fwupd/default.nix
···
FONTCONFIG_FILE = fontsConf; # Fontconfig error: Cannot load default config file
# /etc/fwupd/uefi.conf is created by the services.hardware.fwupd NixOS module
passthru = {
filesInstalledToEtc = [
···
FONTCONFIG_FILE = fontsConf; # Fontconfig error: Cannot load default config file
+
# TODO: wrapGAppsHook wraps efi capsule even though it is not elf
+
dontWrapGApps = true;
+
# so we need to wrap the executables manually
+
postFixup = ''
+
find -L "$out/bin" "$out/libexec" -type f -executable -print0 \
+
| while IFS= read -r -d ''' file; do
+
if [[ "''${file}" != *.efi ]]; then
+
echo "Wrapping program ''${file}"
+
wrapProgram "''${file}" "''${gappsWrapperArgs[@]}"
+
fi
+
done
+
'';
+
# /etc/fwupd/uefi.conf is created by the services.hardware.fwupd NixOS module
passthru = {
filesInstalledToEtc = [