diff --git a/pkgs/applications/editors/neovim/wrapper.nix b/pkgs/applications/editors/neovim/wrapper.nix index b51e7f08a0bf..01e49149c6e3 100644 --- a/pkgs/applications/editors/neovim/wrapper.nix +++ b/pkgs/applications/editors/neovim/wrapper.nix @@ -3,7 +3,7 @@ , ruby , nodejs , writeText -, nodePackages +, neovim-node-client , python3 , callPackage , neovimUtils @@ -173,7 +173,7 @@ let ln -s ${finalAttrs.rubyEnv}/bin/neovim-ruby-host $out/bin/nvim-ruby '' + lib.optionalString finalAttrs.withNodeJs '' - ln -s ${nodePackages.neovim}/bin/neovim-node-host $out/bin/nvim-node + ln -s ${neovim-node-client}/bin/neovim-node-host $out/bin/nvim-node '' + lib.optionalString finalAttrs.withPerl '' ln -s ${perlEnv}/bin/perl $out/bin/nvim-perl diff --git a/pkgs/by-name/ne/neovim-node-client/package.nix b/pkgs/by-name/ne/neovim-node-client/package.nix new file mode 100644 index 000000000000..871c4c5b601a --- /dev/null +++ b/pkgs/by-name/ne/neovim-node-client/package.nix @@ -0,0 +1,39 @@ +{ + lib, + buildNpmPackage, + fetchNpmDeps, + fetchFromGitHub, +}: + +buildNpmPackage rec { + pname = "node-client"; + version = "5.3.0"; + + src = fetchFromGitHub { + owner = "neovim"; + repo = "node-client"; + rev = "02a5fdef8e3ec2812d295981db38dbccf82e0728"; + hash = "sha256-0vPw2hCGUDepSpF1gp/lI71EgwGsCSnw7ePP7ElHsTQ="; + }; + + npmDeps = fetchNpmDeps { + inherit src; + hash = "sha256-VYoJAi1RzVf5ObjuGmnuiA/1WYBWC+qYPdfWF98+oGw="; + }; + npmWorkspace = "packages/neovim"; + + postInstall = '' + mkdir -p $out/bin + # Overwrite the unwanted wrapper created by buildNpmPackage + ln -sf $out/lib/node_modules/neovim/bin/cli.js $out/bin/neovim-node-host + ''; + + meta = { + mainProgram = "node-client"; + description = "Nvim msgpack API client and remote plugin provider"; + homepage = "https://github.com/neovim/node-client"; + changelog = "https://github.com/neovim/node-client/releases/tag/v${version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fidgetingbits ]; + }; +} diff --git a/pkgs/development/node-packages/aliases.nix b/pkgs/development/node-packages/aliases.nix index 6d1dcd366593..a65be6e33ae7 100644 --- a/pkgs/development/node-packages/aliases.nix +++ b/pkgs/development/node-packages/aliases.nix @@ -136,6 +136,7 @@ mapAliases { inherit (pkgs) mermaid-cli; # added 2023-10-01 musescore-downloader = pkgs.dl-librescore; # added 2023-08-19 inherit (pkgs) near-cli; # added 2023-09-09 + neovim = pkgs.neovim-node-client; # added 2024-11-13 node-inspector = throw "node-inspector was removed because it was broken"; # added 2023-08-21 inherit (pkgs) node-gyp; # added 2024-08-13 inherit (pkgs) node-pre-gyp; # added 2024-08-05 diff --git a/pkgs/development/node-packages/main-programs.nix b/pkgs/development/node-packages/main-programs.nix index 1ad182423747..38eb64559fd5 100644 --- a/pkgs/development/node-packages/main-programs.nix +++ b/pkgs/development/node-packages/main-programs.nix @@ -36,7 +36,6 @@ less = "lessc"; localtunnel = "lt"; lua-fmt = "luafmt"; - neovim = "neovim-node-host"; parsoid = "parse.js"; poor-mans-t-sql-formatter-cli = "sqlformat"; postcss-cli = "postcss"; diff --git a/pkgs/development/node-packages/node-packages.json b/pkgs/development/node-packages/node-packages.json index d5de56d929ba..24a13c554103 100644 --- a/pkgs/development/node-packages/node-packages.json +++ b/pkgs/development/node-packages/node-packages.json @@ -137,7 +137,6 @@ , "meat" , "mocha" , "multi-file-swagger" -, "neovim" , "nijs" , "node-gyp-build" , "node2nix"