lib.packagesFromDirectoryRecursive: Improved documentation (#359898)
[NixPkgs.git] / pkgs / by-name / av / avalanchego / package.nix
blobc80180fc56216ec7c4baa91ab2a18e9a93f3d2ac
2   buildGoModule,
3   fetchFromGitHub,
4   lib,
5   nix-update-script,
6   stdenv,
7 }:
9 buildGoModule rec {
10   pname = "avalanchego";
11   version = "1.12.0-initial-poc.6";
13   src = fetchFromGitHub {
14     owner = "ava-labs";
15     repo = "avalanchego";
16     rev = "refs/tags/v${version}";
17     hash = "sha256-LBwmoegsBWC2xlTc3BJDxyYX58b+X7g5xl9vnThVHW0=";
18   };
20   # https://github.com/golang/go/issues/57529
21   proxyVendor = true;
23   vendorHash = "sha256-slu0f0Y33aGuVpN5pZcRp9RJAXcLnZyUNO7pFdm+HrY=";
26   subPackages = [ "main" ];
28   ldflags = [
29     "-s"
30     "-w"
31     "-X github.com/ava-labs/avalanchego/version.GitCommit=${version}"
32   ];
34   postInstall = ''
35     mv $out/bin/{main,${pname}}
36   '';
38   passthru.updateScript = nix-update-script { };
40   meta = {
41     description = "Go implementation of an Avalanche node";
42     homepage = "https://github.com/ava-labs/avalanchego";
43     changelog = "https://github.com/ava-labs/avalanchego/releases/tag/v${version}";
44     license = lib.licenses.bsd3;
45     maintainers = with lib.maintainers; [
46       urandom
47       qjoly
48     ];
49     mainProgram = "avalanchego";
50   };