depot/third_party/nixpkgs/pkgs/applications/networking/avalanchego/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

45 lines
1 KiB
Nix

{ IOKit
, buildGoModule
, fetchFromGitHub
, fetchpatch
, lib
, stdenv
}:
buildGoModule rec {
pname = "avalanchego";
version = "1.10.11";
src = fetchFromGitHub {
owner = "ava-labs";
repo = pname;
rev = "v${version}";
hash = "sha256-6eebc8+SsonTngOIM5C+cxqzhFSLK5wLB/sBhVQuTQ4=";
};
vendorHash = "sha256-sBoH/0SQtHO/fgyfve4bpy74GIS8qWr6KcIQyOnkgkI=";
# 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 qjoly ];
};
}