-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python312Packages.docling-parse: init at 2.0.2
Co-authored-by: Gaétan Lepage <[email protected]>
- Loading branch information
1 parent
4a8aacb
commit f076c49
Showing
2 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
{ | ||
lib, | ||
buildPythonPackage, | ||
fetchFromGitHub, | ||
cmake, | ||
pkg-config, | ||
cxxopts, | ||
poetry-core, | ||
pybind11, | ||
tabulate, | ||
zlib, | ||
nlohmann_json, | ||
utf8cpp, | ||
libjpeg, | ||
qpdf, | ||
loguru-cpp, | ||
pytestCheckHook, | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "docling-parse"; | ||
version = "2.0.2"; | ||
pyproject = true; | ||
|
||
src = fetchFromGitHub { | ||
owner = "DS4SD"; | ||
repo = "docling-parse"; | ||
rev = "refs/tags/v${version}"; | ||
hash = "sha256-unXGmMp5xyRCqSoFmqcQAZOBzpE0EzgEEBIfZUHhRcQ="; | ||
}; | ||
|
||
dontUseCmakeConfigure = true; | ||
|
||
nativeBuildInputs = [ | ||
cmake | ||
pkg-config | ||
]; | ||
|
||
build-system = [ | ||
poetry-core | ||
pybind11 | ||
]; | ||
|
||
env.NIX_CFLAGS_COMPILE = [ | ||
"-I${lib.getDev utf8cpp}/include/utf8cpp" | ||
]; | ||
|
||
buildInputs = [ | ||
cxxopts | ||
libjpeg | ||
loguru-cpp | ||
nlohmann_json | ||
qpdf | ||
utf8cpp | ||
zlib | ||
]; | ||
|
||
env.USE_SYSTEM_DEPS = true; | ||
|
||
cmakeFlags = [ | ||
"-DUSE_SYSTEM_DEPS=True" | ||
]; | ||
|
||
dependencies = [ | ||
tabulate | ||
]; | ||
|
||
pythonImportsCheck = [ | ||
"docling_parse" | ||
]; | ||
|
||
nativeCheckInputs = [ | ||
pytestCheckHook | ||
]; | ||
|
||
meta = { | ||
changelog = "https://github.com/DS4SD/docling-parse/blob/${src.rev}/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 = with lib.maintainers; [ drupol ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters