nixpkgs/pkgs/tools/security/vulnix/default.nix

52 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, pythonPackages, fetchurl, callPackage, nix, ronn }:
2017-03-13 14:43:25 -07:00
2017-08-08 22:19:39 -07:00
pythonPackages.buildPythonApplication rec {
2017-03-13 14:43:25 -07:00
pname = "vulnix";
2018-05-03 02:00:48 -07:00
version = "1.6.3";
2017-03-13 14:43:25 -07:00
2017-03-15 02:29:27 -07:00
src = pythonPackages.fetchPypi {
inherit pname version;
2018-05-03 02:00:48 -07:00
sha256 = "0ia71l0210dgcxf63bg07csx40nmpdghr4mszz91qrri7lsa5qqi";
2017-03-13 14:43:25 -07:00
};
2018-05-02 06:09:39 -07:00
buildInputs = [ ronn ];
checkInputs = with pythonPackages; [ freezegun pytest pytestcov pytest-flake8 ];
2017-03-15 02:29:27 -07:00
2017-03-13 14:43:25 -07:00
propagatedBuildInputs = [
2017-03-15 02:29:27 -07:00
nix
] ++ (with pythonPackages; [
2017-03-13 14:43:25 -07:00
click
colorama
2017-03-15 02:29:27 -07:00
lxml
pyyaml
requests
toml
2017-08-08 22:19:39 -07:00
zodb
2017-03-15 02:29:27 -07:00
]);
2017-03-13 14:43:25 -07:00
outputs = [ "out" "doc" ];
postBuild = ''
make -C doc
'';
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
'';
dontStrip = true;
2017-03-13 14:43:25 -07:00
meta = with stdenv.lib; {
description = "NixOS vulnerability scanner";
homepage = https://github.com/flyingcircusio/vulnix;
license = licenses.bsd2;
maintainers = with maintainers; [ ckauhaus plumps ];
2017-03-13 14:43:25 -07:00
};
2017-03-15 02:29:27 -07:00
}