diff --git a/pkgs/applications/editors/vim/plugins/cocPlugins.nix b/pkgs/applications/editors/vim/plugins/cocPlugins.nix index 5b4c054f068f..ed66d9d73186 100644 --- a/pkgs/applications/editors/vim/plugins/cocPlugins.nix +++ b/pkgs/applications/editors/vim/plugins/cocPlugins.nix @@ -27,6 +27,7 @@ coc-sh, coc-smartf, coc-snippets, + coc-solargraph, coc-spell-checker, coc-toml, }: @@ -168,6 +169,11 @@ final: prev: { src = "${coc-snippets}/lib/node_modules/coc-snippets"; }; + coc-solargraph = buildVimPlugin { + inherit (coc-solargraph) pname version meta; + src = "${coc-solargraph}/lib/node_modules/coc-solargraph"; + }; + coc-spell-checker = buildVimPlugin { pname = "coc-spell-checker"; inherit (coc-spell-checker) version meta; diff --git a/pkgs/applications/editors/vim/plugins/nodePackagePlugins.nix b/pkgs/applications/editors/vim/plugins/nodePackagePlugins.nix index 71ce5e823b7e..1a6b0c4aeda7 100644 --- a/pkgs/applications/editors/vim/plugins/nodePackagePlugins.nix +++ b/pkgs/applications/editors/vim/plugins/nodePackagePlugins.nix @@ -8,7 +8,6 @@ let nodePackageNames = [ "coc-go" "coc-ltex" - "coc-solargraph" "coc-sqlfluff" "coc-stylelint" "coc-sumneko-lua" diff --git a/pkgs/by-name/co/coc-solargraph/package.nix b/pkgs/by-name/co/coc-solargraph/package.nix new file mode 100644 index 000000000000..a21fb429acc1 --- /dev/null +++ b/pkgs/by-name/co/coc-solargraph/package.nix @@ -0,0 +1,73 @@ +{ + lib, + stdenvNoCC, + fetchFromGitHub, + fetchYarnDeps, + yarnConfigHook, + yarnBuildHook, + yarnInstallHook, + nodejs, + nix-update-script, + esbuild, + buildGoModule, +}: +let + esbuild' = + let + version = "0.8.29"; + in + esbuild.override { + buildGoModule = + args: + buildGoModule ( + args + // { + inherit version; + src = fetchFromGitHub { + owner = "evanw"; + repo = "esbuild"; + rev = "v${version}"; + hash = "sha256-WpnWdx0Oi1KBWiS/CEd88hYU/3ka1x1AA71ipYJgT5A="; + }; + vendorHash = "sha256-2ABWPqhK2Cf4ipQH7XvRrd+ZscJhYPc3SV2cGT0apdg="; + } + ); + }; +in +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "coc-solargraph"; + version = "1.2.4"; + + src = fetchFromGitHub { + owner = "neoclide"; + repo = "coc-solargraph"; + tag = finalAttrs.version; + hash = "sha256-AUulj0tcgkXrQS9k1zhB0LKWJxvIlVtxSQK+nYGm73s="; + }; + + yarnOfflineCache = fetchYarnDeps { + inherit (finalAttrs) src; + hash = "sha256-FPxvwqx7TfJBM+O8TY64swJVYlWIbCvVbzVJYthHjO0="; + }; + + yarnBuildScript = "prepare"; + + nativeBuildInputs = [ + yarnConfigHook + yarnBuildHook + yarnInstallHook + nodejs + esbuild' + ]; + + env.ESBUILD_BINARY_PATH = lib.getExe esbuild'; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Solargraph extension for coc.nvim"; + homepage = "https://github.com/neoclide/coc-solargraph"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ pyrox0 ]; + }; +}) diff --git a/pkgs/development/node-packages/aliases.nix b/pkgs/development/node-packages/aliases.nix index 5b12e45fcd40..19efdeff046e 100644 --- a/pkgs/development/node-packages/aliases.nix +++ b/pkgs/development/node-packages/aliases.nix @@ -101,6 +101,7 @@ mapAliases { inherit (pkgs) coc-sh; # added 2025-10-02 inherit (pkgs) coc-smartf; # Added 2025-11-05 inherit (pkgs) coc-snippets; # Added 2025-11-05 + inherit (pkgs) coc-solargraph; # Added 2025-11-05 inherit (pkgs) coc-spell-checker; # added 2025-10-01 inherit (pkgs) coc-toml; coc-tslint = throw "coc-tslint was removed because it was deprecated upstream; coc-eslint offers comparable features for eslint, which replaced tslint"; # Added 2024-10-18 diff --git a/pkgs/development/node-packages/node-packages.json b/pkgs/development/node-packages/node-packages.json index 8c45daf5160e..d2b8bbd537c3 100644 --- a/pkgs/development/node-packages/node-packages.json +++ b/pkgs/development/node-packages/node-packages.json @@ -23,7 +23,6 @@ , "clipboard-cli" , "coc-go" , "coc-ltex" -, "coc-solargraph" , "coc-stylelint" , "coc-sumneko-lua" , "coc-sqlfluff" diff --git a/pkgs/development/node-packages/node-packages.nix b/pkgs/development/node-packages/node-packages.nix index 73da382cfc1d..96997488c015 100644 --- a/pkgs/development/node-packages/node-packages.nix +++ b/pkgs/development/node-packages/node-packages.nix @@ -37659,23 +37659,6 @@ in bypassCache = true; reconstructLock = true; }; - coc-solargraph = nodeEnv.buildNodePackage { - name = "coc-solargraph"; - packageName = "coc-solargraph"; - version = "1.2.4"; - src = fetchurl { - url = "https://registry.npmjs.org/coc-solargraph/-/coc-solargraph-1.2.4.tgz"; - sha512 = "Z00v8HmgQyJgv/FKo7FkqWWTPNHeiOgEDqsI4RT9457rEQ8ZF/wLeq38DRihTfIra93GZ3EprVKYCOels6JHgQ=="; - }; - buildInputs = globalBuildInputs; - meta = { - description = "Ruby languageserver extension for coc.nvim, using solargraph"; - license = "MIT"; - }; - production = true; - bypassCache = true; - reconstructLock = true; - }; coc-stylelint = nodeEnv.buildNodePackage { name = "coc-stylelint"; packageName = "coc-stylelint";