summary refs log tree commit diff
path: root/pkgs/tools/admin/clair/default.nix
blob: 25c1471209475b08575f7968d240349e5704c62e (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
{ lib, buildGoPackage, fetchFromGitHub, makeWrapper, rpm, xz }:

buildGoPackage rec {
  pname = "clair";
  version = "2.0.9";

  goPackagePath = "github.com/coreos/clair";

  src = fetchFromGitHub {
    owner = "coreos";
    repo = pname;
    rev = "v${version}";
    sha256 = "1lcrqka4daqqjagx2mbfzg3z8wxg669mw1lb450nrlc33ji2iwdm";
  };

  nativeBuildInputs = [ makeWrapper ];

  postInstall = ''
    wrapProgram $bin/bin/clair \
      --prefix PATH : "${lib.makeBinPath [ rpm xz ]}"
  '';

  meta = with lib; {
    description = "Vulnerability Static Analysis for Containers";
    homepage = "https://github.com/coreos/clair";
    license = licenses.asl20;
    maintainers = with maintainers; [ marsam ];
  };
}