2024-07-27 06:49:29 +00:00
|
|
|
{ lib, stdenv, buildNpmPackage, fetchFromGitHub, unzip, vscodium, vscode-extensions }:
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
buildNpmPackage rec {
|
|
|
|
pname = "vscode-langservers-extracted";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "4.10.0";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
srcs = [
|
|
|
|
(fetchFromGitHub {
|
|
|
|
owner = "hrsh7th";
|
|
|
|
repo = "vscode-langservers-extracted";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-3m9+HZY24xdlLcFKY/5DfvftqprwLJk0vve2ZO1aEWk=";
|
|
|
|
})
|
|
|
|
vscodium.src
|
|
|
|
];
|
|
|
|
|
|
|
|
sourceRoot = "source";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
npmDepsHash = "sha256-XGlFtmikUrnnWXsAYzTqw2K7Y2O0bUtYug0xXFIASBQ=";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
nativeBuildInputs = [ unzip ];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
buildPhase =
|
|
|
|
let
|
|
|
|
extensions =
|
2024-09-26 11:04:55 +00:00
|
|
|
if stdenv.hostPlatform.isDarwin
|
2024-07-27 06:49:29 +00:00
|
|
|
then "../VSCodium.app/Contents/Resources/app/extensions"
|
|
|
|
else "../resources/app/extensions";
|
2023-07-15 17:15:38 +00:00
|
|
|
in
|
|
|
|
''
|
|
|
|
npx babel ${extensions}/css-language-features/server/dist/node \
|
|
|
|
--out-dir lib/css-language-server/node/
|
|
|
|
npx babel ${extensions}/html-language-features/server/dist/node \
|
|
|
|
--out-dir lib/html-language-server/node/
|
|
|
|
npx babel ${extensions}/json-language-features/server/dist/node \
|
|
|
|
--out-dir lib/json-language-server/node/
|
|
|
|
cp -r ${vscode-extensions.dbaeumer.vscode-eslint}/share/vscode/extensions/dbaeumer.vscode-eslint/server/out \
|
|
|
|
lib/eslint-language-server
|
|
|
|
'';
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|