summary refs log tree commit diff
path: root/pkgs/tools/admin/clair
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2019-01-05 22:40:08 -0500
committerMario Rodas <marsam@users.noreply.github.com>2019-01-06 19:40:13 -0500
commit23da4c67c8de90df289a596e2f7537ff3e0bcea6 (patch)
tree0133abda0215ef6a276eeb7d75206d5ac5263e99 /pkgs/tools/admin/clair
parent8e05911ccb73c28b3040cd0a1ef240e655a1e83c (diff)
clair: init at 2.0.7
Diffstat (limited to 'pkgs/tools/admin/clair')
-rw-r--r--pkgs/tools/admin/clair/default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/tools/admin/clair/default.nix b/pkgs/tools/admin/clair/default.nix
new file mode 100644
index 0000000000000..8f521ed36d093
--- /dev/null
+++ b/pkgs/tools/admin/clair/default.nix
@@ -0,0 +1,29 @@
+{ lib, buildGoPackage, fetchFromGitHub, makeWrapper, rpm, xz }:
+
+buildGoPackage rec {
+  pname = "clair";
+  version = "2.0.7";
+
+  goPackagePath = "github.com/coreos/clair";
+
+  src = fetchFromGitHub {
+    owner = "coreos";
+    repo = "clair";
+    rev = "v${version}";
+    sha256 = "0n4pxdw71hd1rxzgf422fvycpjkrxxnvcidys0hpjy7gs88zjz5x";
+  };
+
+  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 = [ maintainers.marsam ];
+  };
+}