mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 23:23:07 +00:00
37 lines
1.0 KiB
Nix
37 lines
1.0 KiB
Nix
{ buildGoModule, fetchFromGitHub, installShellFiles, lib }:
|
|
|
|
buildGoModule rec {
|
|
pname = "karmor";
|
|
version = "0.11.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "kubearmor";
|
|
repo = "kubearmor-client";
|
|
rev = "v${version}";
|
|
hash = "sha256-xVYhZT4yqbSmxGH5DaarXzrGYMS1BuTaQ2T+huWYLBw=";
|
|
};
|
|
|
|
vendorHash = "sha256-rlvAQ99/3+3VotyYAR2TgWG8ZdTKUT2XRv4hTF+QFpI=";
|
|
|
|
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 ];
|
|
};
|
|
}
|