typescript-go: sync buildGoModule in updateScript, 0-unstable-2026-02-11 -> 0-unstable-2026-04-08 (#490934)

This commit is contained in:
Peder Bergebakken Sundt
2026-04-10 21:47:55 +00:00
committed by GitHub
+38 -9
View File
@@ -1,26 +1,31 @@
{
lib,
buildGo125Module,
buildGo126Module,
fetchFromGitHub,
_experimental-update-script-combinators,
nix-update-script,
writeShellApplication,
nix,
gnugrep,
gnused,
}:
let
buildGoModule = buildGo125Module;
buildGoModule = buildGo126Module;
in
buildGoModule {
pname = "typescript-go";
version = "0-unstable-2026-02-11";
version = "0-unstable-2026-04-08";
src = fetchFromGitHub {
owner = "microsoft";
repo = "typescript-go";
rev = "08cb84c68ae83b9def5e0132e05362e5061342ab";
hash = "sha256-IvR7zHSl7kUmamQkGGrzdKJrdypnQe2a0X1YUyRYYTU=";
rev = "2a5e1cf9fe2261f2ad56871a6d2ed12d6ac34083";
hash = "sha256-vG53leoltVF7jXnf7AJRUIkbytqsqheoKG7bt7oB/h4=";
fetchSubmodules = false;
};
vendorHash = "sha256-QNKXJ9HA8WlLlTxflLt0a/Y2Lt8NG1AnNmBOESYFyRI=";
vendorHash = "sha256-YmKVn9fc7dKMBiXnutI15mg/BFCyvyXntr7QaxJ7qU8=";
ldflags = [
"-s"
@@ -44,9 +49,33 @@ buildGoModule {
'';
passthru = {
updateScript = nix-update-script {
extraArgs = [ "--version=branch" ];
};
updateScript = _experimental-update-script-combinators.sequence [
(nix-update-script {
extraArgs = [
"--version=branch"
"--src-only"
];
})
(lib.getExe (writeShellApplication {
name = "typescript-go-go-version-updater";
runtimeInputs = [
nix
gnugrep
gnused
];
text = ''
new_src="$(nix-build --attr 'pkgs.typescript-go.src' --no-out-link)"
new_go_major_minor="$(grep --only-matching --perl-regexp '^go \K([0-9]+\.[0-9]+)' "$new_src/go.mod")"
sed -i -E "s/buildGo[0-9]+Module/buildGo''${new_go_major_minor//./}Module/g" '${toString ./package.nix}'
'';
}))
# Update vendorHash
(nix-update-script {
extraArgs = [ "--version=skip" ];
})
];
};
meta = {