24 buildPythonPackage rec {
25 pname = "unstructured-inference";
27 format = "setuptools";
29 src = fetchFromGitHub {
30 owner = "Unstructured-IO";
31 repo = "unstructured-inference";
32 rev = "refs/tags/${version}";
33 hash = "sha256-AxQHTUgE4CyiinT7HEh6fvbw+uVi7lKUgfOc1KZOezU=";
37 substituteInPlace requirements/base.in \
38 --replace "opencv-python" "opencv"
41 propagatedBuildInputs =
53 ++ layoutparser.optional-dependencies.layoutmodels ++ layoutparser.optional-dependencies.tesseract;
67 export HOME=$(mktemp -d)
71 # not sure why this fails
72 "test_get_path_oob_move_deeply_nested"
73 "test_get_path_oob_move_nested[False]"
80 "test_unstructured_inference/inference/test_layout.py"
81 "test_unstructured_inference/models/test_chippermodel.py"
82 "test_unstructured_inference/models/test_detectron2.py"
83 "test_unstructured_inference/models/test_detectron2onnx.py"
85 "test_unstructured_inference/models/test_donut.py"
86 "test_unstructured_inference/models/test_model.py"
87 "test_unstructured_inference/models/test_tables.py"
90 pythonImportsCheck = [ "unstructured_inference" ];
93 description = "hosted model inference code for layout parsing models";
94 homepage = "https://github.com/Unstructured-IO/unstructured-inference";
95 changelog = "https://github.com/Unstructured-IO/unstructured-inference/blob/${src.rev}/CHANGELOG.md";
96 license = licenses.asl20;
97 maintainers = with maintainers; [ happysalada ];