From 37cee940fb6189f93930800d9cddfe0ef75c72f8 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Thu, 9 Jul 2026 01:06:00 +0900 Subject: [PATCH] typescript-go: 0-unstable-2026-06-25 -> 7.0.2 Diff: https://github.com/microsoft/typescript-go/compare/c080da62e73c5ea066b381303c74ae00b53368ac...typescript/v7.0.2 Changelog: https://github.com/microsoft/typescript-go/releases/tag/typescript/v7.0.2 --- pkgs/by-name/ty/typescript-go/package.nix | 34 ++++++++++++----------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/pkgs/by-name/ty/typescript-go/package.nix b/pkgs/by-name/ty/typescript-go/package.nix index 6c5ff963c216..dedb43a35802 100644 --- a/pkgs/by-name/ty/typescript-go/package.nix +++ b/pkgs/by-name/ty/typescript-go/package.nix @@ -3,6 +3,7 @@ buildGo126Module, fetchFromGitHub, _experimental-update-script-combinators, + versionCheckHook, nix-update-script, writeShellApplication, nix, @@ -13,19 +14,19 @@ let buildGoModule = buildGo126Module; in -buildGoModule { +buildGoModule (finalAttrs: { pname = "typescript-go"; - version = "0-unstable-2026-06-25"; + version = "7.0.2"; src = fetchFromGitHub { owner = "microsoft"; repo = "typescript-go"; - rev = "c080da62e73c5ea066b381303c74ae00b53368ac"; - hash = "sha256-B8CktiQg+JJKE6Lb19LgpAluXI2+ubo5dikEhQQxDs8="; + tag = "typescript/v${finalAttrs.version}"; + hash = "sha256-fRejdQSwaxSS2pjHrbJO2CQgZS5lWJmBNEM/TgbJTJ8="; fetchSubmodules = false; }; - vendorHash = "sha256-RKlkRodWH6DaAi1CZziBgIOfzFLm8aih+a0kHNekf5U="; + vendorHash = "sha256-q6dMb2ab4uZ3GTrcA7v2JzfmOM+ZzBcJN6gKOpLfM/k="; ldflags = [ "-s" @@ -38,21 +39,21 @@ buildGoModule { "cmd/tsgo" ]; - doInstallCheck = true; - installCheckPhase = '' - runHook preInstallCheck - - version="$("$out/bin/tsgo" --version)" - [[ "$version" == *"7.0.0"* ]] - - runHook postInstallCheck + postInstall = '' + ln -s "$out/bin/tsgo" "$out/bin/tsc" ''; + nativeInstallCheckInputs = [ + versionCheckHook + ]; + doInstallCheck = true; + passthru = { updateScript = _experimental-update-script-combinators.sequence [ (nix-update-script { extraArgs = [ - "--version=branch" + "--use-github-releases" + "--version-regex=^typescript/v([\\d.]+)$" "--src-only" ]; }) @@ -81,10 +82,11 @@ buildGoModule { meta = { description = "Go implementation of TypeScript"; homepage = "https://github.com/microsoft/typescript-go"; + changelog = "https://github.com/microsoft/typescript-go/releases/tag/typescript/v${finalAttrs.version}"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ kachick ]; - mainProgram = "tsgo"; + mainProgram = "tsc"; }; -} +})