neovim: fix withRuby regression (#352045)

The wrapper refactor https://github.com/NixOS/nixpkgs/pull/344541
effectively make withRuby always enabled.

Fix https://github.com/NixOS/nixpkgs/issues/351839.

Changed files
+4 -6
pkgs
applications
editors
neovim
+4 -6
pkgs/applications/editors/neovim/wrapper.nix
···
, withNodeJs ? false
, withPerl ? false
-
, rubyEnv ? null
+
, withRuby ? true
# wether to create symlinks in $out/bin/vi(m) -> $out/bin/nvim
, vimAlias ? false
···
;
providerLuaRc = neovimUtils.generateProviderRc {
-
inherit (finalAttrs) withPython3 withNodeJs withPerl;
-
withRuby = rubyEnv != null;
+
inherit (finalAttrs) withPython3 withNodeJs withPerl withRuby;
};
# If configure != {}, we can't generate the rplugin.vim file with e.g
···
__structuredAttrs = true;
dontUnpack = true;
-
inherit viAlias vimAlias withNodeJs withPython3 withPerl;
+
inherit viAlias vimAlias withNodeJs withPython3 withPerl withRuby;
inherit wrapRc providerLuaRc packpathDirs;
inherit python3Env rubyEnv;
-
withRuby = rubyEnv != null;
inherit wrapperArgs generatedWrapperArgs;
luaRcContent = rcContent;
# Remove the symlinks created by symlinkJoin which we need to perform
···
+ lib.optionalString finalAttrs.withPython3 ''
makeWrapper ${python3Env.interpreter} $out/bin/nvim-python3 --unset PYTHONPATH --unset PYTHONSAFEPATH
''
-
+ lib.optionalString (finalAttrs.rubyEnv != null) ''
+
+ lib.optionalString (finalAttrs.withRuby) ''
ln -s ${finalAttrs.rubyEnv}/bin/neovim-ruby-host $out/bin/nvim-ruby
''
+ lib.optionalString finalAttrs.withNodeJs ''