coc-rust-analyzer: migrate from nodePackages

This commit is contained in:
dish
2025-11-06 15:37:51 -05:00
parent 8d8538bdc1
commit 89aa372f0c
6 changed files with 36 additions and 20 deletions
@@ -23,6 +23,7 @@
coc-prettier,
coc-pyright,
coc-r-lsp,
coc-rust-analyzer,
coc-sh,
coc-spell-checker,
coc-toml,
@@ -144,6 +145,11 @@ final: prev: {
src = "${coc-r-lsp}/lib/node_modules/coc-r-lsp";
};
coc-rust-analyzer = buildVimPlugin {
inherit (coc-rust-analyzer) pname version meta;
src = "${coc-rust-analyzer}/lib/node_modules/coc-rust-analyzer";
};
coc-sh = buildVimPlugin {
pname = "coc-sh";
inherit (coc-sh) version meta;
@@ -8,7 +8,6 @@ let
nodePackageNames = [
"coc-go"
"coc-ltex"
"coc-rust-analyzer"
"coc-smartf"
"coc-snippets"
"coc-solargraph"
@@ -0,0 +1,29 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
nix-update-script,
}:
buildNpmPackage {
pname = "coc-rust-analyzer";
version = "0-unstable-2025-10-31";
src = fetchFromGitHub {
owner = "fannheyward";
repo = "coc-rust-analyzer";
rev = "6cc74fcaed6b011b98e9f8483fb608dff53147be";
hash = "sha256-2XSx4eR9GgMbWY+IOEKuhCAVesxoZbh/KsLr0It0Cks=";
};
npmDepsHash = "sha256-94kuqDNsCcPuvTVeprEdjNOPw8pdpDp3IOvuoKdSEgU=";
passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
meta = {
description = "Rust-analyzer extension for coc.nvim";
homepage = "https://github.com/fannheyward/coc-rust-analyzer";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pyrox0 ];
};
}
@@ -97,6 +97,7 @@ mapAliases {
coc-python = throw "coc-python was removed because it was abandoned upstream on 2020-12-24. Upstream now recommends using coc-pyright or coc-jedi instead."; # added 2024-10-15
inherit (pkgs) coc-r-lsp; # added 2025-11-05
coc-rls = throw "coc-rls was removed because rls was deprecated in 2022. You should use coc-rust-analyzer instead, as rust-analyzer is maintained."; # added 2025-10-01
inherit (pkgs) coc-rust-analyzer; # added 2025-11-05
inherit (pkgs) coc-sh; # added 2025-10-02
inherit (pkgs) coc-spell-checker; # added 2025-10-01
inherit (pkgs) coc-toml;
@@ -23,7 +23,6 @@
, "clipboard-cli"
, "coc-go"
, "coc-ltex"
, "coc-rust-analyzer"
, "coc-smartf"
, "coc-snippets"
, "coc-solargraph"
-18
View File
@@ -37659,24 +37659,6 @@ in
bypassCache = true;
reconstructLock = true;
};
coc-rust-analyzer = nodeEnv.buildNodePackage {
name = "coc-rust-analyzer";
packageName = "coc-rust-analyzer";
version = "0.81.0";
src = fetchurl {
url = "https://registry.npmjs.org/coc-rust-analyzer/-/coc-rust-analyzer-0.81.0.tgz";
sha512 = "skbRCe1Yjoa3r/a0dHviJxGMS8s+PFzl7lmimCUxxT3kKxairDeetNfRBw+wsDJmKBzXGhy1KH+6Cmt3WJYz5w==";
};
buildInputs = globalBuildInputs;
meta = {
description = "rust-analyzer for Vim/Neovim, works as an extension with coc.nvim";
homepage = "https://github.com/fannheyward/coc-rust-analyzer#readme";
license = "MIT";
};
production = true;
bypassCache = true;
reconstructLock = true;
};
coc-smartf = nodeEnv.buildNodePackage {
name = "coc-smartf";
packageName = "coc-smartf";