depot/third_party/nixpkgs/pkgs/tools/networking/netassert/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

41 lines
1.2 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "netassert";
version = "2.0.3";
src = fetchFromGitHub {
owner = "controlplaneio";
repo = "netassert";
rev = "v${version}";
hash = "sha256-mRKjo0AfnM+XTl7sQoGDyQoquXpD3xPJ6i3/3Dj2rhE=";
};
vendorHash = "sha256-9mvSfAd1m95eRwljGG68+tjiFObgt1EuakjwFfn9Obo=";
ldflags = [
"-s"
"-w"
"-X main.version=${src.rev}"
];
postBuild = ''
mv $GOPATH/bin/{cli,netassert}
'';
meta = with lib; {
homepage = "https://github.com/controlplaneio/netassert";
changelog = "https://github.com/controlplaneio/netassert/blob/${src.rev}/CHANGELOG.md";
description = "Command line utility to test network connectivity between kubernetes objects";
longDescription = ''
NetAssert is a command line utility to test network connectivity between kubernetes objects.
It currently supports Deployment, Pod, Statefulset and Daemonset.
You can check the traffic flow between these objects or from these objects to a remote host or an IP address.
'';
license = licenses.asl20;
maintainers = with maintainers; [ jk ];
mainProgram = "netassert";
};
}