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