depot/third_party/nixpkgs/pkgs/development/python-modules/msoffcrypto-tool/default.nix
Default email 5e9e1146e1 Project import generated by Copybara.
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
2023-08-05 00:07:22 +02:00

56 lines
1.1 KiB
Nix

{ lib
, olefile
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, cryptography
, pytestCheckHook
, pythonOlder
, setuptools
}:
buildPythonPackage rec {
pname = "msoffcrypto-tool";
version = "5.1.1";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "nolze";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-A1TeTE4TMHAb+KtFxTi+b4yTfuEFya8iyzy92dzQ0Z4=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
cryptography
olefile
setuptools
];
nativeCheckInputs = [
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";
changelog = "https://github.com/nolze/msoffcrypto-tool/blob/v${version}/CHANGELOG.md";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}