depot/third_party/nixpkgs/pkgs/servers/misc/gobgpd/default.nix

41 lines
782 B
Nix
Raw Normal View History

{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "gobgpd";
version = "3.17.0";
src = fetchFromGitHub {
owner = "osrg";
repo = "gobgp";
rev = "refs/tags/v${version}";
hash = "sha256-LpQMRn0mINhixbS8GpYAqr0pjwbnQdUOs2BH3rkQ3hU=";
};
vendorHash = "sha256-Z7vYpDQIKc4elVBLiGtxF3D9pec4QNvWFLpux/29t1Y=";
postConfigure = ''
export CGO_ENABLED=0
'';
ldflags = [
"-s"
"-w"
"-extldflags '-static'"
];
subPackages = [
"cmd/gobgpd"
];
meta = with lib; {
description = "BGP implemented in Go";
homepage = "https://osrg.github.io/gobgp/";
changelog = "https://github.com/osrg/gobgp/releases/tag/v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ higebu ];
};
}