Unverified Commit 08ee43aa authored by Grimmauld's avatar Grimmauld
Browse files

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.
parent e22f5169
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 (