2024-10-26 13:24:23 +00:00
|
|
|
{
|
|
|
|
buildGoModule,
|
|
|
|
fetchFromGitHub,
|
|
|
|
lib,
|
2024-10-26 13:30:28 +00:00
|
|
|
nix-update-script,
|
2024-10-26 13:24:23 +00:00
|
|
|
stdenv,
|
2022-12-30 16:45:09 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "avalanchego";
|
2024-10-26 13:30:28 +00:00
|
|
|
version = "1.12.0-initial-poc.6";
|
2022-12-30 16:45:09 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ava-labs";
|
2024-10-26 13:30:28 +00:00
|
|
|
repo = "avalanchego";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-LBwmoegsBWC2xlTc3BJDxyYX58b+X7g5xl9vnThVHW0=";
|
2022-12-30 16:45:09 +00:00
|
|
|
};
|
|
|
|
|
2024-10-26 13:30:28 +00:00
|
|
|
# https://github.com/golang/go/issues/57529
|
2022-12-30 16:45:09 +00:00
|
|
|
proxyVendor = true;
|
|
|
|
|
2024-10-26 13:30:28 +00:00
|
|
|
vendorHash = "sha256-slu0f0Y33aGuVpN5pZcRp9RJAXcLnZyUNO7pFdm+HrY=";
|
|
|
|
|
2022-12-30 16:45:09 +00:00
|
|
|
|
|
|
|
subPackages = [ "main" ];
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/ava-labs/avalanchego/version.GitCommit=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/{main,${pname}}
|
|
|
|
'';
|
|
|
|
|
2024-10-26 13:30:28 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
|
|
|
meta = {
|
2022-12-30 16:45:09 +00:00
|
|
|
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}";
|
2024-10-26 13:30:28 +00:00
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = with lib.maintainers; [
|
2024-10-26 13:24:23 +00:00
|
|
|
urandom
|
|
|
|
qjoly
|
|
|
|
];
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "avalanchego";
|
2022-12-30 16:45:09 +00:00
|
|
|
};
|
|
|
|
}
|