1 { lib, buildGoModule, fetchFromGitHub, installShellFiles }:
4 pname = "kubernetes-polaris";
7 src = fetchFromGitHub {
8 owner = "FairwindsOps";
11 sha256 = "sha256-CVc/ZMF/3HBDPjny81Pj26eSnBuTRjXgkso34kZSex4=";
14 vendorHash = "sha256-X0GPKR6l1v5312hOmelrcqp4KT3LwsGkvKoqUfEM0uU=";
16 nativeBuildInputs = [ installShellFiles ];
21 "-X main.Version=${version}"
22 "-X main.Commit=${version}"
26 installShellCompletion --cmd polaris \
27 --bash <($out/bin/polaris completion bash) \
28 --fish <($out/bin/polaris completion fish) \
29 --zsh <($out/bin/polaris completion zsh)
32 doInstallCheck = true;
33 installCheckPhase = ''
34 runHook preInstallCheck
37 $out/bin/polaris version | grep 'Polaris version:${version}'
39 runHook postInstallCheck
43 description = "Validate and remediate Kubernetes resources to ensure configuration best practices are followed";
44 mainProgram = "polaris";
45 homepage = "https://www.fairwinds.com/polaris";
46 license = with licenses; [ asl20 ];
47 maintainers = with maintainers; [ longer ];