2023-01-07 22:07:32 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
2024-08-17 22:29:43 +00:00
|
|
|
, nixosTests
|
2023-01-07 22:07:32 +00:00
|
|
|
}:
|
2021-04-09 14:56:31 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "gobgpd";
|
2024-10-03 05:30:08 +00:00
|
|
|
version = "3.30.0";
|
2021-04-09 14:56:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "osrg";
|
|
|
|
repo = "gobgp";
|
2023-01-07 22:07:32 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-10-03 05:30:08 +00:00
|
|
|
hash = "sha256-UB3LYXRr6GnqVCRwAxnwqBCkOtor3mC4k73kPesZs0g=";
|
2021-04-09 14:56:31 +00:00
|
|
|
};
|
|
|
|
|
2024-10-03 05:30:08 +00:00
|
|
|
vendorHash = "sha256-FYLH1Ej8Bm0+tS5Ikj1CPF+1t5opmzee8iHRZSW94Yk=";
|
2021-04-09 14:56:31 +00:00
|
|
|
|
|
|
|
postConfigure = ''
|
|
|
|
export CGO_ENABLED=0
|
|
|
|
'';
|
|
|
|
|
2021-08-26 06:45:51 +00:00
|
|
|
ldflags = [
|
2023-01-07 22:07:32 +00:00
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-extldflags '-static'"
|
2021-08-26 06:45:51 +00:00
|
|
|
];
|
2021-04-09 14:56:31 +00:00
|
|
|
|
2023-01-07 22:07:32 +00:00
|
|
|
subPackages = [
|
|
|
|
"cmd/gobgpd"
|
|
|
|
];
|
2021-04-09 14:56:31 +00:00
|
|
|
|
2024-08-17 22:29:43 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) gobgpd; };
|
|
|
|
|
2021-04-09 14:56:31 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "BGP implemented in Go";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "gobgpd";
|
2021-04-09 14:56:31 +00:00
|
|
|
homepage = "https://osrg.github.io/gobgp/";
|
|
|
|
changelog = "https://github.com/osrg/gobgp/releases/tag/v${version}";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ higebu ];
|
|
|
|
};
|
|
|
|
}
|