diff options
Diffstat (limited to 'pkgs/tools/networking/gobgp/default.nix')
-rw-r--r-- | pkgs/tools/networking/gobgp/default.nix | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/tools/networking/gobgp/default.nix b/pkgs/tools/networking/gobgp/default.nix new file mode 100644 index 0000000000000..8c0e093f9dd1c --- /dev/null +++ b/pkgs/tools/networking/gobgp/default.nix @@ -0,0 +1,33 @@ +{ buildGoModule, fetchFromGitHub, lib }: + +buildGoModule rec { + pname = "gobgp"; + version = "2.23.0"; + + src = fetchFromGitHub { + owner = "osrg"; + repo = "gobgp"; + rev = "v${version}"; + sha256 = "0r7w1c3rh0wnsrhdpzr2fp1aqdqafrb42f2hra6xwwspr092ixq0"; + }; + + vendorSha256 = "0dmd4r6x76jn8pyvp47x4llzc2wij5m9lchgyaagcb5sfdgbns9x"; + + postConfigure = '' + export CGO_ENABLED=0 + ''; + + buildFlagsArray = '' + -ldflags= + -s -w -extldflags '-static' + ''; + + subPackages = [ "cmd/gobgp" ]; + + meta = with lib; { + description = "A CLI tool for GoBGP"; + homepage = "https://osrg.github.io/gobgp/"; + license = licenses.asl20; + maintainers = with maintainers; [ higebu ]; + }; +} |