1{ lib
2, asn1crypto
3, buildPythonPackage
4, defusedxml
5, dissect-cim
6, dissect-clfs
7, dissect-cstruct
8, dissect-esedb
9, dissect-etl
10, dissect-eventlog
11, dissect-evidence
12, dissect-extfs
13, dissect-fat
14, dissect-ffs
15, dissect-hypervisor
16, dissect-ntfs
17, dissect-regf
18, dissect-sql
19, dissect-shellitem
20, dissect-thumbcache
21, dissect-util
22, dissect-volume
23, dissect-xfs
24, fetchFromGitHub
25, flow-record
26, fusepy
27, ipython
28, pycryptodome
29, pytestCheckHook
30, pythonOlder
31, pyyaml
32, setuptools
33, setuptools-scm
34, structlog
35, yara-python
36, zstandard
37}:
38
39buildPythonPackage rec {
40 pname = "dissect-target";
41 version = "3.9";
42 format = "pyproject";
43
44 disabled = pythonOlder "3.9";
45
46 src = fetchFromGitHub {
47 owner = "fox-it";
48 repo = "dissect.target";
49 rev = "refs/tags/${version}";
50 hash = "sha256-oqBBcoqk8HFuxnJK7/01Neb7Lwb1sIM/TMgXKVCBUoc=";
51 };
52
53 SETUPTOOLS_SCM_PRETEND_VERSION = version;
54
55 nativeBuildInputs = [
56 setuptools
57 setuptools-scm
58 ];
59
60 propagatedBuildInputs = [
61 defusedxml
62 dissect-cstruct
63 dissect-eventlog
64 dissect-evidence
65 dissect-hypervisor
66 dissect-ntfs
67 dissect-regf
68 dissect-util
69 dissect-volume
70 flow-record
71 structlog
72 ];
73
74 passthru.optional-dependencies = {
75 full = [
76 asn1crypto
77 dissect-cim
78 dissect-clfs
79 dissect-esedb
80 dissect-etl
81 dissect-extfs
82 dissect-fat
83 dissect-ffs
84 dissect-shellitem
85 dissect-sql
86 dissect-thumbcache
87 dissect-xfs
88 fusepy
89 ipython
90 pycryptodome
91 pyyaml
92 yara-python
93 zstandard
94 ];
95 };
96
97 nativeCheckInputs = [
98 pytestCheckHook
99 ] ++ passthru.optional-dependencies.full;
100
101 pythonImportsCheck = [
102 "dissect.target"
103 ];
104
105 disabledTests = [
106 # Test requires rdump
107 "test_exec_target_command"
108 # Issue with tar file
109 "test_tar_sensitive_drive_letter"
110 # Tests compare dates and times
111 "yum"
112 ];
113
114 disabledTestPaths = [
115 # Tests are using Windows paths
116 "tests/test_plugins_browsers.py"
117 ];
118
119 meta = with lib; {
120 description = "Dissect module that provides a programming API and command line tools";
121 homepage = "https://github.com/fox-it/dissect.target";
122 changelog = "https://github.com/fox-it/dissect.target/releases/tag/${version}";
123 license = licenses.agpl3Only;
124 maintainers = with maintainers; [ fab ];
125 };
126}