@@ -0,0 +1,33 @@
1+{ buildGoModule, fetchFromGitHub, lib }:
2+
3+buildGoModule rec {
4+ pname = "gobgp";
5+ version = "2.23.0";
6+
7+ src = fetchFromGitHub {
8+ owner = "osrg";
9+ repo = "gobgp";
10+ rev = "v${version}";
11+ sha256 = "0r7w1c3rh0wnsrhdpzr2fp1aqdqafrb42f2hra6xwwspr092ixq0";
12+ };
13+
14+ vendorSha256 = "0dmd4r6x76jn8pyvp47x4llzc2wij5m9lchgyaagcb5sfdgbns9x";
15+
16+ postConfigure = ''
17+ export CGO_ENABLED=0
18+ '';
19+
20+ buildFlagsArray = ''
21+ -ldflags=
22+ -s -w -extldflags '-static'
23+ '';
24+
25+ subPackages = [ "cmd/gobgp" ];
26+
27+ meta = with lib; {
28+ description = "A CLI tool for GoBGP";
29+ homepage = "https://osrg.github.io/gobgp/";
30+ license = licenses.asl20;
31+ maintainers = with maintainers; [ higebu ];
32+ };
33+}