vscode-langservers-extracted: use buildNpmPackage

This commit is contained in:
Lord-Valen 2023-05-28 00:06:00 -04:00 committed by Sandro Jäckel
parent f1fc322214
commit e45eeed341
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5
5 changed files with 41 additions and 51 deletions

View File

@ -46,4 +46,5 @@ mapAliases {
manta = pkgs.node-manta; # Added 2023-05-06
thelounge = pkgs.thelounge; # Added 2023-05-22
triton = pkgs.triton; # Added 2023-05-06
vscode-langservers-extracted = pkgs.vscode-langservers-extracted; # Added 2023-05-27
}

View File

@ -380,7 +380,6 @@
, "vscode-html-languageserver-bin"
, "vscode-json-languageserver"
, "vscode-json-languageserver-bin"
, "vscode-langservers-extracted"
, "vue-cli"
, "vue-language-server"
, "wavedrom-cli"

View File

@ -144915,56 +144915,6 @@ in
bypassCache = true;
reconstructLock = true;
};
vscode-langservers-extracted = nodeEnv.buildNodePackage {
name = "vscode-langservers-extracted";
packageName = "vscode-langservers-extracted";
version = "4.7.0";
src = fetchurl {
url = "https://registry.npmjs.org/vscode-langservers-extracted/-/vscode-langservers-extracted-4.7.0.tgz";
sha512 = "OZWgreyvCKdKV4TfBGXrxiJVaT041SkoE3TzQUCS/EnK55zMGM1fq1HoXtFLMvqatEuVYSPF2lywrAj2Ac0maQ==";
};
dependencies = [
sources."@vscode/l10n-0.0.13"
sources."core-js-3.31.0"
sources."jsonc-parser-3.2.0"
sources."picomatch-2.3.1"
sources."regenerator-runtime-0.13.11"
sources."request-light-0.7.0"
sources."typescript-4.9.5"
(sources."vscode-css-languageservice-6.2.6" // {
dependencies = [
sources."@vscode/l10n-0.0.14"
];
})
(sources."vscode-html-languageservice-5.0.6" // {
dependencies = [
sources."@vscode/l10n-0.0.14"
];
})
sources."vscode-json-languageservice-5.3.5"
sources."vscode-jsonrpc-8.1.0"
sources."vscode-languageserver-8.1.0"
sources."vscode-languageserver-protocol-3.17.3"
sources."vscode-languageserver-textdocument-1.0.10"
sources."vscode-languageserver-types-3.17.3"
(sources."vscode-markdown-languageservice-0.3.0" // {
dependencies = [
sources."@vscode/l10n-0.0.10"
];
})
sources."vscode-nls-5.2.0"
sources."vscode-uri-3.0.7"
];
buildInputs = globalBuildInputs;
meta = {
description = "HTML/CSS/JSON/ESLint language servers extracted from [vscode](https://github.com/Microsoft/vscode).";
homepage = "https://github.com/hrsh7th/vscode-langservers-extracted#readme";
license = "MIT";
};
production = true;
bypassCache = true;
reconstructLock = true;
};
vue-cli = nodeEnv.buildNodePackage {
name = "vue-cli";
packageName = "vue-cli";

View File

@ -0,0 +1,38 @@
{ lib, buildNpmPackage, fetchFromGitHub, vscode }:
buildNpmPackage rec {
pname = "vscode-langservers-extracted";
version = "4.7.0";
src = fetchFromGitHub {
owner = "hrsh7th";
repo = pname;
rev = "v${version}";
hash = "sha256-RLRDEHfEJ2ckn0HTMu0WbMK/o9W20Xwm+XI6kCq57u8=";
};
npmDepsHash = "sha256-QhiSj/DigsI4Bfwmk3wG4lDQOWuDDduc/sfJlXiEoGE=";
postPatch = ''
# TODO: Add vscode-eslint as a dependency
# Eliminate the vscode-eslint bin
sed -i '/^\s*"vscode-eslint-language-server":.*bin\//d' package.json package-lock.json
'';
buildPhase = let
extensions = "${vscode}/lib/vscode/resources/app/extensions";
in ''
npx babel ${extensions}/css-language-features/server/dist/* --out-dir lib/css-language-server/node/
npx babel ${extensions}/html-language-features/server/dist/* --out-dir lib/html-language-server/node/
npx babel ${extensions}/json-language-features/server/dist/* --out-dir lib/json-language-server/node/
npx babel ${extensions}/markdown-language-features/server/dist/* --out-dir lib/markdown-language-server/node/
mv lib/markdown-language-server/node/workerMain.js lib/markdown-language-server/node/main.js
'';
meta = with lib; {
description = "HTML/CSS/JSON/ESLint language servers extracted from vscode.";
homepage = "https://github.com/hrsh7th/vscode-langservers-extracted";
license = licenses.mit;
maintainers = with maintainers; [ lord-valen ];
};
}

View File

@ -17782,6 +17782,8 @@ with pkgs;
verible = callPackage ../development/tools/language-servers/verible { };
vscode-langservers-extracted = callPackage ../development/tools/language-servers/vscode-langservers-extracted { };
zls = callPackage ../development/tools/language-servers/zls {
zig = buildPackages.zig_0_10;
};