Merge pull request #238814 from malob/fix-vscode-langservers-extracted-darwin
vscode-langservers-extracted: fix Darwin build
This commit is contained in:
commit
b4d3a0e940
1 changed files with 19 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
||||||
{ lib, buildNpmPackage, fetchFromGitHub, vscode }:
|
{ lib, stdenv, buildNpmPackage, fetchFromGitHub, vscode }:
|
||||||
|
|
||||||
buildNpmPackage rec {
|
buildNpmPackage rec {
|
||||||
pname = "vscode-langservers-extracted";
|
pname = "vscode-langservers-extracted";
|
||||||
|
@ -19,15 +19,24 @@ buildNpmPackage rec {
|
||||||
sed -i '/^\s*"vscode-eslint-language-server":.*bin\//d' package.json package-lock.json
|
sed -i '/^\s*"vscode-eslint-language-server":.*bin\//d' package.json package-lock.json
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase = let
|
buildPhase =
|
||||||
extensions = "${vscode}/lib/vscode/resources/app/extensions";
|
let
|
||||||
in ''
|
extensions =
|
||||||
npx babel ${extensions}/css-language-features/server/dist/* --out-dir lib/css-language-server/node/
|
if stdenv.isDarwin
|
||||||
npx babel ${extensions}/html-language-features/server/dist/* --out-dir lib/html-language-server/node/
|
then "${vscode}/Applications/Visual\\ Studio\\ Code.app/Contents/Resources/app/extensions"
|
||||||
npx babel ${extensions}/json-language-features/server/dist/* --out-dir lib/json-language-server/node/
|
else "${vscode}/lib/vscode/resources/app/extensions";
|
||||||
npx babel ${extensions}/markdown-language-features/server/dist/* --out-dir lib/markdown-language-server/node/
|
in
|
||||||
mv lib/markdown-language-server/node/workerMain.js lib/markdown-language-server/node/main.js
|
''
|
||||||
'';
|
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/
|
||||||
|
npx babel ${extensions}/markdown-language-features/server/dist/node \
|
||||||
|
--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; {
|
meta = with lib; {
|
||||||
description = "HTML/CSS/JSON/ESLint language servers extracted from vscode.";
|
description = "HTML/CSS/JSON/ESLint language servers extracted from vscode.";
|
||||||
|
|
Loading…
Reference in a new issue