From 08ee43aabbb51dcda5bfc9ebe921384acdb38165 Mon Sep 17 00:00:00 2001 From: Grimmauld Date: Fri, 2 Jan 2026 14:53:31 +0100 Subject: [PATCH] firefox: make nativeMessagingHosts unique In case of duplicated messaging hosts, path collisions make the firefox drv fail to build. Repro: ```nix pkgs.firefox.override { nativeMessagingHosts = [ pkgs.passff-host pkgs.passff-host ]; } ``` This may happen e.g. if `programs.firefox.nativeMessagingHosts.packages` is set in multiple locations with duplicated messaging hosts. Calling `lib.unique` resolves the issue if an identical messaging host is duplicated, but does correctly throw if multiple different native messaging host packages try to provide the same native messaging host interface. --- pkgs/applications/networking/browsers/firefox/wrapper.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index 72bdbf5398e0..59652d36bad0 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -89,7 +89,7 @@ let # PCSC-Lite daemon (services.pcscd) also must be enabled for firefox to access smartcards smartcardSupport = cfg.smartcardSupport or false; - allNativeMessagingHosts = map lib.getBin nativeMessagingHosts; + allNativeMessagingHosts = map lib.getBin (lib.unique nativeMessagingHosts); libs = lib.optionals stdenv.hostPlatform.isLinux (