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
This commit is contained in:
Jan Tojnar 2018-08-29 11:35:00 +02:00 committed by xeji
parent e9f0afe761
commit b0d4c25c1c

View file

@ -79,6 +79,19 @@ in stdenv.mkDerivation {
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 = [