bash-language-server: use pnpmWorkspace

This commit is contained in:
Doron Behar 2024-07-03 20:47:15 +03:00
parent 875c9f044f
commit a48987f2a3

View File

@ -3,7 +3,6 @@
, fetchFromGitHub
, pnpm_8
, nodejs
, npmHooks
, makeBinaryWrapper
, shellcheck
}:
@ -19,26 +18,23 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-yJ81oGd9aNsWQMLvDSgMVVH1//Mw/SVFYFIPsJTQYzE=";
};
pnpmWorkspace = "bash-language-server";
pnpmDeps = pnpm_8.fetchDeps {
inherit (finalAttrs) pname version src;
inherit (finalAttrs) pname version src pnpmWorkspace;
hash = "sha256-W25xehcxncBs9QgQBt17F5YHK0b+GDEmt27XzTkyYWg=";
};
nativeBuildInputs = [
nodejs
pnpm_8.configHook
npmHooks.npmBuildHook
makeBinaryWrapper
];
npmBuildScript = "compile";
# We are only interested in the bash-language-server executable, which is
# part of the `./server` directory. From some reason, the `./vscode-client`
# directory is not included in upstream's `pnpm-workspace.yaml`, so perhaps
# that's why our ${pnpmDeps} don't include the dependencies required for it.
preBuild = ''
rm -r vscode-client
substituteInPlace tsconfig.json \
--replace-fail '{ "path": "./vscode-client" },' ""
buildPhase = ''
runHook preBuild
pnpm --filter=bash-language-server build
runHook postBuild
'';
installPhase = ''