2019-01-06 03:40:08 +00:00
|
|
|
{ lib, buildGoPackage, fetchFromGitHub, makeWrapper, rpm, xz }:
|
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
pname = "clair";
|
2019-09-03 01:37:25 +00:00
|
|
|
version = "2.0.9";
|
2019-01-06 03:40:08 +00:00
|
|
|
|
|
|
|
goPackagePath = "github.com/coreos/clair";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "coreos";
|
2019-07-10 16:04:32 +00:00
|
|
|
repo = pname;
|
2019-01-06 03:40:08 +00:00
|
|
|
rev = "v${version}";
|
2019-09-03 01:37:25 +00:00
|
|
|
sha256 = "1lcrqka4daqqjagx2mbfzg3z8wxg669mw1lb450nrlc33ji2iwdm";
|
2019-01-06 03:40:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $bin/bin/clair \
|
|
|
|
--prefix PATH : "${lib.makeBinPath [ rpm xz ]}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Vulnerability Static Analysis for Containers";
|
2019-07-10 16:04:32 +00:00
|
|
|
homepage = "https://github.com/coreos/clair";
|
2019-01-06 03:40:08 +00:00
|
|
|
license = licenses.asl20;
|
2019-07-10 16:04:32 +00:00
|
|
|
maintainers = with maintainers; [ marsam ];
|
2019-01-06 03:40:08 +00:00
|
|
|
};
|
|
|
|
}
|