1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-03-10 18:57:22 +00:00
home-manager/tests/modules/programs/thunderbird/thunderbird-native-messaging-host.nix
Ihar Hrachyshka fad54a641a tests: check thunderbird with and without native messaging hosts
Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
2025-02-21 09:28:22 -08:00

25 lines
992 B
Nix

# Confirm that both Firefox and Thunderbird can be configured at the same time.
{ lib, realPkgs, ... }:
lib.recursiveUpdate (import ./thunderbird.nix { inherit lib realPkgs; }) {
programs.thunderbird = {
nativeMessagingHosts = with realPkgs;
[
# NOTE: this is not a real Thunderbird native host module but Firefox; no
# native hosts are currently packaged for nixpkgs or elsewhere, so we
# have to improvise. Packaging wise, Firefox and Thunderbird native hosts
# are identical though. The test doesn't care if the host was meant for
# either as long as the right paths are present in the package.
browserpass
];
};
nmt.script = let
isDarwin = realPkgs.stdenv.hostPlatform.isDarwin;
nativeHostsDir = if isDarwin then
"Library/Mozilla/NativeMessagingHosts"
else
".mozilla/native-messaging-hosts";
in ''
assertFileExists home-files/${nativeHostsDir}/com.github.browserpass.native.json
'';
}