{ pkgs , lib , stdenv , ... }: with lib; { runtimepath ? ../../nvim , viAlias ? true , vimAlias ? true , withPython3 ? true , extraPackages ? [ ] , extraPython3Packages ? (_: [ ]) , withNodeJs ? false , withRuby ? true , extraLuaPackages ? (_: [ ]) , plugins ? [ ] , customLuaRcContent ? "" , ... }: let rtp = stdenv.mkDerivation { name = "neovim-runtimepath"; src = runtimepath; buildPhase = '' mkdir -p $out/nvim ''; installPhase = '' cp -r * $out/nvim ''; }; luaRcContent = '' vim.opt.runtimepath:prepend('${rtp}/nvim') vim.opt.runtimepath:append('${rtp}/nvim/after') ''; neovim = pkgs.neovimUtils.makeNeovimConfig { inherit extraPython3Packages withPython3 withRuby withNodeJs viAlias vimAlias plugins luaRcContent; }; makeWrapperArgs = let binPath = lib.makeBinPath ( lib.optionals (extraPackages != [ ]) extraPackages); in [ ] ++ lib.optionals (binPath != "") [ "--suffix" "PATH" ":" binPath ]; in neovim // { wrapperArgs = makeWrapperArgs; }