about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/cluster/kubent/default.nix
blob: 75f4244ee1425c005f5c1a8282541647e9e6903a (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
34
35
36
{ lib, buildGoModule, fetchFromGitHub, testers, kubent }:

buildGoModule rec {
  pname = "kubent";
  version = "0.7.2";

  src = fetchFromGitHub {
    owner = "doitintl";
    repo = "kube-no-trouble";
    rev = version;
    sha256 = "sha256-/gCbj0RDwV5E8kNkEu+37ilzw/A0BAXiYfHGPdkCsRs=";
  };

  vendorHash = "sha256-6hp7mzE45Tlmt4ybhpdJLYCv+WqQ9ak2S47kJTwyGVI=";

  ldflags = [
    "-w" "-s"
    "-X main.version=v${version}"
  ];

  subPackages = [ "cmd/kubent" ];

  passthru.tests.version = testers.testVersion {
    package = kubent;
    command = "kubent --version";
    version = "v${version}";
  };

  meta = with lib; {
    homepage = "https://github.com/doitintl/kube-no-trouble";
    description = "Easily check your cluster for use of deprecated APIs";
    mainProgram = "kubent";
    license = licenses.mit;
    maintainers = with maintainers; [ peterromfeldhk ];
  };
}