From c90c292cef0253385a98c6157a853d3854dbdb27 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Sat, 30 Aug 2025 15:09:47 -0500 Subject: [PATCH] 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 --- pkgs/applications/editors/vim/plugins/default.nix | 1 - pkgs/applications/editors/vim/plugins/overrides.nix | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/vim/plugins/default.nix b/pkgs/applications/editors/vim/plugins/default.nix index 729129901315..0bf9f74f2ede 100644 --- a/pkgs/applications/editors/vim/plugins/default.nix +++ b/pkgs/applications/editors/vim/plugins/default.nix @@ -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; }; diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index e51deb33832d..6baecc1ec162 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -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 {