1{
2 lib,
3 beautifulsoup4,
4 buildPythonPackage,
5 fetchFromGitHub,
6 base58,
7 bech32,
8 cashaddress,
9 cbor,
10 eth-hash,
11 intervaltree,
12 langdetect,
13 lxml,
14 pdfminer-six,
15 phonenumbers,
16 python-magic,
17 readabilipy,
18 pytestCheckHook,
19 pythonOlder,
20 setuptools,
21}:
22
23buildPythonPackage rec {
24 pname = "iocsearcher";
25 version = "2.3-unstable-2024-03-04";
26 pyproject = true;
27
28 disabled = pythonOlder "3.7";
29
30 src = fetchFromGitHub {
31 owner = "malicialab";
32 repo = "iocsearcher";
33 rev = "5f7b87761f2195eb358006f3492f0beac7ecc4b0";
34 hash = "sha256-SYh0+JEZa95iBznNzXut/9Vwof6VFeSlt0/g+XmMPC0=";
35 };
36
37 nativeBuildInputs = [ setuptools ];
38
39 propagatedBuildInputs = [
40 base58
41 beautifulsoup4
42 bech32
43 cashaddress
44 cbor
45 eth-hash
46 intervaltree
47 langdetect
48 lxml
49 pdfminer-six
50 phonenumbers
51 python-magic
52 readabilipy
53 ] ++ eth-hash.optional-dependencies.pycryptodome;
54
55 # Module has no tests
56 doCheck = false;
57
58 pythonImportsCheck = [ "iocsearcher" ];
59
60 meta = with lib; {
61 description = "Library and command line tool for extracting indicators of compromise (IOCs)";
62 mainProgram = "iocsearcher";
63 homepage = "https://github.com/malicialab/iocsearcher";
64 changelog = "https://github.com/malicialab/iocsearcher/releases/tag/v${version}";
65 license = licenses.mit;
66 maintainers = with maintainers; [ fab ];
67 };
68}