2019-12-22 05:00:00 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, makeWrapper, rpm, xz }:
|
2019-01-06 03:40:08 +00:00
|
|
|
|
2019-12-22 05:00:00 +00:00
|
|
|
buildGoModule rec {
|
2019-01-06 03:40:08 +00:00
|
|
|
pname = "clair";
|
2019-12-22 05:00:00 +00:00
|
|
|
version = "2.1.2";
|
2019-01-06 03:40:08 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2019-12-22 05:00:00 +00:00
|
|
|
owner = "quay";
|
2019-07-10 17:04:32 +01:00
|
|
|
repo = pname;
|
2019-01-06 03:40:08 +00:00
|
|
|
rev = "v${version}";
|
2019-12-22 05:00:00 +00:00
|
|
|
sha256 = "14dh9iv2g138rivvfk135m3l90kk6c1ln1iqxhbi7s99h1jixbqw";
|
2019-01-06 03:40:08 +00:00
|
|
|
};
|
|
|
|
|
2019-12-22 05:00:00 +00:00
|
|
|
modSha256 = "0rgkrid58kji39nlmiii95r8shbzr6dwalj5m7qwxy5w1rcaljr5";
|
|
|
|
|
2019-01-06 03:40:08 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postInstall = ''
|
2019-12-22 05:00:00 +00:00
|
|
|
wrapProgram $out/bin/clair \
|
2019-01-06 03:40:08 +00:00
|
|
|
--prefix PATH : "${lib.makeBinPath [ rpm xz ]}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Vulnerability Static Analysis for Containers";
|
2019-12-22 05:00:00 +00:00
|
|
|
homepage = "https://github.com/quay/clair";
|
2019-01-06 03:40:08 +00:00
|
|
|
license = licenses.asl20;
|
2019-07-10 17:04:32 +01:00
|
|
|
maintainers = with maintainers; [ marsam ];
|
2019-01-06 03:40:08 +00:00
|
|
|
};
|
|
|
|
}
|