1 { lib, buildGoModule, fetchFromGitHub, kubectl-gadget, testers }:
4 pname = "kubectl-gadget";
7 src = fetchFromGitHub {
8 owner = "inspektor-gadget";
9 repo = "inspektor-gadget";
11 hash = "sha256-bPpjaJcMX9kv+9p6trHKXJ2kj78zhGYdHnXnfYW3WcY=";
14 vendorHash = "sha256-kYMckPdnS3rkuzRPEflRholHW2zfXyDomTb93J5z0aI=";
20 "-X github.com/inspektor-gadget/inspektor-gadget/internal/version.version=v${version}"
21 "-X main.gadgetimage=ghcr.io/inspektor-gadget/inspektor-gadget:v${version}"
29 subPackages = [ "cmd/kubectl-gadget" ];
31 passthru.tests.version = testers.testVersion {
32 package = kubectl-gadget;
33 command = "kubectl-gadget version || true"; # mask non-zero return code if no kubeconfig present
34 version = "v${version}";
38 description = "Collection of gadgets for troubleshooting Kubernetes applications using eBPF";
39 mainProgram = "kubectl-gadget";
40 homepage = "https://inspektor-gadget.io";
41 license = licenses.asl20;
42 maintainers = with maintainers; [ kranurag7 devusb ];