Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
3.6 kB · 183 lines
Nix
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184{ lib, buildPythonPackage, fetchFromGitHub,
# build system poetry-core,
# dependencies accelerate, beautifulsoup4, certifi, docling-core, docling-ibm-models, docling-parse, easyocr, filetype, huggingface-hub, lxml, marko, # ocrmac # not yet packaged onnxruntime, openpyxl, pandas, pillow, pluggy, pydantic, pydantic-settings, pylatexenc, pypdfium2, python-docx, python-pptx, rapidocr-onnxruntime, requests, rtree, scipy, tesserocr, tqdm, transformers, typer,
# optional dependencies # mkdocs-click # not yet packaged mkdocs-jupyter, mkdocs-material, mkdocstrings,
# tests pytestCheckHook, writableTmpDirAsHomeHook,}:
buildPythonPackage rec { pname = "docling"; version = "2.42.0"; pyproject = true;
src = fetchFromGitHub { owner = "docling-project"; repo = "docling"; tag = "v${version}"; hash = "sha256-9HUomW55Yg5N7u3Wb4imzRUYECeGkb3lkHPLEGzuAnA="; };
build-system = [ poetry-core ];
dependencies = [ accelerate beautifulsoup4 certifi docling-core docling-ibm-models docling-parse easyocr filetype huggingface-hub lxml marko # ocrmac # not yet packaged onnxruntime openpyxl pandas pillow pluggy pydantic pydantic-settings pylatexenc pypdfium2 python-docx python-pptx rapidocr-onnxruntime requests rtree scipy tesserocr tqdm transformers typer ];
pythonRelaxDeps = [ "pillow" ];
optional-dependencies = { ocrmac = [ # ocrmac # not yet packaged ]; rapidocr = [ onnxruntime rapidocr-onnxruntime ]; tesserocr = [ tesserocr ];
docs = [ # mkdocs-click # not yet packaged mkdocs-jupyter mkdocs-material mkdocstrings # griffle-pydantic ]; };
nativeCheckInputs = [ pytestCheckHook writableTmpDirAsHomeHook ];
pythonImportsCheck = [ "docling" ];
disabledTests = [ "test_e2e_pdfs_conversions" # AssertionError: ## TableFormer: Table Structure Understanding with Transf "test_e2e_conversions" # RuntimeError: Tesseract is not available
# AssertionError # assert doc.export_to_markdown() == pair[1], f"Error in case {idx}" "test_ordered_lists"
# AssertionError: export to md "test_e2e_html_conversions"
# AssertionError: assert 'Unordered li...d code block:' == 'Unordered li...d code block:' "test_convert_valid"
# AssertionError: Markdown file mismatch against groundtruth pftaps057006474.md "test_patent_groundtruth"
# huggingface_hub.errors.LocalEntryNotFoundError: An error happened "test_cli_convert" "test_code_and_formula_conversion" "test_picture_classifier" "test_convert_path" "test_convert_stream" "test_compare_legacy_output" "test_ocr_coverage_threshold" "test_formula_conversion_with_page_range"
# requires network access "test_page_range" "test_parser_backends" "test_confidence" "test_e2e_webp_conversions" "test_asr_pipeline_conversion"
# AssertionError: pred_itxt==true_itxt "test_e2e_valid_csv_conversions" ];
meta = { description = "Get your documents ready for gen AI"; homepage = "https://github.com/DS4SD/docling"; changelog = "https://github.com/DS4SD/docling/blob/${src.tag}/CHANGELOG.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ happysalada ]; mainProgram = "docling"; };}