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

57 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, pythonPackages, fetchurl, callPackage, nix, ronn }:
2017-03-13 21:43:25 +00:00
2017-08-09 05:19:39 +00:00
pythonPackages.buildPythonApplication rec {
2017-03-13 21:43:25 +00:00
pname = "vulnix";
version = "1.6.1";
2017-03-13 21:43:25 +00:00
2017-03-15 09:29:27 +00:00
src = pythonPackages.fetchPypi {
inherit pname version;
sha256 = "0j6v6phq3naqnpvzxxnynsyv9y7bhig1gzvg594qpknqgyzj16bf";
2017-03-13 21:43:25 +00:00
};
buildInputs =
[ ronn ] ++
(with pythonPackages; [ freezegun pytest pytestcov ]);
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
] ++ (with pythonPackages; [
2017-03-13 21:43:25 +00:00
click
colorama
2017-03-15 09:29:27 +00:00
lxml
pyyaml
requests
toml
2017-08-09 05:19:39 +00:00
zodb
2017-03-15 09:29:27 +00:00
]);
2017-03-13 21:43:25 +00:00
outputs = [ "out" "doc" ];
# pytest-flake8 is currently broken
# re-enable after it has been fixed
# https://github.com/NixOS/nixpkgs/issues/39206
patches = [ ./disable-flake8.patch ];
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 21:43:25 +00: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 21:43:25 +00:00
};
2017-03-15 09:29:27 +00:00
}