mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-29 07:32:58 +00:00
bash-language-server: use pnpmWorkspace
This commit is contained in:
parent
875c9f044f
commit
a48987f2a3
@ -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 = ''
|
||||
|
Loading…
Reference in New Issue
Block a user