mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
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,4 +1,4 @@
|
||||
{ lib, buildNpmPackage, fetchFromGitHub, vscode }:
|
||||
{ lib, stdenv, buildNpmPackage, fetchFromGitHub, vscode }:
|
||||
|
||||
buildNpmPackage rec {
|
||||
pname = "vscode-langservers-extracted";
|
||||
@ -19,15 +19,24 @@ buildNpmPackage rec {
|
||||
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
|
||||
'';
|
||||
buildPhase =
|
||||
let
|
||||
extensions =
|
||||
if stdenv.isDarwin
|
||||
then "${vscode}/Applications/Visual\\ Studio\\ Code.app/Contents/Resources/app/extensions"
|
||||
else "${vscode}/lib/vscode/resources/app/extensions";
|
||||
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/
|
||||
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; {
|
||||
description = "HTML/CSS/JSON/ESLint language servers extracted from vscode.";
|
||||
|
Loading…
Reference in New Issue
Block a user