1{ lib, buildPythonPackage, fetchFromGitHub, pytestCheckHook }:
2
3buildPythonPackage rec {
4 pname = "docx2python";
5 version = "unstable-2020-11-15";
6
7 # Pypi does not contain tests
8 src = fetchFromGitHub {
9 owner = "ShayHill";
10 repo = pname;
11 rev = "21b2edafc0a01a6cfb73aefc61747a65917e2cad";
12 sha256 = "1nwg17ziwm9a2x7yxsscj8zgc1d383ifsk5w7qa2fws6gf627kyi";
13 };
14
15 preCheck = "cd test"; # Tests require the `test/resources` folder to be accessible
16 checkInputs = [ pytestCheckHook ];
17 disabledTests = [ # asserts related to file deletions fail
18 "test_docx2python.py"
19 "test_docx_context.py"
20 "test_google_docs.py"
21 ];
22 pythonImportsCheck = [ "docx2python" ];
23
24 meta = with lib; {
25 homepage = "https://github.com/ShayHill/docx2python";
26 description = "Extract docx headers, footers, (formatted) text, footnotes, endnotes, properties, and images";
27 maintainers = [ maintainers.ivar ];
28 license = licenses.mit;
29 };
30}