summary refs log tree commit diff
path: root/pkgs/development/tools/kube-linter/default.nix
blob: d234e458c1846f1346aa1f186f5fce83e5311b0f (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
{ lib, buildGoModule, fetchFromGitHub, testVersion, kube-linter }:

buildGoModule rec {
  pname = "kube-linter";
  version = "0.2.6";

  src = fetchFromGitHub {
    owner = "stackrox";
    repo = pname;
    rev = "${version}";
    sha256 = "nBF/AX4hgZxIj9/RYowpHX1eAJMMhvU7wunvEXWnO80=";
  };

  vendorSha256 = "HJW28BZ9qFLtdH1qdW8/K4TzHA2ptekXaMF0XnMKbOY=";

  ldflags = [
    "-s" "-w" "-X golang.stackrox.io/kube-linter/internal/version.version=${version}"
  ];

  passthru.tests.version = testVersion {
    package = kube-linter;
    command = "kube-linter version";
  };

  meta = with lib; {
    description = "A static analysis tool that checks Kubernetes YAML files and Helm charts";
    homepage = "https://kubelinter.io";
    license = licenses.asl20;
    maintainers = with maintainers; [ mtesseract ];
  };
}