nix: fish-lsp

This commit is contained in:
Primrose 2024-07-06 12:13:48 +02:00
parent 82ae8521d3
commit 138a1ad65d
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
3 changed files with 45 additions and 5 deletions

View file

@ -0,0 +1,42 @@
{
fetchFromGitHub,
mkYarnPackage,
fetchYarnDeps,
nodejs,
fish,
fixup-yarn-lock,
}:
mkYarnPackage rec {
pname = "fish-lsp";
version = "1.0.7";
src = fetchFromGitHub {
owner = "ndonfris";
repo = pname;
rev = "v${version}";
sha256 = "sha256-Np7ELQxHqSnkzVkASYSyO9cTiO1yrakDuK88kkACNAI=";
};
offlineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
hash = "sha256-hmaLWO1Sj+2VujrGD2A+COfVE2D+tCnxyojjq1512K4=";
};
nativeBuildInputs = [
fixup-yarn-lock
fish
nodejs
];
buildPhase = ''
runHook preBuild
wasm_file=$(find node_modules -type f -a -name tree-sitter-fish.wasm)
cp -f $wasm_file ./deps/fish-lsp
yarn run sh:build-time
yarn --offline compile
yarn run sh:relink
# yarn run sh:build-completions
runHook postBuild
'';
}