2022-10-21 18:38:19 +00:00
|
|
|
{ lib
|
2023-07-15 17:15:38 +00:00
|
|
|
, stdenv
|
2022-10-21 18:38:19 +00:00
|
|
|
, asn1crypto
|
|
|
|
, buildPythonPackage
|
|
|
|
, defusedxml
|
2024-05-15 15:35:15 +00:00
|
|
|
, dissect-btrfs
|
2022-10-21 18:38:19 +00:00
|
|
|
, 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
|
2023-07-15 17:15:38 +00:00
|
|
|
, dissect-shellitem
|
2024-05-15 15:35:15 +00:00
|
|
|
, dissect-sql
|
2022-12-17 10:02:37 +00:00
|
|
|
, dissect-thumbcache
|
2022-10-21 18:38:19 +00:00
|
|
|
, dissect-util
|
|
|
|
, dissect-volume
|
|
|
|
, dissect-xfs
|
|
|
|
, fetchFromGitHub
|
|
|
|
, flow-record
|
|
|
|
, fusepy
|
2024-05-15 15:35:15 +00:00
|
|
|
, impacket
|
2022-10-21 18:38:19 +00:00
|
|
|
, ipython
|
2024-05-15 15:35:15 +00:00
|
|
|
, paho-mqtt
|
2023-02-16 17:41:37 +00:00
|
|
|
, pycryptodome
|
2022-10-21 18:38:19 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2024-05-15 15:35:15 +00:00
|
|
|
, ruamel-yaml
|
2022-10-21 18:38:19 +00:00
|
|
|
, setuptools
|
|
|
|
, setuptools-scm
|
|
|
|
, structlog
|
2024-05-15 15:35:15 +00:00
|
|
|
, tomli
|
2022-10-21 18:38:19 +00:00
|
|
|
, yara-python
|
|
|
|
, zstandard
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dissect-target";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "3.17";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2022-10-21 18:38:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fox-it";
|
|
|
|
repo = "dissect.target";
|
2023-02-16 17:41:37 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-UIgHjSTHaxo8jCqe+R6rRxQXX8RUFKAI5+zscInAtgg=";
|
2022-10-21 18:38:19 +00:00
|
|
|
};
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-05-15 15:35:15 +00:00
|
|
|
--replace-fail "flow.record~=" "flow.record>="
|
2024-02-07 01:22:34 +00:00
|
|
|
'';
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [
|
2022-10-21 18:38:19 +00:00
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies = [
|
2023-02-16 17:41:37 +00:00
|
|
|
defusedxml
|
2022-10-21 18:38:19 +00:00
|
|
|
dissect-cstruct
|
|
|
|
dissect-eventlog
|
|
|
|
dissect-evidence
|
|
|
|
dissect-hypervisor
|
|
|
|
dissect-ntfs
|
|
|
|
dissect-regf
|
|
|
|
dissect-util
|
|
|
|
dissect-volume
|
|
|
|
flow-record
|
|
|
|
structlog
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
full = [
|
|
|
|
asn1crypto
|
2024-05-15 15:35:15 +00:00
|
|
|
dissect-btrfs
|
2022-10-21 18:38:19 +00:00
|
|
|
dissect-cim
|
|
|
|
dissect-clfs
|
|
|
|
dissect-esedb
|
|
|
|
dissect-etl
|
|
|
|
dissect-extfs
|
|
|
|
dissect-fat
|
|
|
|
dissect-ffs
|
2023-07-15 17:15:38 +00:00
|
|
|
dissect-shellitem
|
2022-10-21 18:38:19 +00:00
|
|
|
dissect-sql
|
2022-12-17 10:02:37 +00:00
|
|
|
dissect-thumbcache
|
2022-10-21 18:38:19 +00:00
|
|
|
dissect-xfs
|
|
|
|
fusepy
|
|
|
|
ipython
|
2023-02-16 17:41:37 +00:00
|
|
|
pycryptodome
|
2024-05-15 15:35:15 +00:00
|
|
|
ruamel-yaml
|
2022-10-21 18:38:19 +00:00
|
|
|
yara-python
|
|
|
|
zstandard
|
2024-05-15 15:35:15 +00:00
|
|
|
] ++ 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;
|
2022-10-21 18:38:19 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-10-21 18:38:19 +00:00
|
|
|
pytestCheckHook
|
|
|
|
] ++ passthru.optional-dependencies.full;
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"dissect.target"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
2024-04-21 15:54:59 +00:00
|
|
|
"test_cpio"
|
2022-10-21 18:38:19 +00:00
|
|
|
# Test requires rdump
|
|
|
|
"test_exec_target_command"
|
2023-02-16 17:41:37 +00:00
|
|
|
# Issue with tar file
|
2023-11-16 04:20:00 +00:00
|
|
|
"test_dpapi_decrypt_blob"
|
|
|
|
"test_md"
|
|
|
|
"test_nested_md_lvm"
|
2024-02-07 01:22:34 +00:00
|
|
|
"test_notifications_appdb"
|
|
|
|
"test_notifications_wpndatabase"
|
|
|
|
"test_tar_anonymous_filesystems"
|
|
|
|
"test_tar_sensitive_drive_letter"
|
2023-03-27 19:17:25 +00:00
|
|
|
# Tests compare dates and times
|
|
|
|
"yum"
|
2023-07-15 17:15:38 +00:00
|
|
|
# Filesystem access, windows defender tests
|
2024-05-15 15:35:15 +00:00
|
|
|
"test_config_tree_plugin"
|
2023-07-15 17:15:38 +00:00
|
|
|
"test_defender_quarantine_recovery"
|
2024-05-15 15:35:15 +00:00
|
|
|
"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"
|
2023-07-15 17:15:38 +00:00
|
|
|
] ++
|
|
|
|
# test is broken on Darwin
|
|
|
|
lib.optional stdenv.hostPlatform.isDarwin "test_fs_attrs_no_os_listxattr";
|
2023-03-27 19:17:25 +00:00
|
|
|
|
|
|
|
disabledTestPaths = [
|
2024-05-15 15:35:15 +00:00
|
|
|
# Tests are using Windows paths, missing test files
|
|
|
|
"tests/plugins/apps/"
|
2024-04-21 15:54:59 +00:00
|
|
|
# ValueError: Invalid Locate file magic. Expected /x00LOCATE02/x00
|
|
|
|
"tests/plugins/os/unix/locate/"
|
|
|
|
# Missing plugin support
|
2024-05-15 15:35:15 +00:00
|
|
|
"tests/tools/test_dump.py"
|
|
|
|
"tests/plugins/os/"
|
|
|
|
"tests/plugins/filesystem/"
|
|
|
|
"tests/test_registration.py"
|
|
|
|
"tests/filesystems/"
|
|
|
|
"tests/test_filesystem.py"
|
|
|
|
"tests/loaders/"
|
2022-10-21 18:38:19 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Dissect module that provides a programming API and command line tools";
|
|
|
|
homepage = "https://github.com/fox-it/dissect.target";
|
2023-02-16 17:41:37 +00:00
|
|
|
changelog = "https://github.com/fox-it/dissect.target/releases/tag/${version}";
|
2022-10-21 18:38:19 +00:00
|
|
|
license = licenses.agpl3Only;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|