Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / reptor / default.nix
bloba9051dc3eb5fb48c9bc160cb8f4126b2d3d4e10c
2   lib,
3   asgiref,
4   buildPythonPackage,
5   certifi,
6   charset-normalizer,
7   cvss,
8   deepl,
9   django,
10   fetchFromGitHub,
11   gql,
12   idna,
13   markdown-it-py,
14   mdurl,
15   pygments,
16   pytest,
17   pytestCheckHook,
18   pythonOlder,
19   pythonRelaxDepsHook,
20   pyyaml,
21   reptor,
22   requests,
23   rich,
24   setuptools,
25   sqlparse,
26   termcolor,
27   tomli,
28   tomli-w,
29   tomlkit,
30   urllib3,
31   xmltodict,
34 buildPythonPackage rec {
35   pname = "reptor";
36   version = "0.19";
37   pyproject = true;
39   disabled = pythonOlder "3.8";
41   src = fetchFromGitHub {
42     owner = "Syslifters";
43     repo = "reptor";
44     rev = "refs/tags/${version}";
45     hash = "sha256-7ZmMG1Fil8/JAks50baT/p1H7wHjap58+i81/DFlSAk=";
46   };
48   pythonRelaxDeps = true;
50   build-system = [ setuptools ];
52   nativeBuildInputs = [ pythonRelaxDepsHook ];
54   dependencies = [
55     asgiref
56     certifi
57     charset-normalizer
58     cvss
59     django
60     idna
61     markdown-it-py
62     mdurl
63     pygments
64     pyyaml
65     requests
66     rich
67     sqlparse
68     termcolor
69     tomli
70     tomlkit
71     tomli-w
72     urllib3
73     xmltodict
74   ];
76   passthru.optional-dependencies = {
77     ghostwriter = [ gql ] ++ gql.optional-dependencies.aiohttp;
78     translate = [ deepl ];
79   };
81   nativeCheckInputs = [
82     pytestCheckHook
83   ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
85   preCheck = ''
86     export HOME=$(mktemp -d)
87     export PATH="$PATH:$out/bin";
88   '';
90   pythonImportsCheck = [ "reptor" ];
92   disabledTestPaths = [
93     # Tests want to use pip install dependencies
94     "reptor/plugins/importers/GhostWriter/tests/test_ghostwriter.py"
95   ];
97   disabledTests = [
98     # Tests need network access
99     "TestDummy"
100     "TestIntegration"
101   ];
103   meta = with lib; {
104     description = "Module to do automated pentest reporting with SysReptor";
105     mainProgram = "reptor";
106     homepage = "https://github.com/Syslifters/reptor";
107     changelog = "https://github.com/Syslifters/reptor/releases/tag/${version}";
108     license = licenses.mit;
109     maintainers = with maintainers; [ fab ];
110   };