nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 45 lines 1.0 kB view raw
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 installShellFiles, 6}: 7 8buildGoModule rec { 9 pname = "gatekeeper"; 10 version = "3.20.0"; 11 12 src = fetchFromGitHub { 13 owner = "open-policy-agent"; 14 repo = "gatekeeper"; 15 tag = "v${version}"; 16 hash = "sha256-7DJWqm51eRGYTES2x05D2JSJwaaHiXgH4uq31nOIXIs="; 17 }; 18 19 vendorHash = null; 20 21 nativeBuildInputs = [ 22 installShellFiles 23 ]; 24 25 ldflags = [ 26 "-X github.com/open-policy-agent/gatekeeper/v3/pkg/version.Version=${version}" 27 ]; 28 29 subPackages = [ "cmd/gator" ]; 30 31 postInstall = '' 32 installShellCompletion --cmd gator \ 33 --bash <($out/bin/gator completion bash) \ 34 --fish <($out/bin/gator completion fish) \ 35 --zsh <($out/bin/gator completion zsh) 36 ''; 37 38 meta = with lib; { 39 description = "Policy Controller for Kubernetes"; 40 mainProgram = "gator"; 41 homepage = "https://github.com/open-policy-agent/gatekeeper"; 42 license = licenses.asl20; 43 maintainers = with maintainers; [ SuperSandro2000 ]; 44 }; 45}