depot/third_party/nixpkgs/pkgs/tools/security/vulnix/default.nix
Default email 21cecf6002 Project import generated by Copybara.
GitOrigin-RevId: dd14e5d78e90a2ccd6007e569820de9b4861a6c2
2021-07-24 08:14:16 -04:00

57 lines
1.1 KiB
Nix

{ lib
, python3Packages
, nix
, ronn
}:
python3Packages.buildPythonApplication rec {
pname = "vulnix";
version = "1.10.0";
src = python3Packages.fetchPypi {
inherit pname version;
sha256 = "1d5mqpc4g1wkqcwxp8m9k130i3ii3q7n1n4b1fyb5wijidmyn3xv";
};
outputs = [ "out" "doc" "man" ];
nativeBuildInputs = [ ronn ];
checkInputs = with python3Packages; [
freezegun
pytest
pytest-cov
pytest-flake8
];
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;
meta = with lib; {
description = "NixOS vulnerability scanner";
homepage = "https://github.com/flyingcircusio/vulnix";
license = licenses.bsd3;
maintainers = with maintainers; [ ckauhaus ];
};
}