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