Merge pull request #324160 from SuperSandro2000/yaml-lsp
This commit is contained in:
commit
6feffb9f60
@ -1,10 +1,14 @@
|
||||
{ lib
|
||||
, mkYarnPackage
|
||||
, fetchYarnDeps
|
||||
, fetchFromGitHub
|
||||
, fetchYarnDeps
|
||||
, fixup-yarn-lock
|
||||
, makeWrapper
|
||||
, nodejs
|
||||
, stdenv
|
||||
, yarn
|
||||
}:
|
||||
|
||||
mkYarnPackage rec {
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "yaml-language-server";
|
||||
version = "1.15.0";
|
||||
|
||||
@ -15,21 +19,54 @@ mkYarnPackage rec {
|
||||
hash = "sha256-Y3Q/y9UIiy7US8Jl4vxT0Pfw8h3hiXK+Cu9TEQHyAaA=";
|
||||
};
|
||||
|
||||
packageJSON = ./package.json;
|
||||
offlineCache = fetchYarnDeps {
|
||||
yarnLock = "${src}/yarn.lock";
|
||||
hash = "sha256-zHcxZ4VU6CGux72Nsy0foU4gFshK1wO/LTfnwOoirmg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
fixup-yarn-lock
|
||||
yarn
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
nodejs
|
||||
];
|
||||
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
|
||||
export HOME=$(mktemp -d)
|
||||
yarn config --offline set yarn-offline-mirror "$offlineCache"
|
||||
fixup-yarn-lock yarn.lock
|
||||
yarn --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive install
|
||||
patchShebangs node_modules
|
||||
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
export HOME=$(mktemp -d)
|
||||
yarn --offline build
|
||||
yarn --offline compile
|
||||
yarn --offline build:libs
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
yarn --offline --production install
|
||||
|
||||
mkdir -p $out/bin $out/lib/node_modules/yaml-language-server
|
||||
cp -r . $out/lib/node_modules/yaml-language-server
|
||||
ln -s $out/lib/node_modules/yaml-language-server/bin/yaml-language-server $out/bin/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/redhat-developer/yaml-language-server/blob/${src.rev}/CHANGELOG.md";
|
||||
description = "Language Server for YAML Files";
|
||||
|
Loading…
Reference in New Issue
Block a user