472aeafc57
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
44 lines
877 B
Nix
44 lines
877 B
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, nixosTests
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "gobgpd";
|
|
version = "3.30.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "osrg";
|
|
repo = "gobgp";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-UB3LYXRr6GnqVCRwAxnwqBCkOtor3mC4k73kPesZs0g=";
|
|
};
|
|
|
|
vendorHash = "sha256-FYLH1Ej8Bm0+tS5Ikj1CPF+1t5opmzee8iHRZSW94Yk=";
|
|
|
|
postConfigure = ''
|
|
export CGO_ENABLED=0
|
|
'';
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-extldflags '-static'"
|
|
];
|
|
|
|
subPackages = [
|
|
"cmd/gobgpd"
|
|
];
|
|
|
|
passthru.tests = { inherit (nixosTests) gobgpd; };
|
|
|
|
meta = with lib; {
|
|
description = "BGP implemented in Go";
|
|
mainProgram = "gobgpd";
|
|
homepage = "https://osrg.github.io/gobgp/";
|
|
changelog = "https://github.com/osrg/gobgp/releases/tag/v${version}";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ higebu ];
|
|
};
|
|
}
|