Merge pull request #939 from Gerg-L/main
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Treewide Checks / Validate flake (push) Has been cancelled
Treewide Checks / Check formatting (push) Has been cancelled
Treewide Checks / Check source tree for typos (push) Has been cancelled
Treewide Checks / Validate documentation builds (push) Has been cancelled
Treewide Checks / Validate hyperlinks in documentation sources (push) Has been cancelled
Treewide Checks / Validate Editorconfig conformance (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled

fix: pluginOverrides attempting to build
This commit is contained in:
Ching Pei Yang 2025-06-11 10:50:19 +02:00 committed by GitHub
commit 2a2b5e2790
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,9 +7,9 @@
}: let
inherit (pkgs) vimPlugins;
inherit (lib.trivial) flip;
inherit (builtins) filter isString;
inherit (builtins) filter isString hasAttr getAttr;
getPin = name: ((pkgs.callPackages ../../../npins/sources.nix {}) // config.vim.pluginOverrides).${name};
getPin = flip getAttr (pkgs.callPackages ../../../npins/sources.nix {});
noBuildPlug = pname: let
pin = getPin pname;
@ -54,7 +54,16 @@
buildConfigPlugins = plugins:
map (plug:
if (isString plug)
then pluginBuilders.${plug} or (noBuildPlug plug)
then
if hasAttr plug config.vim.pluginOverrides
then
(let
plugin = config.vim.pluginOverrides.${plug};
in
if (lib.isType "flake" plugin)
then plugin // {name = plug;}
else plugin)
else pluginBuilders.${plug} or (noBuildPlug plug)
else plug) (
filter (f: f != null) plugins
);