storj-uplink: 1.119.8 -> 1.119.15 (#372175)
[NixPkgs.git] / pkgs / by-name / vu / vulnix / package.nix
blob89b361bbff78132a3872a7906cf09a65aa9a7b95
2   lib,
3   python3Packages,
4   fetchFromGitHub,
5   nix,
6   ronn,
7 }:
9 python3Packages.buildPythonApplication rec {
10   pname = "vulnix";
11   version = "1.10.2";
13   src = fetchFromGitHub {
14     owner = "nix-community";
15     repo = "vulnix";
16     rev = "9abfc80da0b4135e982332e448a3969f3b28785b";
17     hash = "sha256-gSgAGN7LlciW4uY3VS49CbZ9WuRUcduJ5V7JesA8OVo=";
18   };
20   postPatch = ''
21     substituteInPlace setup.cfg \
22       --replace "--flake8" ""
23   '';
25   outputs = [
26     "out"
27     "doc"
28     "man"
29   ];
30   nativeBuildInputs = [ ronn ];
32   nativeCheckInputs = with python3Packages; [
33     freezegun
34     pytest
35     pytest-cov
36   ];
38   propagatedBuildInputs =
39     [
40       nix
41     ]
42     ++ (with python3Packages; [
43       click
44       colorama
45       pyyaml
46       requests
47       setuptools
48       toml
49       zodb
50     ]);
52   postBuild = "make -C doc";
54   checkPhase = "py.test src/vulnix";
56   postInstall = ''
57     install -D -t $doc/share/doc/vulnix README.rst CHANGES.rst
58     gzip $doc/share/doc/vulnix/*.rst
59     install -D -t $man/share/man/man1 doc/vulnix.1
60     install -D -t $man/share/man/man5 doc/vulnix-whitelist.5
61   '';
63   dontStrip = true;
65   meta = with lib; {
66     description = "NixOS vulnerability scanner";
67     mainProgram = "vulnix";
68     homepage = "https://github.com/nix-community/vulnix";
69     license = licenses.bsd3;
70     maintainers = with maintainers; [ henrirosten ];
71   };