1{
2 lib,
3 olefile,
4 buildPythonPackage,
5 fetchFromGitHub,
6 poetry-core,
7 cryptography,
8 pytestCheckHook,
9 pythonOlder,
10 setuptools,
11}:
12
13buildPythonPackage rec {
14 pname = "msoffcrypto-tool";
15 version = "5.4.2";
16 pyproject = true;
17
18 disabled = pythonOlder "3.8";
19
20 src = fetchFromGitHub {
21 owner = "nolze";
22 repo = "msoffcrypto-tool";
23 tag = "v${version}";
24 hash = "sha256-nwCjgcZqD0hptHC0WqIodHC5m/JHYyUdfEngIoXzNqA=";
25 };
26
27 build-system = [ poetry-core ];
28
29 dependencies = [
30 cryptography
31 olefile
32 setuptools
33 ];
34
35 nativeCheckInputs = [ pytestCheckHook ];
36
37 disabledTests = [
38 # Test fails with AssertionError
39 "test_cli"
40 ];
41
42 pythonImportsCheck = [ "msoffcrypto" ];
43
44 meta = with lib; {
45 description = "Python tool and library for decrypting MS Office files with passwords or other keys";
46 homepage = "https://github.com/nolze/msoffcrypto-tool";
47 changelog = "https://github.com/nolze/msoffcrypto-tool/blob/v${version}/CHANGELOG.md";
48 license = with licenses; [ mit ];
49 maintainers = with maintainers; [ fab ];
50 mainProgram = "msoffcrypto-tool";
51 };
52}