vimPlugins: shadow plugin builders in overrides.nix

We want to prevent plugins being added in `overrides.nix`. Shadow the
helper names to throw if someone tries to add them and use them in the
file.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
Austin Horstman
2025-08-30 17:13:14 -05:00
parent aa88b95202
commit c90c292cef
2 changed files with 5 additions and 2 deletions
@@ -55,7 +55,6 @@ let
# If additional modifications to the build process are required,
# add to ./overrides.nix.
overrides = callPackage ./overrides.nix {
inherit buildVimPlugin;
inherit llvmPackages;
};
@@ -3,7 +3,6 @@
stdenv,
# nixpkgs functions
buildGoModule,
buildVimPlugin,
callPackage,
fetchFromGitHub,
fetchpatch,
@@ -131,6 +130,11 @@
self: super:
let
luaPackages = neovim-unwrapped.lua.pkgs;
# Ensure the vim plugin builders are not used in this file.
# If they are used, these stubs will throw.
buildVimPlugin = throw "New plugin definitions should be done outside `overrides.nix`";
buildNeoVimPlugin = throw "New plugin definitions should be done outside `overrides.nix`";
in
{
corePlugins = symlinkJoin {