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