summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Coudron <mcoudron@hotmail.com>2023-06-27 11:00:51 +0200
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2023-07-05 23:32:36 +0000
commit021e42b2f8608505dee4c02f4acdb5fb354cba5a (patch)
tree5165563c2bafc8a6f8373b7d0a1f158f57ba0eb2
parentMerge pull request #239910 from NixOS/staging-next-23.05 (diff)
downloadnixpkgs-origin/backport-240082-to-release-23.05.tar.gz
neovim: add perl to supported providersorigin/backport-240082-to-release-23.05
false by default. I noticed checkhealth complaining about it Which made me realize the providers ignored user config and were always using default config, hence the backport. (cherry picked from commit 20a0cdadadeda8654fc9dc78d14361d766f75277)
-rw-r--r--pkgs/applications/editors/neovim/utils.nix3
-rw-r--r--pkgs/applications/editors/neovim/wrapper.nix13
2 files changed, 13 insertions, 3 deletions
diff --git a/pkgs/applications/editors/neovim/utils.nix b/pkgs/applications/editors/neovim/utils.nix
index 5eea1528d659..9718d18f9fdd 100644
--- a/pkgs/applications/editors/neovim/utils.nix
+++ b/pkgs/applications/editors/neovim/utils.nix
@@ -172,6 +172,8 @@ let
withPython3 ? true
, withNodeJs ? false
, withRuby ? true
+ # perl is problematic https://github.com/NixOS/nixpkgs/issues/132368
+ , withPerl ? false
# so that we can pass the full neovim config while ignoring it
, ...
@@ -181,6 +183,7 @@ let
python = false;
python3 = withPython3;
ruby = withRuby;
+ perl = withPerl;
};
genProviderCommand = prog: withProg:
diff --git a/pkgs/applications/editors/neovim/wrapper.nix b/pkgs/applications/editors/neovim/wrapper.nix
index 887d647e2383..d302b83f44f0 100644
--- a/pkgs/applications/editors/neovim/wrapper.nix
+++ b/pkgs/applications/editors/neovim/wrapper.nix
@@ -6,6 +6,7 @@
, callPackage
, neovimUtils
, vimUtils
+, perl
}:
neovim:
@@ -19,6 +20,7 @@ let
, withPython2 ? false
, withPython3 ? true, python3Env ? python3
, withNodeJs ? false
+ , withPerl ? false
, rubyEnv ? null
, vimAlias ? false
, viAlias ? false
@@ -32,7 +34,7 @@ let
# entry to load in packpath
, packpathDirs
, ...
- }@args:
+ }:
let
wrapperArgsStr = if lib.isString wrapperArgs then wrapperArgs else lib.escapeShellArgs wrapperArgs;
@@ -50,8 +52,10 @@ let
]
;
- providerLuaRc = neovimUtils.generateProviderRc args;
- # providerLuaRc = "toto";
+ providerLuaRc = neovimUtils.generateProviderRc {
+ inherit withPython3 withNodeJs withPerl;
+ withRuby = rubyEnv != null;
+ };
# If configure != {}, we can't generate the rplugin.vim file with e.g
# NVIM_SYSTEM_RPLUGIN_MANIFEST *and* NVIM_RPLUGIN_MANIFEST env vars set in
@@ -86,6 +90,9 @@ let
+ lib.optionalString withNodeJs ''
ln -s ${nodePackages.neovim}/bin/neovim-node-host $out/bin/nvim-node
''
+ + lib.optionalString withPerl ''
+ ln -s ${perl}/bin/perl $out/bin/nvim-perl
+ ''
+ lib.optionalString vimAlias ''
ln -s $out/bin/nvim $out/bin/vim
''