2021-01-25 09:26:54 +01:00
|
|
|
{ lib
|
2020-07-02 11:48:46 +02:00
|
|
|
, python3Packages
|
|
|
|
, nix
|
|
|
|
, ronn
|
|
|
|
}:
|
2017-03-13 22:43:25 +01:00
|
|
|
|
2019-11-13 16:11:56 +01:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2017-03-13 22:43:25 +01:00
|
|
|
pname = "vulnix";
|
2021-07-17 13:31:58 +02:00
|
|
|
version = "1.10.0";
|
2017-03-13 22:43:25 +01:00
|
|
|
|
2019-11-13 16:11:56 +01:00
|
|
|
src = python3Packages.fetchPypi {
|
2017-03-15 10:29:27 +01:00
|
|
|
inherit pname version;
|
2021-07-17 13:31:58 +02:00
|
|
|
sha256 = "1d5mqpc4g1wkqcwxp8m9k130i3ii3q7n1n4b1fyb5wijidmyn3xv";
|
2017-03-13 22:43:25 +01:00
|
|
|
};
|
|
|
|
|
2019-03-09 18:37:42 +01:00
|
|
|
outputs = [ "out" "doc" "man" ];
|
2019-02-14 20:38:01 +01:00
|
|
|
nativeBuildInputs = [ ronn ];
|
2018-05-02 15:09:39 +02:00
|
|
|
|
2019-11-13 16:11:56 +01:00
|
|
|
checkInputs = with python3Packages; [
|
2018-07-20 15:24:40 +02:00
|
|
|
freezegun
|
|
|
|
pytest
|
2021-07-20 22:42:24 +02:00
|
|
|
pytest-cov
|
2018-07-20 15:24:40 +02:00
|
|
|
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
|
2019-11-13 16:11:56 +01:00
|
|
|
] ++ (with python3Packages; [
|
2017-03-13 22:43:25 +01:00
|
|
|
click
|
|
|
|
colorama
|
2017-03-15 10:29:27 +01:00
|
|
|
pyyaml
|
2017-05-07 12:55:45 +02:00
|
|
|
requests
|
2019-10-02 12:46:01 +02:00
|
|
|
setuptools
|
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-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 $doc/share/doc/vulnix README.rst CHANGES.rst
|
|
|
|
gzip $doc/share/doc/vulnix/*.rst
|
2019-03-09 18:37:42 +01: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 12:27:58 +01:00
|
|
|
'';
|
|
|
|
|
2018-04-20 10:00:56 +02:00
|
|
|
dontStrip = true;
|
2017-03-13 22:43:25 +01:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2017-03-13 22:43:25 +01:00
|
|
|
description = "NixOS vulnerability scanner";
|
2019-11-14 17:50:41 +01:00
|
|
|
homepage = "https://github.com/flyingcircusio/vulnix";
|
2018-07-20 15:24:40 +02:00
|
|
|
license = licenses.bsd3;
|
2019-11-14 17:50:41 +01:00
|
|
|
maintainers = with maintainers; [ ckauhaus ];
|
2017-03-13 22:43:25 +01:00
|
|
|
};
|
2017-03-15 10:29:27 +01:00
|
|
|
}
|