2018-07-21 02:44:44 +02:00
|
|
|
{ stdenv, pythonPackages, nix, ronn }:
|
2017-03-13 22:43:25 +01:00
|
|
|
|
2017-08-09 07:19:39 +02:00
|
|
|
pythonPackages.buildPythonApplication rec {
|
2017-03-13 22:43:25 +01:00
|
|
|
pname = "vulnix";
|
2018-07-23 15:39:37 +02:00
|
|
|
version = "1.7.1";
|
2017-03-13 22:43:25 +01:00
|
|
|
|
2017-03-15 10:29:27 +01:00
|
|
|
src = pythonPackages.fetchPypi {
|
|
|
|
inherit pname version;
|
2018-07-23 15:39:37 +02:00
|
|
|
sha256 = "15c32976sgb5clixngi6z1fk5h02v1kn1a89h8rkbkvyhfnjgg8m";
|
2017-03-13 22:43:25 +01:00
|
|
|
};
|
|
|
|
|
2018-05-02 15:09:39 +02:00
|
|
|
buildInputs = [ ronn ];
|
|
|
|
|
2018-07-20 15:24:40 +02:00
|
|
|
checkInputs = with pythonPackages; [
|
|
|
|
freezegun
|
|
|
|
pytest
|
|
|
|
pytestcov
|
|
|
|
pytest-flake8
|
|
|
|
];
|
2017-03-15 10:29:27 +01:00
|
|
|
|
2017-03-13 22:43:25 +01:00
|
|
|
propagatedBuildInputs = [
|
2017-03-15 10:29:27 +01:00
|
|
|
nix
|
|
|
|
] ++ (with pythonPackages; [
|
2017-03-13 22:43:25 +01:00
|
|
|
click
|
|
|
|
colorama
|
2017-03-15 10:29:27 +01:00
|
|
|
lxml
|
|
|
|
pyyaml
|
2017-05-07 12:55:45 +02:00
|
|
|
requests
|
2018-04-20 10:00:56 +02:00
|
|
|
toml
|
2017-08-09 07:19:39 +02:00
|
|
|
zodb
|
2017-03-15 10:29:27 +01:00
|
|
|
]);
|
2017-03-13 22:43:25 +01:00
|
|
|
|
2018-04-20 10:00:56 +02:00
|
|
|
outputs = [ "out" "doc" ];
|
|
|
|
|
2018-07-20 15:24:40 +02:00
|
|
|
postBuild = "make -C doc";
|
2018-04-20 10:00:56 +02:00
|
|
|
|
|
|
|
checkPhase = "py.test src/vulnix";
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -D -t $out/share/man/man1 doc/vulnix.1
|
|
|
|
install -D -t $out/share/man/man5 doc/vulnix-whitelist.5
|
|
|
|
install -D -t $doc/share/doc/vulnix README.rst CHANGES.rst
|
|
|
|
gzip $doc/share/doc/vulnix/*.rst
|
2017-10-29 12:27:58 +01:00
|
|
|
'';
|
|
|
|
|
2018-04-20 10:00:56 +02:00
|
|
|
dontStrip = true;
|
2017-03-13 22:43:25 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "NixOS vulnerability scanner";
|
|
|
|
homepage = https://github.com/flyingcircusio/vulnix;
|
2018-07-20 15:24:40 +02:00
|
|
|
license = licenses.bsd3;
|
2017-10-29 12:27:58 +01:00
|
|
|
maintainers = with maintainers; [ ckauhaus plumps ];
|
2017-03-13 22:43:25 +01:00
|
|
|
};
|
2017-03-15 10:29:27 +01:00
|
|
|
}
|