about summary refs log tree commit diff
path: root/pkgs/applications/networking
diff options
context:
space:
mode:
authorColin Arnott <colin@urandom.co.uk>2023-01-03 22:27:23 +0000
committerGitHub <noreply@github.com>2023-01-03 23:27:23 +0100
commite8397aa6826db50d8adb7e8f5e78349b6de07caa (patch)
tree73d2badbcd41d1f1e25ed8cfecae138ff7c34465 /pkgs/applications/networking
parentd5b36bba0edc9a03d751507c68d06a56c5b116f6 (diff)
karmor: init at 0.11.1 (#207794)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Fixes https://github.com/NixOS/nixpkgs/issues/207517
Diffstat (limited to 'pkgs/applications/networking')
-rw-r--r--pkgs/applications/networking/cluster/karmor/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/applications/networking/cluster/karmor/default.nix b/pkgs/applications/networking/cluster/karmor/default.nix
new file mode 100644
index 0000000000000..220d38c36f804
--- /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 ];
+  };
+}