Something went wrong. Try again.
Nix Packages collection & NixOS github.com/NixOS/nixpkgs
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112{ lib, buildPythonPackage, fetchFromGitHub,
# build-system cmake, pybind11, setuptools,
# nativeBuildInputs pkg-config,
# buildInputs blend2d, cxxopts, freetype, lcms2, libjpeg, loguru-cpp, nlohmann_json, openjpeg, qpdf, utf8cpp, zlib,
# dependencies docling-core, pillow, pydantic,}:
buildPythonPackage (finalAttrs: { pname = "docling-parse"; version = "7.8.1"; pyproject = true; __structuredAttrs = true;
src = fetchFromGitHub { owner = "docling-project"; repo = "docling-parse"; tag = "v${finalAttrs.version}"; hash = "sha256-WTXWIJWwxfBdPnoCvo1sq7o9itG/MUX3FNz1GGtvaVo="; };
# cibuildwheel and delocate are listed as build-system dependencies but are only used in CI to # build wheels. postPatch = '' substituteInPlace pyproject.toml \ --replace-fail \ "cmake>=3.27.0,<4.0.0" \ "cmake>=3.27.0" \ --replace-fail \ "\"cibuildwheel>=2.19.2,<4.0.0; python_version >= '3.11'\"," \ "" \ --replace-fail \ '"delocate>=0.11.0,<1.0.0",' \ "" '';
dontUseCmakeConfigure = true;
nativeBuildInputs = [ pkg-config ];
build-system = [ cmake pybind11 setuptools ];
env = { NIX_CFLAGS_COMPILE = "-I${lib.getDev utf8cpp}/include/utf8cpp"; USE_SYSTEM_DEPS = "ON"; };
buildInputs = [ blend2d cxxopts freetype lcms2 libjpeg loguru-cpp nlohmann_json openjpeg qpdf utf8cpp zlib ];
dependencies = [ docling-core pillow pydantic ];
pythonImportsCheck = [ "docling_parse" ];
# The whole test suite requires the test corpus, which `tests/conftest.py` unconditionally # downloads from HuggingFace in `pytest_sessionstart`. doCheck = false;
meta = { changelog = "https://github.com/DS4SD/docling-parse/blob/${finalAttrs.src.tag}/CHANGELOG.md"; description = "Simple package to extract text with coordinates from programmatic PDFs"; homepage = "https://github.com/DS4SD/docling-parse"; license = lib.licenses.mit; maintainers = [ ]; };})