1{
2 lib,
3 beautifulsoup4,
4 buildPythonPackage,
5 click,
6 colorama,
7 fetchFromGitHub,
8 html2text,
9 lxml,
10 markdown,
11 pytestCheckHook,
12 python-dateutil,
13 pythonOlder,
14 pytz,
15 requests,
16 setuptools,
17 simplejson,
18 tabulate,
19}:
20
21buildPythonPackage rec {
22 pname = "faraday-plugins";
23 version = "1.17.0";
24 pyproject = true;
25
26 disabled = pythonOlder "3.7";
27
28 src = fetchFromGitHub {
29 owner = "infobyte";
30 repo = "faraday_plugins";
31 rev = "refs/tags/${version}";
32 hash = "sha256-EE61RPantD1u9NNhyPRjoRkBifM3u16b0BC2aQC8UBA=";
33 };
34
35 postPatch = ''
36 substituteInPlace setup.py \
37 --replace-warn "version=version," "version='${version}',"
38 '';
39
40 nativeBuildInputs = [ setuptools ];
41
42 propagatedBuildInputs = [
43 beautifulsoup4
44 click
45 colorama
46 html2text
47 lxml
48 markdown
49 python-dateutil
50 pytz
51 requests
52 simplejson
53 tabulate
54 ];
55
56 nativeCheckInputs = [ pytestCheckHook ];
57
58 disabledTestPaths = [
59 # faraday itself is currently not available
60 "tests/test_report_collection.py"
61 ];
62
63 disabledTests = [
64 # Fail because of missing faraday
65 "test_detect_report"
66 "test_process_report_summary"
67 # JSON parsing issue
68 "test_process_report_ignore_info"
69 "test_process_report_tags"
70 ];
71
72 pythonImportsCheck = [ "faraday_plugins" ];
73
74 meta = with lib; {
75 description = "Security tools report parsers for Faraday";
76 mainProgram = "faraday-plugins";
77 homepage = "https://github.com/infobyte/faraday_plugins";
78 changelog = "https://github.com/infobyte/faraday_plugins/releases/tag/${version}";
79 license = with licenses; [ gpl3Only ];
80 maintainers = with maintainers; [ fab ];
81 };
82}