From 09e2e5869257ccfaafe1d082b6be754a48b85ca0 Mon Sep 17 00:00:00 2001 From: Zhong Jianxin Date: Tue, 29 Oct 2024 19:52:36 +0800 Subject: [PATCH] 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. --- pkgs/applications/editors/neovim/wrapper.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/editors/neovim/wrapper.nix b/pkgs/applications/editors/neovim/wrapper.nix index 0913fa0a330f..270fdf3ce878 100644 --- a/pkgs/applications/editors/neovim/wrapper.nix +++ b/pkgs/applications/editors/neovim/wrapper.nix @@ -29,7 +29,7 @@ let , withNodeJs ? false , withPerl ? false - , rubyEnv ? null + , withRuby ? true # wether to create symlinks in $out/bin/vi(m) -> $out/bin/nvim , vimAlias ? false @@ -127,8 +127,7 @@ let ; 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 @@ -155,10 +154,9 @@ let __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 @@ -171,7 +169,7 @@ let + 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 ''