depot/third_party/nixpkgs/pkgs/development/python-modules/reptor/default.nix
Default email b5f92a349c Project import generated by Copybara.
GitOrigin-RevId: 7c9cc5a6e5d38010801741ac830a3f8fd667a7a0
2023-10-19 15:55:26 +02:00

111 lines
1.8 KiB
Nix

{ lib
, asgiref
, buildPythonPackage
, certifi
, charset-normalizer
, cvss
, deepl
, django
, fetchFromGitHub
, gql
, idna
, markdown-it-py
, mdurl
, pygments
, pytest
, pytestCheckHook
, pythonOlder
, pyyaml
, reptor
, requests
, rich
, setuptools
, sqlparse
, termcolor
, toml
, tomli-w
, urllib3
, xmltodict
}:
buildPythonPackage rec {
pname = "reptor";
version = "0.5";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "Syslifters";
repo = "reptor";
rev = "refs/tags/${version}";
hash = "sha256-TN4ti860bMegxsCMhSxVQwiTLCB9nl+CJ+xDzJQcRuE=";
};
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
asgiref
certifi
charset-normalizer
cvss
django
idna
markdown-it-py
mdurl
pygments
pyyaml
requests
rich
sqlparse
termcolor
toml
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 ];
};
}