summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorMatthieu Coudron <teto@users.noreply.github.com>2021-05-29 16:36:39 +0200
committerGitHub <noreply@github.com>2021-05-29 16:36:39 +0200
commitc73371e04b97493a34ac24ca09abc6a726d07697 (patch)
treeabe14d62327c78c45ed7b387367ae99537a17c43 /pkgs
parent759e95d5976af56eca0df28b1844861799713898 (diff)
downloadnixpkgs-c73371e04b97493a34ac24ca09abc6a726d07697.tar
nixpkgs-c73371e04b97493a34ac24ca09abc6a726d07697.tar.gz
nixpkgs-c73371e04b97493a34ac24ca09abc6a726d07697.tar.bz2
nixpkgs-c73371e04b97493a34ac24ca09abc6a726d07697.tar.lz
nixpkgs-c73371e04b97493a34ac24ca09abc6a726d07697.tar.xz
nixpkgs-c73371e04b97493a34ac24ca09abc6a726d07697.tar.zst
nixpkgs-c73371e04b97493a34ac24ca09abc6a726d07697.zip
neovim: fix neovim.override (#124785)
* neovim: temporary revert to unbreak user configs

Newly introduced "plugins" parameter is disabled until we get a better
testing infrastructure to minimize breaking changes.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/editors/neovim/utils.nix17
-rw-r--r--pkgs/test/vim/default.nix9
2 files changed, 12 insertions, 14 deletions
diff --git a/pkgs/applications/editors/neovim/utils.nix b/pkgs/applications/editors/neovim/utils.nix
index a7d8f00c664..ae814fa9b4e 100644
--- a/pkgs/applications/editors/neovim/utils.nix
+++ b/pkgs/applications/editors/neovim/utils.nix
@@ -54,15 +54,7 @@ let
 
 
       configurePatched = configure // {
-        packages.nix = {
-          start = lib.filter (f: f != null)
-            (map (x: if x.optional == false then x.plugin else null)
-              pluginsNormalized);
-          opt = lib.filter (f: f != null)
-            (map (x: if x.optional == true then x.plugin else null)
-              pluginsNormalized);
-        };
-        customRC = pluginRc + customRC;
+        customRC = pluginRc + customRC + (configure.customRC or "");
       };
 
       # A function to get the configuration string (if any) from an element of 'plugins'
@@ -173,11 +165,8 @@ let
     assert withPython -> throw "Python2 support has been removed from neovim, please remove withPython and extraPythonPackages.";
 
     wrapNeovimUnstable neovim (res // {
-      wrapperArgs = lib.escapeShellArgs (
-        res.wrapperArgs ++ lib.optionals (configure != {}) [
-          "--add-flags" "-u ${writeText "init.vim" res.neovimRcContent}"
-        ]) + " " + extraMakeWrapperArgs
-      ;
+      wrapperArgs = lib.escapeShellArgs res.wrapperArgs + extraMakeWrapperArgs;
+      wrapRc = (configure != {});
   });
 in
 {
diff --git a/pkgs/test/vim/default.nix b/pkgs/test/vim/default.nix
index c75836aa9a8..c809940fc4c 100644
--- a/pkgs/test/vim/default.nix
+++ b/pkgs/test/vim/default.nix
@@ -36,6 +36,15 @@ in
   ##################
   nvim_with_plugins = wrapNeovim "-with-plugins" nvimConfNix;
 
+  nvim_via_override = neovim.override {
+    configure = {
+      packages.foo.start = [ vimPlugins.ale ];
+      customRC = ''
+        :help ale
+      '';
+    };
+  };
+
   ### vim tests
   ##################
   vim_with_vim2nix = vim_configurable.customize {