nixpkgs/pkgs/applications/networking/cluster/karmor/default.nix
2023-03-11 11:54:14 +00:00

37 lines
1.0 KiB
Nix

{ buildGoModule, fetchFromGitHub, installShellFiles, lib }:
buildGoModule rec {
pname = "karmor";
version = "0.12.4";
src = fetchFromGitHub {
owner = "kubearmor";
repo = "kubearmor-client";
rev = "v${version}";
hash = "sha256-mz4RWKq3HNpxNl7i8wE1q2PoICUQrzTUSmyZII3GhS4=";
};
vendorHash = "sha256-Nxi6sNR7bDmeTcrg7Zx7UIqLvzNY6HK5qSSdfM2snj0=";
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 ];
};
}