1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-17 11:10:03 +00:00

netfetch: init at 5.2.10 (#338698)

This commit is contained in:
Aleksana 2024-09-04 10:55:57 +08:00 committed by GitHub
commit 3d4d6c6149
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 54 additions and 0 deletions

View file

@ -2255,6 +2255,12 @@
githubId = 80325;
name = "Benjamin Andresen";
};
banh-canh = {
email = "vhvictorhang@gmail.com";
github = "Banh-Canh";
githubId = 66330398;
name = "Victor Hang";
};
barab-i = {
email = "barab_i@outlook.com";
github = "barab-i";

View file

@ -0,0 +1,48 @@
{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
stdenv,
}:
buildGoModule rec {
pname = "netfetch";
version = "5.2.10";
src = fetchFromGitHub {
owner = "deggja";
repo = "netfetch";
rev = "refs/tags/${version}";
hash = "sha256-N3wKpWdG92cXH0TwAkcsld9TRrfPRkbw0uZY/X4d+xk=";
};
vendorHash = "sha256-/Em3hx5tiQjThLBPJDHGsqxUV3eXeymJ5pY9c601OW0=";
proxyVendor = true;
subPackages = [ "backend" ];
ldflags = [
"-s"
"-w"
"-X github.com/deggja/netfetch/backend/cmd.Version=${version}"
];
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
mv $out/bin/backend $out/bin/$pname
installShellCompletion --cmd $pname \
--bash <($out/bin/$pname completion bash) \
--fish <($out/bin/$pname completion fish) \
--zsh <($out/bin/$pname completion zsh)
'';
meta = {
homepage = "https://github.com/deggja/netfetch";
description = "Kubernetes tool for scanning clusters for network policies and identifying unprotected workloads";
license = lib.licenses.mit;
mainProgram = "netfetch";
maintainers = with lib.maintainers; [ banh-canh ];
};
}