depot/third_party/nixpkgs/pkgs/development/python-modules/reptor/default.nix
Default email 23b612e36f Project import generated by Copybara.
GitOrigin-RevId: ae5c332cbb5827f6b1f02572496b141021de335f
2024-01-25 23:12:00 +09:00

117 lines
1.9 KiB
Nix

{ lib
, asgiref
, buildPythonPackage
, certifi
, charset-normalizer
, cvss
, deepl
, django
, fetchFromGitHub
, gql
, idna
, markdown-it-py
, mdurl
, pygments
, pytest
, pytestCheckHook
, pythonOlder
, pythonRelaxDepsHook
, pyyaml
, reptor
, requests
, rich
, setuptools
, sqlparse
, termcolor
, tomli
, tomli-w
, tomlkit
, urllib3
, xmltodict
}:
buildPythonPackage rec {
pname = "reptor";
version = "0.8";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "Syslifters";
repo = "reptor";
rev = "refs/tags/${version}";
hash = "sha256-YnDAjbj3TTr+WajuW6Dq3f+fjeJxrWk7VNWKhh9O7Zw=";
};
pythonRelaxDeps = true;
nativeBuildInputs = [
pythonRelaxDepsHook
setuptools
];
propagatedBuildInputs = [
asgiref
certifi
charset-normalizer
cvss
django
idna
markdown-it-py
mdurl
pygments
pyyaml
requests
rich
sqlparse
termcolor
tomli
tomlkit
tomli-w
urllib3
xmltodict
];
passthru.optional-dependencies = {
ghostwriter = [
gql
] ++ gql.optional-dependencies.aiohttp;
translate = [
deepl
];
};
nativeCheckInputs = [
pytestCheckHook
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
preCheck = ''
export HOME=$(mktemp -d)
export PATH="$PATH:$out/bin";
'';
pythonImportsCheck = [
"reptor"
];
disabledTestPaths = [
# Tests want to use pip install dependencies
"reptor/plugins/importers/GhostWriter/tests/test_ghostwriter.py"
];
disabledTests = [
# Tests need network access
"TestDummy"
"TestIntegration"
];
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 ];
};
}