From 94c11d33343df7772a83388bc0c4f5fb7da8559f Mon Sep 17 00:00:00 2001 From: Anurag Date: Mon, 20 Mar 2023 15:32:25 +0530 Subject: [PATCH] kubectl-gadget: init at 0.14.0 Signed-off-by: Anurag --- maintainers/maintainer-list.nix | 2 +- .../cluster/kubectl-gadget/default.nix | 30 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 pkgs/applications/networking/cluster/kubectl-gadget/default.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 19474bd4bbd8..0635961375ef 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -8189,7 +8189,7 @@ kranurag7 = { email = "contact.anurag7@gmail.com"; github = "kranurag7"; - githubId = "81210977"; + githubId = 81210977; name = "Anurag"; }; kranzes = { diff --git a/pkgs/applications/networking/cluster/kubectl-gadget/default.nix b/pkgs/applications/networking/cluster/kubectl-gadget/default.nix new file mode 100644 index 000000000000..f6642588a939 --- /dev/null +++ b/pkgs/applications/networking/cluster/kubectl-gadget/default.nix @@ -0,0 +1,30 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "kubectl-gadget"; + version = "0.14.0"; + + src = fetchFromGitHub { + owner = "inspektor-gadget"; + repo = "inspektor-gadget"; + rev = "v${version}"; + hash = "sha256:16i9biyvzkpgxyfb41afaarnlm59vy02nspln5zq69prg6mp8rwa"; + }; + + vendorHash = "sha256-Kj8gP5393++nPeX38TX6duB9OO/ql7hpRA5gTTtTl+M="; + + CGO_ENABLED = 0; + + ldflags = [ + "-X main.version=v${version}" + ]; + + subPackages = [ "cmd/kubectl-gadget" ]; + + meta = with lib; { + description = "A collection of gadgets for troubleshooting Kubernetes applications using eBPF"; + homepage = "https://inspektor-gadget.io"; + license = licenses.asl20; + maintainers = with maintainers; [ kranurag7 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 298703f74cd2..43a4ce86ea59 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -31218,6 +31218,8 @@ with pkgs; kubectl-example = callPackage ../applications/networking/cluster/kubectl-example { }; + kubectl-gadget = callPackage ../applications/networking/cluster/kubectl-gadget { }; + kubectl-images = callPackage ../applications/networking/cluster/kubectl-images { }; kubectl-node-shell = callPackage ../applications/networking/cluster/kubectl-node-shell { };