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