depot/third_party/nixpkgs/pkgs/development/python-modules/docx2python/default.nix
Default email b5f92a349c Project import generated by Copybara.
GitOrigin-RevId: 7c9cc5a6e5d38010801741ac830a3f8fd667a7a0
2023-10-19 15:55:26 +02:00

43 lines
942 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, poetry-core
, lxml
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "docx2python";
version = "2.11.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "ShayHill";
repo = "docx2python";
rev = "refs/tags/${version}";
hash = "sha256-SavRYnNbESRQh9Elk8qCt/qdI2x+sYZJFMYy+Gojg2k=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
lxml
];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "docx2python" ];
meta = with lib; {
homepage = "https://github.com/ShayHill/docx2python";
description = "Extract docx headers, footers, (formatted) text, footnotes, endnotes, properties, and images";
changelog = "https://github.com/ShayHill/docx2python/blob/${src.rev}/CHANGELOG.md";
maintainers = [ maintainers.ivar ];
license = licenses.mit;
};
}