9c6ee729d6
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
45 lines
1 KiB
Nix
45 lines
1 KiB
Nix
{ IOKit
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, fetchpatch
|
|
, lib
|
|
, stdenv
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "avalanchego";
|
|
version = "1.10.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ava-labs";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-aeO1rjKYoO6KF+oe0FKIa8D3j6G01uyC79OvUg9Qpfk=";
|
|
};
|
|
|
|
vendorHash = "sha256-Rh3S7Qy89ctsKlFz0lNNs8pZ5lHG5yB//DQzffD6eL8=";
|
|
# go mod vendor has a bug, see: https://github.com/golang/go/issues/57529
|
|
proxyVendor = true;
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ IOKit ];
|
|
|
|
subPackages = [ "main" ];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X github.com/ava-labs/avalanchego/version.GitCommit=${version}"
|
|
];
|
|
|
|
postInstall = ''
|
|
mv $out/bin/{main,${pname}}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
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}";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ urandom ];
|
|
};
|
|
}
|