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.11.1";
43 format = "pyproject";
44
45 disabled = pythonOlder "3.11.1";
46
47 src = fetchFromGitHub {
48 owner = "fox-it";
49 repo = "dissect.target";
50 rev = "refs/tags/${version}";
51 hash = "sha256-xT0PXah+sYzSDRoBU4OWBp+zhlinKRuQUDBLvos4zKk=";
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 # Tests compare dates and times
112 "yum"
113 # Filesystem access, windows defender tests
114 "test_defender_quarantine_recovery"
115 ] ++
116 # test is broken on Darwin
117 lib.optional stdenv.hostPlatform.isDarwin "test_fs_attrs_no_os_listxattr";
118
119 disabledTestPaths = [
120 # Tests are using Windows paths
121 "tests/test_plugins_browsers.py"
122 ];
123
124 meta = with lib; {
125 description = "Dissect module that provides a programming API and command line tools";
126 homepage = "https://github.com/fox-it/dissect.target";
127 changelog = "https://github.com/fox-it/dissect.target/releases/tag/${version}";
128 license = licenses.agpl3Only;
129 maintainers = with maintainers; [ fab ];
130 };
131}