about summary refs log tree commit diff
path: root/pkgs/development/python-modules/docx2python/default.nix
blob: 4a646d45026b1524c85d52d8483ff6b6110f3088 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
  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;
  };
}