2024-09-19 14:19:46 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, kubectl-gadget, testers }:
|
2023-03-24 00:07:29 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "kubectl-gadget";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.32.0";
|
2023-03-24 00:07:29 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "inspektor-gadget";
|
|
|
|
repo = "inspektor-gadget";
|
|
|
|
rev = "v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-c6hy7B8zaU/LnTMAohc9KPzu1ocOVFJ9wL4GOIwxqkw=";
|
2023-03-24 00:07:29 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
vendorHash = "sha256-7HfYCHxQUapDo33IAzxCp2iaL4G7oOqK0KyjqbmbR/w=";
|
2023-03-24 00:07:29 +00:00
|
|
|
|
|
|
|
CGO_ENABLED = 0;
|
|
|
|
|
|
|
|
ldflags = [
|
2023-04-12 12:48:02 +00:00
|
|
|
"-s" "-w"
|
2024-06-05 15:53:02 +00:00
|
|
|
"-X github.com/inspektor-gadget/inspektor-gadget/internal/version.version=v${version}"
|
2024-04-21 15:54:59 +00:00
|
|
|
"-X main.gadgetimage=ghcr.io/inspektor-gadget/inspektor-gadget:v${version}"
|
2023-04-12 12:48:02 +00:00
|
|
|
"-extldflags=-static"
|
|
|
|
];
|
|
|
|
|
|
|
|
tags = [
|
|
|
|
"withoutebpf"
|
2023-03-24 00:07:29 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
subPackages = [ "cmd/kubectl-gadget" ];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = kubectl-gadget;
|
|
|
|
command = "kubectl-gadget version || true"; # mask non-zero return code if no kubeconfig present
|
|
|
|
version = "v${version}";
|
|
|
|
};
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Collection of gadgets for troubleshooting Kubernetes applications using eBPF";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "kubectl-gadget";
|
2023-03-24 00:07:29 +00:00
|
|
|
homepage = "https://inspektor-gadget.io";
|
|
|
|
license = licenses.asl20;
|
2024-04-21 15:54:59 +00:00
|
|
|
maintainers = with maintainers; [ kranurag7 devusb ];
|
2023-03-24 00:07:29 +00:00
|
|
|
};
|
|
|
|
}
|