summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorMatthieu Coudron <mattator@gmail.com>2020-10-31 19:36:49 +0100
committerGitHub <noreply@github.com>2020-10-31 19:36:49 +0100
commit36ac62c6d7fbc2e269d146b121931cea83c42b9a (patch)
treed3404c8e3d6d1f9132bc91127071310ddddd45cf /pkgs/applications
parentf93de9dea381ce2492b18962ac7ec30fc9bb2dc3 (diff)
parentdb157224ef26d088b66d30b62a50f602ef526545 (diff)
downloadnixpkgs-36ac62c6d7fbc2e269d146b121931cea83c42b9a.tar
nixpkgs-36ac62c6d7fbc2e269d146b121931cea83c42b9a.tar.gz
nixpkgs-36ac62c6d7fbc2e269d146b121931cea83c42b9a.tar.bz2
nixpkgs-36ac62c6d7fbc2e269d146b121931cea83c42b9a.tar.lz
nixpkgs-36ac62c6d7fbc2e269d146b121931cea83c42b9a.tar.xz
nixpkgs-36ac62c6d7fbc2e269d146b121931cea83c42b9a.tar.zst
nixpkgs-36ac62c6d7fbc2e269d146b121931cea83c42b9a.zip
Merge pull request #102231 from teto/neovim_fix
neovim: revert change to extraMakeWrapperArgs
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/editors/neovim/utils.nix12
-rw-r--r--pkgs/applications/editors/neovim/wrapper.nix10
2 files changed, 9 insertions, 13 deletions
diff --git a/pkgs/applications/editors/neovim/utils.nix b/pkgs/applications/editors/neovim/utils.nix
index 1c49f6e0fbe..15d3f214057 100644
--- a/pkgs/applications/editors/neovim/utils.nix
+++ b/pkgs/applications/editors/neovim/utils.nix
@@ -118,7 +118,7 @@ let
 
   # to keep backwards compatibility
   legacyWrapper = neovim: {
-    extraMakeWrapperArgs ? []
+    extraMakeWrapperArgs ? ""
     , withPython ? true
     /* the function you would have passed to python.withPackages */
     , extraPythonPackages ? (_: [])
@@ -147,13 +147,9 @@ let
       };
     in
     wrapNeovimUnstable neovim (res // {
-      wrapperArgs = res.wrapperArgs
-      ++ [
-        "--add-flags" "-u ${writeText "init.vim" res.neovimRcContent}"
-      ]
-      ++ (if builtins.isList extraMakeWrapperArgs then extraMakeWrapperArgs
-      else lib.warn "Passing a string as extraMakeWrapperArgs to the neovim wrapper is
-        deprecated, please use a list instead")
+      wrapperArgs = lib.escapeShellArgs (
+        res.wrapperArgs ++ [ "--add-flags" "-u ${writeText "init.vim" res.neovimRcContent}" ])
+        + " " + extraMakeWrapperArgs
       ;
   });
 in
diff --git a/pkgs/applications/editors/neovim/wrapper.nix b/pkgs/applications/editors/neovim/wrapper.nix
index 06ef920e276..d18d13a050f 100644
--- a/pkgs/applications/editors/neovim/wrapper.nix
+++ b/pkgs/applications/editors/neovim/wrapper.nix
@@ -14,7 +14,7 @@ neovim:
 let
   wrapper = {
       # should contain all args but the binary
-      wrapperArgs ? []
+      wrapperArgs ? ""
     , manifestRc ? null
     , withPython2 ? true, python2Env ? null
     , withPython3 ? true,  python3Env ? null
@@ -33,7 +33,7 @@ let
   # wrapper with most arguments we need, excluding those that cause problems to
   # generate rplugin.vim, but still required for the final wrapper.
   finalMakeWrapperArgs =
-    [ "${neovim}/bin/nvim" "${placeholder "out"}/bin/nvim" ] ++ wrapperArgs ++
+    [ "${neovim}/bin/nvim" "${placeholder "out"}/bin/nvim" ] ++
       [ "--set" "NVIM_SYSTEM_RPLUGIN_MANIFEST" "${placeholder "out"}/rplugin.vim" ];
   in
   symlinkJoin {
@@ -66,11 +66,11 @@ let
       ''
       + optionalString (manifestRc != null) (let
         manifestWrapperArgs =
-          [ "${neovim}/bin/nvim" "${placeholder "out"}/bin/nvim-wrapper" ] ++ wrapperArgs;
+          [ "${neovim}/bin/nvim" "${placeholder "out"}/bin/nvim-wrapper" ];
       in ''
         echo "Generating remote plugin manifest"
         export NVIM_RPLUGIN_MANIFEST=$out/rplugin.vim
-        makeWrapper ${lib.escapeShellArgs manifestWrapperArgs}
+        makeWrapper ${lib.escapeShellArgs manifestWrapperArgs} ${wrapperArgs}
 
         # Some plugins assume that the home directory is accessible for
         # initializing caches, temporary files, etc. Even if the plugin isn't
@@ -100,7 +100,7 @@ let
       '')
       + ''
         rm $out/bin/nvim
-        makeWrapper ${lib.escapeShellArgs finalMakeWrapperArgs}
+        makeWrapper ${lib.escapeShellArgs finalMakeWrapperArgs} ${wrapperArgs}
       '';
 
     paths = [ neovim ];