summary refs log tree commit diff
path: root/pkgs/os-specific/linux/firmware/fwupd
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2018-08-29 11:35:00 +0200
committerxeji <36407913+xeji@users.noreply.github.com>2018-08-29 11:35:00 +0200
commitb0d4c25c1c66ec4b0394bae3ea4890e02cb00402 (patch)
tree69776a8afdef777cc264187fed231bbdb0ae4389 /pkgs/os-specific/linux/firmware/fwupd
parente9f0afe7616a961e43d764a29a58860043583472 (diff)
downloadnixpkgs-b0d4c25c1c66ec4b0394bae3ea4890e02cb00402.tar
nixpkgs-b0d4c25c1c66ec4b0394bae3ea4890e02cb00402.tar.gz
nixpkgs-b0d4c25c1c66ec4b0394bae3ea4890e02cb00402.tar.bz2
nixpkgs-b0d4c25c1c66ec4b0394bae3ea4890e02cb00402.tar.lz
nixpkgs-b0d4c25c1c66ec4b0394bae3ea4890e02cb00402.tar.xz
nixpkgs-b0d4c25c1c66ec4b0394bae3ea4890e02cb00402.tar.zst
nixpkgs-b0d4c25c1c66ec4b0394bae3ea4890e02cb00402.zip
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
Diffstat (limited to 'pkgs/os-specific/linux/firmware/fwupd')
-rw-r--r--pkgs/os-specific/linux/firmware/fwupd/default.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/firmware/fwupd/default.nix b/pkgs/os-specific/linux/firmware/fwupd/default.nix
index f018b5c2a7d..e29dd2e6ee5 100644
--- a/pkgs/os-specific/linux/firmware/fwupd/default.nix
+++ b/pkgs/os-specific/linux/firmware/fwupd/default.nix
@@ -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 = [