about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/kubeaudit/default.nix
blob: 135d29c272232ac248061490ce7bbf04e2473425 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ lib
, buildGoModule
, fetchFromGitHub
}:

buildGoModule rec {
  pname = "kubeaudit";
  version = "0.22.1";

  src = fetchFromGitHub {
    owner = "Shopify";
    repo = pname;
    rev = "refs/tags/v${version}";
    hash = "sha256-ebqOjnr79S1utXaTKa9Jop9GvQsoW/IBMmIeOsGuvuE=";
  };

  vendorHash = "sha256-IxrAJaltg7vo3SQRC7OokSD5SM8xiX7iG8ZxKYEe9/E=";

  postInstall = ''
    mv $out/bin/cmd $out/bin/$pname
  '';

  # Tests require a running Kubernetes instance
  doCheck = false;

  meta = with lib; {
    description = "Audit tool for Kubernetes";
    homepage = "https://github.com/Shopify/kubeaudit";
    changelog = "https://github.com/Shopify/kubeaudit/releases/tag/v${version}";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ fab ];
  };
}