nixpkgs/pkgs/by-name/go/gobgpd/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
877 B
Nix
Raw Normal View History

2023-01-07 22:07:32 +00:00
{ lib
, buildGoModule
, fetchFromGitHub
, 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
passthru.tests = { inherit (nixosTests) gobgpd; };
2021-04-09 14:56:31 +00:00
meta = with lib; {
description = "BGP implemented in Go";
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 ];
};
}