Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 39 lines 721 B view raw
1{ 2 buildGoModule, 3 fetchFromGitHub, 4 lib, 5}: 6 7buildGoModule rec { 8 pname = "gobgp"; 9 version = "3.37.0"; 10 11 src = fetchFromGitHub { 12 owner = "osrg"; 13 repo = "gobgp"; 14 rev = "v${version}"; 15 sha256 = "sha256-Nh4JmyZHrT7uPi9+CbmS3h6ezKoicCvEByUJVULMac4="; 16 }; 17 18 vendorHash = "sha256-HpATJztX31mNWkpeDqOE4rTzhCk3c7E1PtZnKW8Axyo="; 19 20 postConfigure = '' 21 export CGO_ENABLED=0 22 ''; 23 24 ldflags = [ 25 "-s" 26 "-w" 27 "-extldflags '-static'" 28 ]; 29 30 subPackages = [ "cmd/gobgp" ]; 31 32 meta = with lib; { 33 description = "CLI tool for GoBGP"; 34 homepage = "https://osrg.github.io/gobgp/"; 35 license = licenses.asl20; 36 maintainers = with maintainers; [ higebu ]; 37 mainProgram = "gobgp"; 38 }; 39}