1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
|
{ lib
, stdenv
, asn1crypto
, buildPythonPackage
, defusedxml
, dissect-btrfs
, dissect-cim
, dissect-clfs
, dissect-cstruct
, dissect-esedb
, dissect-etl
, dissect-eventlog
, dissect-evidence
, dissect-extfs
, dissect-fat
, dissect-ffs
, dissect-hypervisor
, dissect-ntfs
, dissect-regf
, dissect-shellitem
, dissect-sql
, dissect-thumbcache
, dissect-util
, dissect-volume
, dissect-xfs
, fetchFromGitHub
, flow-record
, fusepy
, impacket
, ipython
, paho-mqtt
, pycryptodome
, pytestCheckHook
, pythonOlder
, ruamel-yaml
, setuptools
, setuptools-scm
, structlog
, tomli
, yara-python
, zstandard
}:
buildPythonPackage rec {
pname = "dissect-target";
version = "3.17";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "fox-it";
repo = "dissect.target";
rev = "refs/tags/${version}";
hash = "sha256-UIgHjSTHaxo8jCqe+R6rRxQXX8RUFKAI5+zscInAtgg=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "flow.record~=" "flow.record>="
'';
build-system = [
setuptools
setuptools-scm
];
dependencies = [
defusedxml
dissect-cstruct
dissect-eventlog
dissect-evidence
dissect-hypervisor
dissect-ntfs
dissect-regf
dissect-util
dissect-volume
flow-record
structlog
];
passthru.optional-dependencies = {
full = [
asn1crypto
dissect-btrfs
dissect-cim
dissect-clfs
dissect-esedb
dissect-etl
dissect-extfs
dissect-fat
dissect-ffs
dissect-shellitem
dissect-sql
dissect-thumbcache
dissect-xfs
fusepy
ipython
pycryptodome
ruamel-yaml
yara-python
zstandard
] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
yara = [
yara-python
] ++ passthru.optional-dependencies.full;
smb = [
impacket
] ++ passthru.optional-dependencies.full;
mqtt = [
paho-mqtt
] ++ passthru.optional-dependencies.full;
};
nativeCheckInputs = [
pytestCheckHook
] ++ passthru.optional-dependencies.full;
pythonImportsCheck = [
"dissect.target"
];
disabledTests = [
"test_cpio"
# Test requires rdump
"test_exec_target_command"
# Issue with tar file
"test_dpapi_decrypt_blob"
"test_md"
"test_nested_md_lvm"
"test_notifications_appdb"
"test_notifications_wpndatabase"
"test_tar_anonymous_filesystems"
"test_tar_sensitive_drive_letter"
# Tests compare dates and times
"yum"
# Filesystem access, windows defender tests
"test_config_tree_plugin"
"test_defender_quarantine_recovery"
"test_execute_pipeline"
"test_keychain_register_keychain_file"
"test_plugins_child_docker"
"test_plugins_child_wsl"
"test_reg_output"
"test_regflex"
"test_systemd_basic_syntax"
"test_target_cli_unicode_argparse"
"test_target_query"
] ++
# test is broken on Darwin
lib.optional stdenv.hostPlatform.isDarwin "test_fs_attrs_no_os_listxattr";
disabledTestPaths = [
# Tests are using Windows paths, missing test files
"tests/plugins/apps/"
# ValueError: Invalid Locate file magic. Expected /x00LOCATE02/x00
"tests/plugins/os/unix/locate/"
# Missing plugin support
"tests/tools/test_dump.py"
"tests/plugins/os/"
"tests/plugins/filesystem/"
"tests/test_registration.py"
"tests/filesystems/"
"tests/test_filesystem.py"
"tests/loaders/"
];
meta = with lib; {
description = "Dissect module that provides a programming API and command line tools";
homepage = "https://github.com/fox-it/dissect.target";
changelog = "https://github.com/fox-it/dissect.target/releases/tag/${version}";
license = licenses.agpl3Only;
maintainers = with maintainers; [ fab ];
};
}
|