Skip to content

Commit

Permalink
python312Packages.docling-parse: init at 2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Nov 2, 2024
1 parent a32d377 commit 6ff6077
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 0 deletions.
80 changes: 80 additions & 0 deletions pkgs/development/python-modules/docling-parse/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
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 = "v${version}";
hash = "sha256-unXGmMp5xyRCqSoFmqcQAZOBzpE0EzgEEBIfZUHhRcQ=";
};

dontUseCmakeConfigure = true;

build-system = [
cmake
poetry-core
pybind11
pkg-config
];

CXXFLAGS = [
"-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 ];
};
}
4 changes: 4 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3680,6 +3680,10 @@ self: super: with self; {

dockerspawner = callPackage ../development/python-modules/dockerspawner { };

docling-parse = callPackage ../development/python-modules/docling-parse {
loguru-cpp = pkgs.loguru;
};

docloud = callPackage ../development/python-modules/docloud { };

docstr-coverage = callPackage ../development/python-modules/docstr-coverage { };
Expand Down

0 comments on commit 6ff6077

Please sign in to comment.