Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
47 lines
1.1 KiB
Nix
47 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "gatekeeper";
|
|
version = "3.20.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "open-policy-agent";
|
|
repo = "gatekeeper";
|
|
tag = "v${version}";
|
|
hash = "sha256-vChpVCw2La4cgNMDFnC7thU4jSmJ4LlOLVVeURNQ1+0=";
|
|
};
|
|
|
|
vendorHash = null;
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
];
|
|
|
|
ldflags = [
|
|
"-X github.com/open-policy-agent/gatekeeper/v3/pkg/version.Version=${version}"
|
|
];
|
|
|
|
subPackages = [ "cmd/gator" ];
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd gator \
|
|
--bash <($out/bin/gator completion bash) \
|
|
--fish <($out/bin/gator completion fish) \
|
|
--zsh <($out/bin/gator completion zsh)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Policy Controller for Kubernetes";
|
|
mainProgram = "gator";
|
|
homepage = "https://github.com/open-policy-agent/gatekeeper";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
|
};
|
|
}
|