From 4dc3c91c50d676180cc5e45b8bff0b3ced052ced Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Sat, 20 Dec 2025 00:39:10 -0600 Subject: [PATCH] neovim: remove deprecated type coercion for extraXPackages 3 years old, no need to keep around. Signed-off-by: Austin Horstman --- modules/programs/neovim.nix | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/modules/programs/neovim.nix b/modules/programs/neovim.nix index 1f93940b8..6cc8c056a 100644 --- a/modules/programs/neovim.nix +++ b/modules/programs/neovim.nix @@ -118,20 +118,7 @@ in }; extraPython3Packages = mkOption { - # In case we get a plain list, we need to turn it into a function, - # as expected by the function in nixpkgs. - # The only way to do so is to call `const`, which will ignore its input. - type = - let - fromType = types.listOf types.package; - in - types.coercedTo fromType (lib.flip lib.warn lib.const '' - Assigning a plain list to extraPython3Packages is deprecated. - Please assign a function taking a package set as argument, so - extraPython3Packages = [ pkgs.python3Packages.xxx ]; - should become - extraPython3Packages = ps: [ ps.xxx ]; - '') (types.functionTo fromType); + type = types.functionTo (types.listOf types.package); default = _: [ ]; defaultText = literalExpression "ps: [ ]"; example = literalExpression "pyPkgs: with pyPkgs; [ python-language-server ]"; @@ -144,20 +131,7 @@ in }; extraLuaPackages = mkOption { - # We get the Lua package from the final package and use its - # Lua packageset to evaluate the function that this option was set to. - # This ensures that we always use the same Lua version as the Neovim package. - type = - let - fromType = types.listOf types.package; - in - types.coercedTo fromType (lib.flip lib.warn lib.const '' - Assigning a plain list to extraLuaPackages is deprecated. - Please assign a function taking a package set as argument, so - extraLuaPackages = [ pkgs.lua51Packages.xxx ]; - should become - extraLuaPackages = ps: [ ps.xxx ]; - '') (types.functionTo fromType); + type = types.functionTo (types.listOf types.package); default = _: [ ]; defaultText = literalExpression "ps: [ ]"; example = literalExpression "luaPkgs: with luaPkgs; [ luautf8 ]";