diff --git a/pkgs/applications/networking/cluster/karmor/default.nix b/pkgs/applications/networking/cluster/karmor/default.nix new file mode 100644 index 000000000000..220d38c36f80 --- /dev/null +++ b/pkgs/applications/networking/cluster/karmor/default.nix @@ -0,0 +1,36 @@ +{ buildGoModule, fetchFromGitHub, installShellFiles, lib }: + +buildGoModule rec { + pname = "karmor"; + version = "0.11.1"; + + src = fetchFromGitHub { + owner = "kubearmor"; + repo = "kubearmor-client"; + rev = "v${version}"; + hash = "sha256-s1G5ZcXtjL9TxYpEUvnqiQXaY7OFUwCDXFongRM48Xk="; + }; + + vendorHash = "sha256-VvjcGiBxK2OVvIEc/ScwUT6zJZTccnXu/JfXKXc5WNY="; + + 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 82b993c14d63..8e15d2571837 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -30289,6 +30289,8 @@ with pkgs; kiln = callPackage ../applications/misc/kiln { }; + karmor = callPackage ../applications/networking/cluster/karmor {}; + kubernetes-code-generator = callPackage ../development/tools/kubernetes-code-generator {}; kubernetes-controller-tools = callPackage ../development/tools/kubernetes-controller-tools { };