1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 poetry-core, 8 9 # dependencies 10 jsonref, 11 jsonschema, 12 latex2mathml, 13 pandas, 14 pillow, 15 pydantic, 16 pyyaml, 17 semchunk, 18 tabulate, 19 transformers, 20 typer, 21 typing-extensions, 22 23 # tests 24 jsondiff, 25 pytestCheckHook, 26 requests, 27}: 28 29buildPythonPackage rec { 30 pname = "docling-core"; 31 version = "2.30.1"; 32 pyproject = true; 33 34 src = fetchFromGitHub { 35 owner = "docling-project"; 36 repo = "docling-core"; 37 tag = "v${version}"; 38 hash = "sha256-HTWd3jEStoRlX9NYYEO3PmC9i/cn3k+SJ7RFP0fxa3M="; 39 }; 40 41 build-system = [ 42 poetry-core 43 ]; 44 45 dependencies = [ 46 jsonref 47 jsonschema 48 latex2mathml 49 pandas 50 pillow 51 pydantic 52 pyyaml 53 semchunk 54 tabulate 55 transformers 56 typer 57 typing-extensions 58 ]; 59 60 pythonRelaxDeps = [ 61 "pillow" 62 "typer" 63 ]; 64 65 pythonImportsCheck = [ 66 "docling_core" 67 ]; 68 69 nativeCheckInputs = [ 70 jsondiff 71 pytestCheckHook 72 requests 73 ]; 74 75 disabledTestPaths = [ 76 # attempts to download models 77 "test/test_hybrid_chunker.py" 78 ]; 79 80 meta = { 81 changelog = "https://github.com/DS4SD/docling-core/blob/${src.tag}/CHANGELOG.md"; 82 description = "Python library to define and validate data types in Docling"; 83 homepage = "https://github.com/DS4SD/docling-core"; 84 license = lib.licenses.mit; 85 maintainers = with lib.maintainers; [ drupol ]; 86 }; 87}