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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

62 lines
1.2 KiB
Nix
Raw Normal View History

{ lib
2020-07-02 09:48:46 +00:00
, python3Packages
, nix
, ronn
}:
2017-03-13 21:43:25 +00:00
python3Packages.buildPythonApplication rec {
2017-03-13 21:43:25 +00:00
pname = "vulnix";
version = "1.10.1";
2017-03-13 21:43:25 +00:00
src = python3Packages.fetchPypi {
2017-03-15 09:29:27 +00:00
inherit pname version;
sha256 = "07v3ddvvhi3bslwrlin45kz48i3va2lzd6ny0blj5i2z8z40qcfm";
2017-03-13 21:43:25 +00:00
};
2022-08-11 12:48:14 +00:00
postPatch = ''
substituteInPlace setup.cfg \
--replace "--flake8" ""
'';
2019-03-09 17:37:42 +00:00
outputs = [ "out" "doc" "man" ];
2019-02-14 19:38:01 +00:00
nativeBuildInputs = [ ronn ];
2018-05-02 13:09:39 +00:00
checkInputs = with python3Packages; [
freezegun
pytest
pytest-cov
];
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 python3Packages; [
2017-03-13 21:43:25 +00:00
click
colorama
2017-03-15 09:29:27 +00:00
pyyaml
requests
setuptools
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
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
2019-03-09 17:37:42 +00:00
install -D -t $man/share/man/man1 doc/vulnix.1
install -D -t $man/share/man/man5 doc/vulnix-whitelist.5
'';
dontStrip = true;
2017-03-13 21:43:25 +00:00
meta = with lib; {
2017-03-13 21:43:25 +00:00
description = "NixOS vulnerability scanner";
homepage = "https://github.com/flyingcircusio/vulnix";
license = licenses.bsd3;
maintainers = with maintainers; [ ckauhaus ];
2017-03-13 21:43:25 +00:00
};
2017-03-15 09:29:27 +00:00
}