15 stdenv.mkDerivation (finalAttrs: {
16 pname = "typescript-language-server";
19 src = fetchFromGitHub {
20 owner = "typescript-language-server";
21 repo = "typescript-language-server";
22 rev = "v${finalAttrs.version}";
23 hash = "sha256-FCv0+tA7AuCdGeG6FEiMyRAHcl0WbezhNYLL7xp5FWU=";
28 src = ./default-fallbackTsserverPath.diff;
29 typescript = "${typescript}/lib/node_modules/typescript/lib/tsserver.js";
33 offlineCache = fetchYarnDeps {
34 yarnLock = "${finalAttrs.src}/yarn.lock";
35 hash = "sha256-nSMhPfbWD93sGIKehBBE/bh4RzHXFtGAjeyG20m/LWQ=";
49 export HOME=$(mktemp -d)
50 yarn config --offline set yarn-offline-mirror $offlineCache
51 fixup-yarn-lock yarn.lock
52 yarn --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive install
53 patchShebangs node_modules
69 yarn --offline --production install
71 mkdir -p "$out/lib/node_modules/typescript-language-server"
72 cp -r lib node_modules package.json "$out/lib/node_modules/typescript-language-server"
74 makeWrapper "${nodejs}/bin/node" "$out/bin/typescript-language-server" \
75 --add-flags "$out/lib/node_modules/typescript-language-server/lib/cli.mjs"
81 version = testers.testVersion {
82 package = finalAttrs.finalPackage;
87 changelog = "https://github.com/typescript-language-server/typescript-language-server/releases/tag/v${finalAttrs.version}";
88 description = "Language Server Protocol implementation for TypeScript using tsserver";
89 homepage = "https://github.com/typescript-language-server/typescript-language-server";
90 license = with lib.licenses; [ asl20 mit ];
91 mainProgram = "typescript-language-server";
92 maintainers = with lib.maintainers; [ marcel ];