3
0
Fork 0
forked from mirrors/nixpkgs

kubeshark: init at 38.5

This commit is contained in:
Bryan A. S 2023-02-09 06:55:52 -03:00
parent 4777331203
commit 0fcc1b8ef8
2 changed files with 62 additions and 0 deletions

View file

@ -0,0 +1,60 @@
{ stdenv, lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, kubeshark, nix-update-script }:
buildGoModule rec {
pname = "kubeshark";
version = "38.5";
src = fetchFromGitHub {
owner = "kubeshark";
repo = "kubeshark";
rev = version;
sha256 = "sha256-xu+IcmYNsFBYhb0Grnqyi31LCG/3XhSh1LH8XakQ3Yk=";
};
vendorHash = "sha256-o04XIUsHNqOBkvcejASHNz1HDnV6F9t+Q2Hg8eL/Uoc=";
ldflags = let t = "github.com/kubeshark/kubeshark"; in [
"-s" "-w"
"-X ${t}/misc.GitCommitHash=${src.rev}"
"-X ${t}/misc.Branch=master"
"-X ${t}/misc.BuildTimestamp=0"
"-X ${t}/misc.Platform=unknown"
"-X ${t}/misc.Ver=${version}"
];
nativeBuildInputs = [ installShellFiles ];
checkPhase = ''
go test ./...
'';
doCheck = true;
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
installShellCompletion --cmd kubeshark \
--bash <($out/bin/kubeshark completion bash) \
--fish <($out/bin/kubeshark completion fish) \
--zsh <($out/bin/kubeshark completion zsh)
'';
passthru = {
tests.version = testers.testVersion {
package = kubeshark;
command = "kubeshark version";
inherit version;
};
updateScript = nix-update-script { };
};
meta = with lib; {
changelog = "https://github.com/kubeshark/kubeshark/releases/tag/${version}";
description = "The API Traffic Viewer for Kubernetes";
homepage = "https://kubeshark.co/";
license = licenses.asl20;
longDescription = ''
The API traffic viewer for Kubernetes providing real-time, protocol-aware visibility into Kubernetes internal network,
Think TCPDump and Wireshark re-invented for Kubernetes
capturing, dissecting and monitoring all traffic and payloads going in, out and across containers, pods, nodes and clusters.
'';
maintainers = with maintainers; [ bryanasdev000 ];
};
}

View file

@ -8843,6 +8843,8 @@ with pkgs;
kubepug = callPackage ../development/tools/kubepug { };
kubeshark = callPackage ../applications/networking/cluster/kubeshark { };
kubergrunt = callPackage ../applications/networking/cluster/kubergrunt { };
kubo = callPackage ../applications/networking/kubo { };