about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/vulnix/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/security/vulnix/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/security/vulnix/default.nix57
1 files changed, 57 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/security/vulnix/default.nix b/nixpkgs/pkgs/tools/security/vulnix/default.nix
new file mode 100644
index 000000000000..90d4e0f509b9
--- /dev/null
+++ b/nixpkgs/pkgs/tools/security/vulnix/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, python3Packages
+, nix
+, ronn
+}:
+
+python3Packages.buildPythonApplication rec {
+  pname = "vulnix";
+  version = "1.10.1";
+
+  src = python3Packages.fetchPypi {
+    inherit pname version;
+    sha256 = "07v3ddvvhi3bslwrlin45kz48i3va2lzd6ny0blj5i2z8z40qcfm";
+  };
+
+  outputs = [ "out" "doc" "man" ];
+  nativeBuildInputs = [ ronn ];
+
+  checkInputs = with python3Packages; [
+    freezegun
+    pytest
+    pytest-cov
+    pytest-flake8
+  ];
+
+  propagatedBuildInputs = [
+    nix
+  ] ++ (with python3Packages; [
+    click
+    colorama
+    pyyaml
+    requests
+    setuptools
+    toml
+    zodb
+  ]);
+
+  postBuild = "make -C doc";
+
+  checkPhase = "py.test src/vulnix";
+
+  postInstall = ''
+    install -D -t $doc/share/doc/vulnix README.rst CHANGES.rst
+    gzip $doc/share/doc/vulnix/*.rst
+    install -D -t $man/share/man/man1 doc/vulnix.1
+    install -D -t $man/share/man/man5 doc/vulnix-whitelist.5
+  '';
+
+  dontStrip = true;
+
+  meta = with lib; {
+    description = "NixOS vulnerability scanner";
+    homepage = "https://github.com/flyingcircusio/vulnix";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ ckauhaus ];
+  };
+}