8 angular-language-server,
11 common-updater-scripts,
15 stdenvNoCC.mkDerivation (finalAttrs: {
16 pname = "angular-language-server";
19 name = "angular-language-server-${finalAttrs.version}.zip";
20 url = "https://github.com/angular/vscode-ng-language-service/releases/download/v${finalAttrs.version}/ng-template.vsix";
21 hash = "sha256-rl04nqSSBMjZfPW8Y+UtFLFLDFd5FSxJs3S937mhDWE=";
29 buildInputs = [ nodejs ];
33 install -Dm755 server/bin/ngserver $out/lib/bin/ngserver
34 install -Dm755 server/index.js $out/lib/index.js
35 cp -r node_modules $out/lib/node_modules
40 patchShebangs $out/lib/bin/ngserver $out/lib/index.js $out/lib/node_modules
41 makeWrapper $out/lib/bin/ngserver $out/bin/ngserver \
42 --prefix PATH : ${lib.makeBinPath [ nodejs ]} \
43 --add-flags "--tsProbeLocations $out/lib/node_modules --ngProbeLocations $out/lib/node_modules"
48 start-ok = runCommand "${finalAttrs.pname}-test" { } ''
49 ${lib.getExe angular-language-server} --stdio --help &> $out
50 cat $out | grep "Angular Language Service that implements the Language Server Protocol (LSP)"
54 updateScript = lib.getExe (writeShellApplication {
55 name = "update-angular-language-server";
58 common-updater-scripts
61 if [ -z "''${GITHUB_TOKEN:-}" ]; then
62 echo "no GITHUB_TOKEN provided - you could meet API request limiting" >&2
65 LATEST_VERSION=$(curl -H "Accept: application/vnd.github+json" \
66 ''${GITHUB_TOKEN:+-H "Authorization: bearer $GITHUB_TOKEN"} \
67 -Lsf https://api.github.com/repos/angular/vscode-ng-language-service/releases/latest | \
68 jq -r .tag_name | cut -c 2-)
69 update-source-version angular-language-server "$LATEST_VERSION"
75 description = "LSP for angular completions, AOT diagnostic, quick info and go to definitions";
76 homepage = "https://github.com/angular/vscode-ng-language-service";
77 sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
78 changelog = "https://github.com/angular/vscode-ng-language-service/blob/${finalAttrs.version}/CHANGELOG.md";
79 license = lib.licenses.mit;
80 platforms = lib.platforms.unix;
81 mainProgram = "ngserver";
82 maintainers = with lib.maintainers; [ tricktron ];