2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-07-18 16:06:22 +00:00
|
|
|
, python3Packages
|
|
|
|
, nix
|
|
|
|
, ronn
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "vulnix";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "1.10.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = python3Packages.fetchPypi {
|
|
|
|
inherit pname version;
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "07v3ddvvhi3bslwrlin45kz48i3va2lzd6ny0blj5i2z8z40qcfm";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "--flake8" ""
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
outputs = [ "out" "doc" "man" ];
|
|
|
|
nativeBuildInputs = [ ronn ];
|
|
|
|
|
|
|
|
checkInputs = with python3Packages; [
|
|
|
|
freezegun
|
|
|
|
pytest
|
2021-07-24 12:14:16 +00:00
|
|
|
pytest-cov
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "NixOS vulnerability scanner";
|
|
|
|
homepage = "https://github.com/flyingcircusio/vulnix";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ ckauhaus ];
|
|
|
|
};
|
|
|
|
}
|