at 24.11-pre 2.0 kB view raw
1{ 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, 32}: 33 34buildPythonPackage rec { 35 pname = "reptor"; 36 version = "0.19"; 37 pyproject = true; 38 39 disabled = pythonOlder "3.8"; 40 41 src = fetchFromGitHub { 42 owner = "Syslifters"; 43 repo = "reptor"; 44 rev = "refs/tags/${version}"; 45 hash = "sha256-7ZmMG1Fil8/JAks50baT/p1H7wHjap58+i81/DFlSAk="; 46 }; 47 48 pythonRelaxDeps = true; 49 50 build-system = [ setuptools ]; 51 52 nativeBuildInputs = [ pythonRelaxDepsHook ]; 53 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 ]; 75 76 passthru.optional-dependencies = { 77 ghostwriter = [ gql ] ++ gql.optional-dependencies.aiohttp; 78 translate = [ deepl ]; 79 }; 80 81 nativeCheckInputs = [ 82 pytestCheckHook 83 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); 84 85 preCheck = '' 86 export HOME=$(mktemp -d) 87 export PATH="$PATH:$out/bin"; 88 ''; 89 90 pythonImportsCheck = [ "reptor" ]; 91 92 disabledTestPaths = [ 93 # Tests want to use pip install dependencies 94 "reptor/plugins/importers/GhostWriter/tests/test_ghostwriter.py" 95 ]; 96 97 disabledTests = [ 98 # Tests need network access 99 "TestDummy" 100 "TestIntegration" 101 ]; 102 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 }; 111}