1{
2 lib,
3 buildPythonPackage,
4 capstone,
5 click,
6 cryptography,
7 dnfile,
8 fetchFromGitHub,
9 pefile,
10 pycryptodomex,
11 pyelftools,
12 pythonOlder,
13 setuptools,
14 pytestCheckHook,
15 typing-extensions,
16 yara-python,
17}:
18
19buildPythonPackage rec {
20 pname = "malduck";
21 version = "4.4.1";
22 pyproject = true;
23
24 disabled = pythonOlder "3.8";
25
26 src = fetchFromGitHub {
27 owner = "CERT-Polska";
28 repo = "malduck";
29 tag = "v${version}";
30 hash = "sha256-Btx0HxiZWrb0TDpBokQGtBE2EDK0htONe/DwqlPgAd4=";
31 };
32
33 build-system = [ setuptools ];
34
35 dependencies = [
36 capstone
37 click
38 cryptography
39 dnfile
40 pefile
41 pycryptodomex
42 pyelftools
43 typing-extensions
44 yara-python
45 ];
46
47 nativeCheckInputs = [ pytestCheckHook ];
48
49 pythonImportsCheck = [ "malduck" ];
50
51 meta = with lib; {
52 description = "Helper for malware analysis";
53 homepage = "https://github.com/CERT-Polska/malduck";
54 changelog = "https://github.com/CERT-Polska/malduck/releases/tag/v${version}";
55 license = with licenses; [ bsd3 ];
56 maintainers = with maintainers; [ fab ];
57 mainProgram = "malduck";
58 };
59}