nixpkgs/pkgs/tools/admin/clair/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
950 B
Nix
Raw Normal View History

2022-06-13 12:12:50 +02:00
{ lib
, buildGoModule
, fetchFromGitHub
, makeWrapper
, rpm
, xz
}:
2019-01-06 04:40:08 +01:00
2019-12-22 06:00:00 +01:00
buildGoModule rec {
2019-01-06 04:40:08 +01:00
pname = "clair";
2024-02-26 21:07:03 +01:00
version = "4.7.3";
2019-01-06 04:40:08 +01:00
src = fetchFromGitHub {
2019-12-22 06:00:00 +01:00
owner = "quay";
2019-07-10 18:04:32 +02:00
repo = pname;
2019-01-06 04:40:08 +01:00
rev = "v${version}";
2024-02-26 21:07:03 +01:00
hash = "sha256-LRjlchhEXLTZDH3v2lkY3XN4tvXOHpedZBjkQ6rgeVc=";
2019-01-06 04:40:08 +01:00
};
2024-02-26 21:07:03 +01:00
vendorHash = "sha256-cAeEBJz4k2liivRsNF4FT4JPKsDVy2fLAYDg8NuJ81U=";
2019-12-22 06:00:00 +01:00
2022-06-13 12:12:50 +02:00
nativeBuildInputs = [
makeWrapper
];
2019-01-06 04:40:08 +01:00
2022-06-13 12:12:50 +02:00
subPackages = [
"cmd/clair"
"cmd/clairctl"
];
2022-05-28 06:20:00 +02:00
2022-06-13 12:12:50 +02:00
ldflags = [
"-s"
"-w"
"-X main.Version=${version}"
];
2022-05-28 06:20:00 +02:00
2019-01-06 04:40:08 +01:00
postInstall = ''
2019-12-22 06:00:00 +01:00
wrapProgram $out/bin/clair \
--prefix PATH : "${lib.makeBinPath [ rpm xz ]}"
2019-01-06 04:40:08 +01:00
'';
meta = with lib; {
2019-01-06 04:40:08 +01:00
description = "Vulnerability Static Analysis for Containers";
2019-12-22 06:00:00 +01:00
homepage = "https://github.com/quay/clair";
2020-12-26 05:20:00 +01:00
changelog = "https://github.com/quay/clair/blob/v${version}/CHANGELOG.md";
2019-01-06 04:40:08 +01:00
license = licenses.asl20;
2019-07-10 18:04:32 +02:00
maintainers = with maintainers; [ marsam ];
2019-01-06 04:40:08 +01:00
};
}