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

43 lines
929 B
Nix
Raw Normal View History

2017-03-15 09:29:27 +00:00
{ stdenv, pythonPackages, fetchurl, callPackage, nix, }:
2017-03-13 21:43:25 +00:00
let
2017-03-15 09:29:27 +00:00
external = callPackage ./requirements.nix {
inherit pythonPackages;
};
in pythonPackages.buildPythonApplication rec{
2017-03-13 21:43:25 +00:00
name = "${pname}-${version}";
pname = "vulnix";
version = "1.2.2";
2017-03-15 09:29:27 +00:00
src = pythonPackages.fetchPypi {
inherit pname version;
2017-03-13 21:43:25 +00:00
sha256 = "1ia9plziwach0bxnlcd33q30kcsf8sv0nf2jc78gsmrqnxjabr12";
};
2017-03-15 09:29:27 +00:00
buildInputs = with pythonPackages; [ flake8 pytest pytestcov ];
postPatch = ''
sed -i -e 's/==\([^=]\+\)/>=\1/g' setup.py
'';
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
2017-03-15 09:29:27 +00:00
external.zodb
]);
2017-03-13 21:43:25 +00:00
2017-03-15 09:29:27 +00:00
checkPhase = "py.test";
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; [ plumps ];
};
2017-03-15 09:29:27 +00:00
}