2023-01-03 22:27:23 +00:00
|
|
|
{ buildGoModule, fetchFromGitHub, installShellFiles, lib }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "karmor";
|
2023-02-25 11:17:17 +00:00
|
|
|
version = "0.11.7";
|
2023-01-03 22:27:23 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kubearmor";
|
|
|
|
repo = "kubearmor-client";
|
|
|
|
rev = "v${version}";
|
2023-02-25 11:17:17 +00:00
|
|
|
hash = "sha256-sXiv+aCYuN6GJB+6/G4Z1Oe/fB3OO+jhSvCAFUaiD3g=";
|
2023-01-03 22:27:23 +00:00
|
|
|
};
|
|
|
|
|
2023-02-25 11:17:17 +00:00
|
|
|
vendorHash = "sha256-9yCT9GspX2Tl6dISF8qvDF/Tm2mfwuDH+DrouFmxpj8=";
|
2023-01-03 22:27:23 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
# integration tests require network access
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/{kubearmor-client,karmor}
|
|
|
|
installShellCompletion --cmd karmor \
|
|
|
|
--bash <($out/bin/karmor completion bash) \
|
|
|
|
--fish <($out/bin/karmor completion fish) \
|
|
|
|
--zsh <($out/bin/karmor completion zsh)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A client tool to help manage KubeArmor";
|
|
|
|
homepage = "https://kubearmor.io";
|
|
|
|
changelog = "https://github.com/kubearmor/kubearmor-client/releases/v${version}";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ urandom ];
|
|
|
|
};
|
|
|
|
}
|