nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 certifi,
5 cvss,
6 deepl,
7 django,
8 fetchFromGitHub,
9 gql,
10 pytestCheckHook,
11 pyyaml,
12 requests,
13 rich,
14 setuptools,
15 sqlparse,
16 termcolor,
17 tomli-w,
18 tomli,
19 tomlkit,
20 urllib3,
21 writableTmpDirAsHomeHook,
22 xmltodict,
23}:
24
25buildPythonPackage (finalAttrs: {
26 pname = "reptor";
27 version = "0.33";
28 pyproject = true;
29
30 src = fetchFromGitHub {
31 owner = "Syslifters";
32 repo = "reptor";
33 tag = finalAttrs.version;
34 hash = "sha256-Jr8Gr5oGrASK/QAgO7r78/kjtxVsxn1skfkVe3Hx2HM=";
35 };
36
37 pythonRelaxDeps = true;
38
39 build-system = [ setuptools ];
40
41 dependencies = [
42 certifi
43 cvss
44 django
45 pyyaml
46 requests
47 rich
48 termcolor
49 tomli
50 tomli-w
51 tomlkit
52 urllib3
53 xmltodict
54 ];
55
56 optional-dependencies = {
57 ghostwriter = [ gql ] ++ gql.optional-dependencies.aiohttp;
58 translate = [ deepl ];
59 };
60
61 nativeCheckInputs = [
62 pytestCheckHook
63 ]
64 ++ lib.flatten (builtins.attrValues finalAttrs.passthru.optional-dependencies);
65
66 preCheck = ''
67 export PATH="$PATH:$out/bin";
68 '';
69
70 pythonImportsCheck = [ "reptor" ];
71
72 disabledTestMarks = [
73 # Tests need network access
74 "integration"
75 ];
76
77 meta = {
78 description = "Module to do automated pentest reporting with SysReptor";
79 homepage = "https://github.com/Syslifters/reptor";
80 changelog = "https://github.com/Syslifters/reptor/releases/tag/${finalAttrs.src.tag}";
81 license = lib.licenses.mit;
82 maintainers = with lib.maintainers; [ fab ];
83 mainProgram = "reptor";
84 };
85})