ff1a94e523
The nixpkgs-unstable channel's programs.sqlite was used to identify packages producing exactly one binary, and these automatically added to their package definitions wherever possible.
40 lines
892 B
Nix
40 lines
892 B
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "gatekeeper";
|
|
version = "3.15.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "open-policy-agent";
|
|
repo = "gatekeeper";
|
|
rev = "v${version}";
|
|
hash = "sha256-KPRcY14IeP4WU/cnUG7JWwJcp/LN6O74u417I+qAqXE=";
|
|
};
|
|
|
|
vendorHash = null;
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
];
|
|
|
|
subPackages = [ "cmd/gator" ];
|
|
|
|
postInstall = ''
|
|
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 ];
|
|
};
|
|
}
|