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