2021-12-19 01:06:50 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, colorclass
|
|
|
|
, easygui
|
|
|
|
, fetchFromGitHub
|
|
|
|
, msoffcrypto-tool
|
|
|
|
, olefile
|
|
|
|
, pcodedmp
|
|
|
|
, pyparsing
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, setuptools
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "oletools";
|
2022-05-18 14:49:53 +00:00
|
|
|
version = "0.60.1";
|
2021-12-19 01:06:50 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "decalage2";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-05-18 14:49:53 +00:00
|
|
|
hash = "sha256-H3oL8sk2r267wV0hoHOq9r9DY2Atxs+hZUVb6tmHy0w=";
|
2021-12-19 01:06:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
colorclass
|
|
|
|
easygui
|
|
|
|
msoffcrypto-tool
|
|
|
|
olefile
|
|
|
|
pcodedmp
|
|
|
|
pyparsing
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
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
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"oletools"
|
|
|
|
];
|
|
|
|
|
|
|
|
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";
|
|
|
|
license = with licenses; [ bsd2 /* and */ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|