avalanchego: fix build & 1.12.1 -> 1.13.0 (#411802)

This commit is contained in:
Gaétan Lepage 2025-06-08 10:41:25 +02:00 committed by GitHub
commit 4aaa94e14a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,37 +1,36 @@
{
buildGoModule,
buildGo123Module,
fetchFromGitHub,
lib,
nix-update-script,
stdenv,
}:
buildGoModule rec {
buildGo123Module (finalAttrs: {
pname = "avalanchego";
version = "1.12.1";
version = "1.13.0";
src = fetchFromGitHub {
owner = "ava-labs";
repo = "avalanchego";
tag = "v${version}";
hash = "sha256-elbY0KNsOmKSTX61nps2tjIFTJH5Nnqmwq6mWwd88aE=";
tag = "v${finalAttrs.version}";
hash = "sha256-t6KruPHt51wJ4aJaCG/8tuwKYtaifHvQ3z9oVknNS4E=";
};
# https://github.com/golang/go/issues/57529
proxyVendor = true;
vendorHash = "sha256-HRhgnf6vHBrJTHspH+HwR3g5o63i+dCm7kPuBKdSV8s=";
vendorHash = "sha256-iyx9k8mPPOwpHo9lEdNPf0sQHxbKbNTVLUZrPYY8dWM=";
subPackages = [ "main" ];
ldflags = [
"-s"
"-w"
"-X github.com/ava-labs/avalanchego/version.GitCommit=${version}"
"-X github.com/ava-labs/avalanchego/version.GitCommit=${finalAttrs.version}"
];
postInstall = ''
mv $out/bin/{main,${pname}}
mv $out/bin/{main,avalanchego}
'';
passthru.updateScript = nix-update-script { };
@ -39,7 +38,7 @@ buildGoModule rec {
meta = {
description = "Go implementation of an Avalanche node";
homepage = "https://github.com/ava-labs/avalanchego";
changelog = "https://github.com/ava-labs/avalanchego/releases/tag/v${version}";
changelog = "https://github.com/ava-labs/avalanchego/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [
urandom
@ -47,4 +46,4 @@ buildGoModule rec {
];
mainProgram = "avalanchego";
};
}
})