2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, asgiref
|
|
|
|
, buildPythonPackage
|
|
|
|
, certifi
|
|
|
|
, charset-normalizer
|
2023-10-19 13:55:26 +00:00
|
|
|
, cvss
|
2023-10-09 19:29:22 +00:00
|
|
|
, deepl
|
|
|
|
, django
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gql
|
|
|
|
, idna
|
|
|
|
, markdown-it-py
|
|
|
|
, mdurl
|
|
|
|
, pygments
|
|
|
|
, pytest
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, pyyaml
|
|
|
|
, reptor
|
|
|
|
, requests
|
|
|
|
, rich
|
|
|
|
, setuptools
|
|
|
|
, sqlparse
|
|
|
|
, termcolor
|
|
|
|
, toml
|
2023-10-19 13:55:26 +00:00
|
|
|
, tomli-w
|
2023-10-09 19:29:22 +00:00
|
|
|
, urllib3
|
|
|
|
, xmltodict
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "reptor";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.7";
|
2023-10-09 19:29:22 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Syslifters";
|
|
|
|
repo = "reptor";
|
|
|
|
rev = "refs/tags/${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-d76Hsf+leJKYOh7k/RVuo6adfjMW6yAYt+vh7KNh7sA=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
asgiref
|
|
|
|
certifi
|
|
|
|
charset-normalizer
|
2023-10-19 13:55:26 +00:00
|
|
|
cvss
|
2023-10-09 19:29:22 +00:00
|
|
|
django
|
|
|
|
idna
|
|
|
|
markdown-it-py
|
|
|
|
mdurl
|
|
|
|
pygments
|
|
|
|
pyyaml
|
|
|
|
requests
|
|
|
|
rich
|
|
|
|
sqlparse
|
|
|
|
termcolor
|
|
|
|
toml
|
2023-10-19 13:55:26 +00:00
|
|
|
tomli-w
|
2023-10-09 19:29:22 +00:00
|
|
|
urllib3
|
|
|
|
xmltodict
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
ghostwriter = [
|
|
|
|
gql
|
2023-10-19 13:55:26 +00:00
|
|
|
] ++ gql.optional-dependencies.aiohttp;
|
2023-10-09 19:29:22 +00:00
|
|
|
translate = [
|
|
|
|
deepl
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
2023-10-19 13:55:26 +00:00
|
|
|
export PATH="$PATH:$out/bin";
|
2023-10-09 19:29:22 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"reptor"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Tests want to use pip install dependencies
|
|
|
|
"reptor/plugins/importers/GhostWriter/tests/test_ghostwriter.py"
|
|
|
|
];
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Tests need network access
|
|
|
|
"TestDummy"
|
|
|
|
"TestIntegration"
|
|
|
|
|
|
|
|
];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Module to do automated pentest reporting with SysReptor";
|
|
|
|
homepage = "https://github.com/Syslifters/reptor";
|
|
|
|
changelog = "https://github.com/Syslifters/reptor/releases/tag/${version}";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|