2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
colorclass,
|
|
|
|
easygui,
|
|
|
|
fetchFromGitHub,
|
|
|
|
msoffcrypto-tool,
|
|
|
|
olefile,
|
|
|
|
pcodedmp,
|
|
|
|
pyparsing,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2021-12-19 01:06:50 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "oletools";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "0.60.2";
|
2021-12-19 01:06:50 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "decalage2";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-ons1VeWStxUZw2CPpnX9p5I3Q7cMhi34JU8TeuUDt+Y=";
|
2021-12-19 01:06:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
colorclass
|
|
|
|
easygui
|
|
|
|
msoffcrypto-tool
|
|
|
|
olefile
|
|
|
|
pcodedmp
|
|
|
|
pyparsing
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-12-19 01:06:50 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "pyparsing>=2.1.0,<3" "pyparsing>=2.1.0"
|
|
|
|
'';
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Test fails with AssertionError: Tuples differ: ('MS Word 2007+...
|
|
|
|
"test_all"
|
2022-05-18 14:49:53 +00:00
|
|
|
"test_xlm"
|
2021-12-19 01:06:50 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "oletools" ];
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-05-18 14:49:53 +00:00
|
|
|
description = "Module to analyze MS OLE2 files and MS Office documents";
|
2021-12-19 01:06:50 +00:00
|
|
|
homepage = "https://github.com/decalage2/oletools";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = with licenses; [
|
|
|
|
bsd2 # and
|
|
|
|
mit
|
|
|
|
];
|
2021-12-19 01:06:50 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|