nix-community / nixvim

Configure Neovim with Nix! [maintainer=@GaetanLepage, @traxys, @mattsturgeon, @khaneliman]
https://nix-community.github.io/nixvim
MIT License
1.68k stars 259 forks source link

[BUG] gitgutter broken #2124

Closed gador closed 1 month ago

gador commented 1 month ago
Field Description
Plugin gitgutter
Nixpkgs 5629520edecb69630a3f4d17d3d33fc96c13f6fe (current master)
Home Manager unstable

Description

(Probably) due to https://github.com/nix-community/nixvim/commit/efb004a61fb0173a2e5625c401ef6738ff2bea55 (from @khaneliman specifically https://github.com/nix-community/nixvim/blob/ee6ee48bbe1ffa88fd4b2af7d68ab0315bc817f0/plugins/git/gitgutter.nix#L196) the following error is observed:

       … while evaluating the option `home-manager.users.gador.programs.nixvim.extraPackages':

       … while calling anonymous lambda

         at /nix/store/bbww7acvbh82z5air318r5iqn2cy1rcb-source/modules/output.nix:40:32:

           39|       description = "Extra packages to be made available to neovim";
           40|       apply = builtins.filter (p: p != null);
             |                                ^
           41|     };

       … while calling anonymous lambda

         at /nix/store/9yqbs6sdhxhcjf7ynmwn3sav65y5v805-source/lib/types.nix:552:14:

          551|       merge = loc: defs:
          552|         map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
             |              ^
          553|           imap1 (m: def':

       error: A definition for option `home-manager.users.gador.programs.nixvim.extraPackages."[definition 9-entry 2]"' is not of type `null or package'. Definition values:
       - In `/nix/store/bbww7acvbh82z5air318r5iqn2cy1rcb-source/plugins/git/gitgutter.nix': [ ]

Minimal, Reproducible Example (MRE)

programs.nixvim = {
    enable = true;
    plugins.gitgutter = {
      enable = true;
    };
};
MattSturgeon commented 1 month ago

Yeah, looks like it should be

extraPackages = [
  cfg.gitPackage
  cfg.grepPackage
]; 
khaneliman commented 1 month ago

Yeah, looks like it should be

extraPackages = [
  cfg.gitPackage
  cfg.grepPackage
]; 

grepPackage is a local variable, not a config option.