about summary refs log tree commit diff
path: root/pkgs/tools/security/vulnix/default.nix
blob: 1beb2268fc6ced04a7b067f379c7603b0ea51a46 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ stdenv, pythonPackages, fetchurl, callPackage, nix }:

pythonPackages.buildPythonApplication rec {
  name = "${pname}-${version}";
  pname = "vulnix";
  version = "1.2.2";

  src = pythonPackages.fetchPypi {
    inherit pname version;
    sha256 = "1ia9plziwach0bxnlcd33q30kcsf8sv0nf2jc78gsmrqnxjabr12";
  };

  buildInputs = with pythonPackages; [ flake8 pytest pytestcov ];

  postPatch = ''
    sed -i -e 's/==\([^=]\+\)/>=\1/g' setup.py
  '';

  propagatedBuildInputs = [
    nix
  ] ++ (with pythonPackages; [
    click
    colorama
    lxml
    pyyaml
    requests
    zodb
  ]);

  checkPhase = "py.test";

  meta = with stdenv.lib; {
    description = "NixOS vulnerability scanner";
    homepage = https://github.com/flyingcircusio/vulnix;
    license = licenses.bsd2;
    maintainers = with maintainers; [ plumps ];
  };
}