Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 91 lines 1.7 kB view raw
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 rec { 26 pname = "reptor"; 27 version = "0.31"; 28 pyproject = true; 29 30 src = fetchFromGitHub { 31 owner = "Syslifters"; 32 repo = "reptor"; 33 tag = version; 34 hash = "sha256-AbrfQJQvKXpV4FrhkGZOLYX3px9dzr9whJZwzR/7UYM="; 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 optional-dependencies); 65 66 preCheck = '' 67 export PATH="$PATH:$out/bin"; 68 ''; 69 70 pythonImportsCheck = [ "reptor" ]; 71 72 disabledTestPaths = [ 73 # Tests want to use pip install dependencies 74 "reptor/plugins/importers/GhostWriter/tests/test_ghostwriter.py" 75 ]; 76 77 disabledTests = [ 78 # Tests need network access 79 "TestDummy" 80 "TestIntegration" 81 ]; 82 83 meta = with lib; { 84 description = "Module to do automated pentest reporting with SysReptor"; 85 homepage = "https://github.com/Syslifters/reptor"; 86 changelog = "https://github.com/Syslifters/reptor/releases/tag/${src.tag}"; 87 license = licenses.mit; 88 maintainers = with maintainers; [ fab ]; 89 mainProgram = "reptor"; 90 }; 91}