From 9c3d86523e1a465528164e5e3a942164f5bf9c3e Mon Sep 17 00:00:00 2001 From: teto <886074+teto@users.noreply.github.com> Date: Thu, 19 Feb 2026 16:11:44 +0100 Subject: [PATCH] neovim: disable python3 and ruby providers by default Providers are the thing I spend most of my time on while admittedly very few users use it (I can only think of deoplete now) and it's going to disappear anyway. We have no tests for it because of the previous reasons. Before this patch: nix path-info -Sh .#neovim /nix/store/smd007xlbsx35y42rri5xlqhjgajz9in-neovim-0.11.6 365.0 MiB After: nix path-info -Sh .#neovim /nix/store/4cr60j05l3pirhhrcs5hqb9rzj854n5r-neovim-0.11.6 240.6 MiB To restore old behavior, pass `{withPython3= true; withRuby = true; }` to the neovim wrapper. --- doc/release-notes/rl-2605.section.md | 1 + pkgs/applications/editors/neovim/utils.nix | 6 +++--- pkgs/applications/editors/neovim/wrapper.nix | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/release-notes/rl-2605.section.md b/doc/release-notes/rl-2605.section.md index 10802b054ec7..c556a90ed107 100644 --- a/doc/release-notes/rl-2605.section.md +++ b/doc/release-notes/rl-2605.section.md @@ -201,6 +201,7 @@ - `mold` is now wrapped by default. +- `neovim` now disables by default the `python3` and `ruby` providers, unused by most users and reducing closure size from 365MiB to 240MiB. ### Deprecations {#sec-nixpkgs-release-26.05-lib-deprecations} diff --git a/pkgs/applications/editors/neovim/utils.nix b/pkgs/applications/editors/neovim/utils.nix index 47d55e3042b6..23968bf21d0e 100644 --- a/pkgs/applications/editors/neovim/utils.nix +++ b/pkgs/applications/editors/neovim/utils.nix @@ -177,7 +177,7 @@ let # the function you would have passed to python.withPackages extraPythonPackages ? (_: [ ]), # the function you would have passed to python.withPackages - withPython3 ? true, + withPython3 ? false, extraPython3Packages ? (_: [ ]), # the function you would have passed to lua.withPackages extraLuaPackages ? (_: [ ]), @@ -243,9 +243,9 @@ let */ generateProviderRc = { - withPython3 ? true, + withPython3 ? false, withNodeJs ? false, - withRuby ? true, + withRuby ? false, # Perl is problematic https://github.com/NixOS/nixpkgs/issues/132368 withPerl ? false, diff --git a/pkgs/applications/editors/neovim/wrapper.nix b/pkgs/applications/editors/neovim/wrapper.nix index 6c97a6f22377..c8d7d69eae0f 100644 --- a/pkgs/applications/editors/neovim/wrapper.nix +++ b/pkgs/applications/editors/neovim/wrapper.nix @@ -37,14 +37,14 @@ let # should contain all args but the binary. Can be either a string or list wrapperArgs ? [ ], withPython2 ? false, - withPython3 ? true, + withPython3 ? false, # the function you would have passed to python3.withPackages extraPython3Packages ? (_: [ ]), waylandSupport ? lib.meta.availableOn stdenv.hostPlatform wayland, withNodeJs ? false, withPerl ? false, - withRuby ? true, + withRuby ? false, # wether to create symlinks in $out/bin/vi(m) -> $out/bin/nvim vimAlias ? false,