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 tldextract,
20}:
21
22buildPythonPackage rec {
23 pname = "faraday-plugins";
24 version = "1.24.0";
25 pyproject = true;
26
27 disabled = pythonOlder "3.7";
28
29 src = fetchFromGitHub {
30 owner = "infobyte";
31 repo = "faraday_plugins";
32 tag = version;
33 hash = "sha256-GADunGRBcVTnzYzBgXQH2IkDXHRSJiPsdeRBEdJJs0s=";
34 };
35
36 postPatch = ''
37 substituteInPlace setup.py \
38 --replace-fail "version=version," "version='${version}',"
39 '';
40
41 build-system = [ setuptools ];
42
43 dependencies = [
44 beautifulsoup4
45 click
46 colorama
47 html2text
48 lxml
49 markdown
50 python-dateutil
51 pytz
52 requests
53 simplejson
54 tabulate
55 tldextract
56 ];
57
58 nativeCheckInputs = [ pytestCheckHook ];
59
60 disabledTestPaths = [
61 # faraday itself is currently not available
62 "tests/test_report_collection.py"
63 ];
64
65 disabledTests = [
66 # Fail because of missing faraday
67 "test_detect_report"
68 "test_process_report_summary"
69 # JSON parsing issue
70 "test_process_report_ignore_info"
71 "test_process_report_tags"
72 ];
73
74 pythonImportsCheck = [ "faraday_plugins" ];
75
76 meta = with lib; {
77 description = "Security tools report parsers for Faraday";
78 homepage = "https://github.com/infobyte/faraday_plugins";
79 changelog = "https://github.com/infobyte/faraday_plugins/releases/tag/${version}";
80 license = licenses.gpl3Only;
81 maintainers = with maintainers; [ fab ];
82 mainProgram = "faraday-plugins";
83 };
84}