keepassxc: add firefox native messaging host file

When using a Firefox fork, upstream package relies on you entering the
browser user config path manually and writes the native messaging host
file to that path. It should be much more convenient to manage it in
Nix.

chayleaf 190ea7b0 58d98b07

+17
+6
pkgs/applications/misc/keepassxc/default.nix
··· 97 wrapQtApp "$out/Applications/KeePassXC.app/Contents/MacOS/KeePassXC" 98 ''; 99 100 buildInputs = [ 101 curl 102 botan2
··· 97 wrapQtApp "$out/Applications/KeePassXC.app/Contents/MacOS/KeePassXC" 98 ''; 99 100 + # See https://github.com/keepassxreboot/keepassxc/blob/cd7a53abbbb81e468efb33eb56eefc12739969b8/src/browser/NativeMessageInstaller.cpp#L317 101 + postInstall = lib.optionalString withKeePassBrowser '' 102 + mkdir -p "$out/lib/mozilla/native-messaging-hosts" 103 + substituteAll "${./firefox-native-messaging-host.json}" "$out/lib/mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json" 104 + ''; 105 + 106 buildInputs = [ 107 curl 108 botan2
+9
pkgs/applications/misc/keepassxc/firefox-native-messaging-host.json
···
··· 1 + { 2 + "name": "org.keepassxc.keepassxc_browser", 3 + "description": "KeePassXC integration with native messaging support", 4 + "path": "@out@/bin/keepassxc-proxy", 5 + "type": "stdio", 6 + "allowed_extensions": [ 7 + "keepassxc-browser@keepassxc.org" 8 + ] 9 + }
+2
pkgs/applications/networking/browsers/firefox/wrapper.nix
··· 8 , browserpass, gnome-browser-connector, uget-integrator, plasma5Packages, bukubrow, pipewire 9 , tridactyl-native 10 , fx-cast-bridge 11 , udev 12 , libkrb5 13 , libva ··· 70 ++ lib.optional (cfg.enableUgetIntegrator or false) uget-integrator 71 ++ lib.optional (cfg.enablePlasmaBrowserIntegration or false) plasma5Packages.plasma-browser-integration 72 ++ lib.optional (cfg.enableFXCastBridge or false) fx-cast-bridge 73 ++ extraNativeMessagingHosts 74 ; 75 libs = lib.optionals stdenv.isLinux [ udev libva mesa libnotify xorg.libXScrnSaver cups pciutils ]
··· 8 , browserpass, gnome-browser-connector, uget-integrator, plasma5Packages, bukubrow, pipewire 9 , tridactyl-native 10 , fx-cast-bridge 11 + , keepassxc 12 , udev 13 , libkrb5 14 , libva ··· 71 ++ lib.optional (cfg.enableUgetIntegrator or false) uget-integrator 72 ++ lib.optional (cfg.enablePlasmaBrowserIntegration or false) plasma5Packages.plasma-browser-integration 73 ++ lib.optional (cfg.enableFXCastBridge or false) fx-cast-bridge 74 + ++ lib.optional (cfg.enableKeePassXC or false) keepassxc 75 ++ extraNativeMessagingHosts 76 ; 77 libs = lib.optionals stdenv.isLinux [ udev libva mesa libnotify xorg.libXScrnSaver cups pciutils ]