depot/third_party/nixpkgs/pkgs/by-name/ku/kubectl-gadget/package.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

44 lines
1.2 KiB
Nix

{ lib, buildGoModule, fetchFromGitHub, kubectl-gadget, testers }:
buildGoModule rec {
pname = "kubectl-gadget";
version = "0.32.0";
src = fetchFromGitHub {
owner = "inspektor-gadget";
repo = "inspektor-gadget";
rev = "v${version}";
hash = "sha256-c6hy7B8zaU/LnTMAohc9KPzu1ocOVFJ9wL4GOIwxqkw=";
};
vendorHash = "sha256-7HfYCHxQUapDo33IAzxCp2iaL4G7oOqK0KyjqbmbR/w=";
CGO_ENABLED = 0;
ldflags = [
"-s" "-w"
"-X github.com/inspektor-gadget/inspektor-gadget/internal/version.version=v${version}"
"-X main.gadgetimage=ghcr.io/inspektor-gadget/inspektor-gadget:v${version}"
"-extldflags=-static"
];
tags = [
"withoutebpf"
];
subPackages = [ "cmd/kubectl-gadget" ];
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}";
};
meta = with lib; {
description = "Collection of gadgets for troubleshooting Kubernetes applications using eBPF";
mainProgram = "kubectl-gadget";
homepage = "https://inspektor-gadget.io";
license = licenses.asl20;
maintainers = with maintainers; [ kranurag7 devusb ];
};
}