mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-06 16:57:03 +00:00
firefox: fix build failure when package is null
Native messaging hosts module assumed all hosts are packages, and we were passing null before. The patch also adds a test case for a null firefox package to avoid regressions in the future for this common (on Darwin at least) scenario. Note: Thunderbird doesn't need a similar change because it doesn't allow a null package. Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
This commit is contained in:
parent
fad54a641a
commit
1a78a4c7fe
3 changed files with 14 additions and 3 deletions
|
@ -847,9 +847,9 @@ in {
|
|||
|
||||
home.packages = lib.optional (cfg.finalPackage != null) cfg.finalPackage;
|
||||
|
||||
mozilla.firefoxNativeMessagingHosts = [
|
||||
cfg.finalPackage # package configured native messaging hosts (entire browser actually)
|
||||
] ++ cfg.nativeMessagingHosts; # user configured native messaging hosts
|
||||
mozilla.firefoxNativeMessagingHosts = cfg.nativeMessagingHosts
|
||||
# package configured native messaging hosts (entire browser actually)
|
||||
++ (lib.optional (cfg.finalPackage != null) cfg.finalPackage);
|
||||
|
||||
home.file = mkMerge ([{
|
||||
"${cfg.configPath}/profiles.ini" =
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
name:
|
||||
builtins.mapAttrs (test: module: import module [ "programs" name ]) {
|
||||
"${name}-deprecated-native-messenger" = ./deprecated-native-messenger.nix;
|
||||
"${name}-null-package" = ./null-package.nix;
|
||||
"${name}-final-package" = ./final-package.nix;
|
||||
"${name}-policies" = ./policies.nix;
|
||||
"${name}-profiles-bookmarks" = ./profiles/bookmarks;
|
||||
|
|
10
tests/modules/programs/firefox/null-package.nix
Normal file
10
tests/modules/programs/firefox/null-package.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
modulePath:
|
||||
{ config, lib, ... }:
|
||||
|
||||
lib.mkIf config.test.enableBig (lib.setAttrByPath modulePath { enable = true; }
|
||||
// {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = null;
|
||||
};
|
||||
})
|
Loading…
Add table
Reference in a new issue