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