diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/msoffcrypto-tool/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/msoffcrypto-tool/default.nix | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/msoffcrypto-tool/default.nix b/nixpkgs/pkgs/development/python-modules/msoffcrypto-tool/default.nix new file mode 100644 index 000000000000..4f3dbc60d18a --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/msoffcrypto-tool/default.nix @@ -0,0 +1,55 @@ +{ lib +, olefile +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, cryptography +, pytestCheckHook +, pythonOlder +, setuptools +}: + +buildPythonPackage rec { + pname = "msoffcrypto-tool"; + version = "4.12.0"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "nolze"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-EBEwldh2Ct/4oxnAF1hWeW/uRrVsCYEi0cJaZubofFk="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + cryptography + olefile + setuptools + ]; + + checkInputs = [ + pytestCheckHook + ]; + + disabledTests = [ + # Test fails with AssertionError + "test_cli" + ]; + + pythonImportsCheck = [ + "msoffcrypto" + ]; + + meta = with lib; { + description = "Python tool and library for decrypting MS Office files with passwords or other keys"; + homepage = "https://github.com/nolze/msoffcrypto-tool"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} |