33 lines
833 B
Nix
Raw Permalink Normal View History

{ lib, buildGoModule, fetchFromGitHub, makeWrapper, rpm, xz }:
2019-01-05 22:40:08 -05:00
2019-12-22 00:00:00 -05:00
buildGoModule rec {
2019-01-05 22:40:08 -05:00
pname = "clair";
2021-05-14 02:30:18 +00:00
version = "4.1.0";
2019-01-05 22:40:08 -05:00
src = fetchFromGitHub {
2019-12-22 00:00:00 -05:00
owner = "quay";
2019-07-11 00:04:32 +08:00
repo = pname;
2019-01-05 22:40:08 -05:00
rev = "v${version}";
2021-05-14 02:30:18 +00:00
sha256 = "sha256-Ns02Yi0FJPOCpjr1P5c1KOkRZ8saxQzXg/Zn5vYLztU=";
2019-01-05 22:40:08 -05:00
};
2021-05-14 02:30:18 +00:00
vendorSha256 = "sha256-aFaeRhg+aLOmS7VFbgdxaEtZcBKn9zCVINad6ahpDCo=";
2019-12-22 00:00:00 -05:00
doCheck = false;
2019-01-05 22:40:08 -05:00
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
2019-12-22 00:00:00 -05:00
wrapProgram $out/bin/clair \
--prefix PATH : "${lib.makeBinPath [ rpm xz ]}"
2019-01-05 22:40:08 -05:00
'';
meta = with lib; {
2019-01-05 22:40:08 -05:00
description = "Vulnerability Static Analysis for Containers";
2019-12-22 00:00:00 -05:00
homepage = "https://github.com/quay/clair";
2020-12-26 04:20:00 +00:00
changelog = "https://github.com/quay/clair/blob/v${version}/CHANGELOG.md";
2019-01-05 22:40:08 -05:00
license = licenses.asl20;
2019-07-11 00:04:32 +08:00
maintainers = with maintainers; [ marsam ];
2019-01-05 22:40:08 -05:00
};
}