base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / vu / vulnix / package.nix
blob7388d8278ed06c595f94e4948570cefb0e91b056
1 { lib
2 , python3Packages
3 , fetchFromGitHub
4 , nix
5 , ronn
6 }:
8 python3Packages.buildPythonApplication rec {
9   pname = "vulnix";
10   version = "1.10.1-unstable-2024-04-02";
12   src = fetchFromGitHub {
13     owner = "nix-community";
14     repo = "vulnix";
15     rev = "ebd8ea84553c0fd95bc3042584b495560821500f";
16     hash = "sha256-huC520cLPjcmnbh+qOamyVfiIJNrCUpwK+orEp+X2LQ=";
17   };
19   postPatch = ''
20     substituteInPlace setup.cfg \
21       --replace "--flake8" ""
22   '';
24   outputs = [ "out" "doc" "man" ];
25   nativeBuildInputs = [ ronn ];
27   nativeCheckInputs = with python3Packages; [
28     freezegun
29     pytest
30     pytest-cov
31   ];
33   propagatedBuildInputs = [
34     nix
35   ] ++ (with python3Packages; [
36     click
37     colorama
38     pyyaml
39     requests
40     setuptools
41     toml
42     zodb
43   ]);
45   postBuild = "make -C doc";
47   checkPhase = "py.test src/vulnix";
49   postInstall = ''
50     install -D -t $doc/share/doc/vulnix README.rst CHANGES.rst
51     gzip $doc/share/doc/vulnix/*.rst
52     install -D -t $man/share/man/man1 doc/vulnix.1
53     install -D -t $man/share/man/man5 doc/vulnix-whitelist.5
54   '';
56   dontStrip = true;
58   meta = with lib; {
59     description = "NixOS vulnerability scanner";
60     mainProgram = "vulnix";
61     homepage = "https://github.com/nix-community/vulnix";
62     license = licenses.bsd3;
63     maintainers = with maintainers; [ ckauhaus ];
64   };