Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vscode-langservers-extracted: repackage with buildNpmPackage #234888

Merged
merged 2 commits into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9313,6 +9313,12 @@
githubId = 5624721;
name = "Ben Wolsieffer";
};
lord-valen = {
name = "Lord Valen";
matrix = "@lord-valen:matrix.org";
github = "Lord-Valen";
githubId = 46138807;
};
lorenz = {
name = "Lorenz Brun";
email = "[email protected]";
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/node-packages/aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
1 change: 0 additions & 1 deletion pkgs/development/node-packages/node-packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
50 changes: 0 additions & 50 deletions pkgs/development/node-packages/node-packages.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -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 ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down