nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 colorclass,
5 easygui,
6 fetchFromGitHub,
7 msoffcrypto-tool,
8 olefile,
9 pcodedmp,
10 pyparsing,
11 pytestCheckHook,
12}:
13
14buildPythonPackage rec {
15 pname = "oletools";
16 version = "0.60.2";
17 format = "setuptools";
18
19 src = fetchFromGitHub {
20 owner = "decalage2";
21 repo = "oletools";
22 rev = "v${version}";
23 hash = "sha256-ons1VeWStxUZw2CPpnX9p5I3Q7cMhi34JU8TeuUDt+Y=";
24 };
25
26 propagatedBuildInputs = [
27 colorclass
28 easygui
29 msoffcrypto-tool
30 olefile
31 pcodedmp
32 pyparsing
33 ];
34
35 nativeCheckInputs = [ pytestCheckHook ];
36
37 postPatch = ''
38 substituteInPlace setup.py \
39 --replace "pyparsing>=2.1.0,<3" "pyparsing>=2.1.0"
40 '';
41
42 disabledTests = [
43 # Test fails with AssertionError: Tuples differ: ('MS Word 2007+...
44 "test_all"
45 "test_xlm"
46 ];
47
48 pythonImportsCheck = [ "oletools" ];
49
50 meta = {
51 description = "Module to analyze MS OLE2 files and MS Office documents";
52 homepage = "https://github.com/decalage2/oletools";
53 license = with lib.licenses; [
54 bsd2 # and
55 mit
56 ];
57 maintainers = with lib.maintainers; [ fab ];
58 };
59}