2023-07-09 16:10:55 +08:00
|
|
|
{
|
2025-04-24 20:27:01 +03:00
|
|
|
pkgs,
|
2025-06-09 06:20:06 +08:00
|
|
|
lib,
|
2023-07-09 16:10:55 +08:00
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2025-06-09 06:20:06 +08:00
|
|
|
setuptools,
|
2023-08-15 10:08:44 +02:00
|
|
|
jupyterlab,
|
|
|
|
nbexec,
|
|
|
|
pandas,
|
|
|
|
pandas-stubs,
|
2023-07-09 16:10:55 +08:00
|
|
|
pdfminer-six,
|
|
|
|
pillow,
|
2025-01-26 14:23:41 -05:00
|
|
|
pypdfium2,
|
|
|
|
pytest-cov,
|
2023-07-09 16:10:55 +08:00
|
|
|
pytest-parallel,
|
2023-08-15 10:08:44 +02:00
|
|
|
pytestCheckHook,
|
2023-07-09 16:10:55 +08:00
|
|
|
types-pillow,
|
2025-06-09 06:20:06 +08:00
|
|
|
writableTmpDirAsHomeHook,
|
2023-07-09 16:10:55 +08:00
|
|
|
}:
|
2023-08-15 10:08:44 +02:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2023-07-09 16:10:55 +08:00
|
|
|
pname = "pdfplumber";
|
2025-06-09 06:20:06 +08:00
|
|
|
version = "0.11.6";
|
|
|
|
pyproject = true;
|
2023-07-09 16:10:55 +08:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jsvine";
|
|
|
|
repo = "pdfplumber";
|
2025-01-03 21:24:13 +01:00
|
|
|
tag = "v${version}";
|
2025-06-09 06:20:06 +08:00
|
|
|
hash = "sha256-ljoM252w0oOqTUgYT6jtAW+jElPU9a49K6Atwdv5Dvo=";
|
2023-07-09 16:10:55 +08:00
|
|
|
};
|
|
|
|
|
2025-06-09 06:20:06 +08:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
2025-01-26 14:23:41 -05:00
|
|
|
dependencies = [
|
2023-07-09 16:10:55 +08:00
|
|
|
pdfminer-six
|
|
|
|
pillow
|
2025-01-26 14:23:41 -05:00
|
|
|
pypdfium2
|
2023-07-09 16:10:55 +08:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
2025-04-24 20:27:01 +03:00
|
|
|
pkgs.ghostscript
|
2023-08-15 10:08:44 +02:00
|
|
|
jupyterlab
|
|
|
|
nbexec
|
2023-07-09 16:10:55 +08:00
|
|
|
pandas
|
|
|
|
pandas-stubs
|
2025-01-26 14:23:41 -05:00
|
|
|
pytest-cov
|
2023-08-15 10:08:44 +02:00
|
|
|
pytest-parallel
|
|
|
|
pytestCheckHook
|
2023-07-09 16:10:55 +08:00
|
|
|
types-pillow
|
2025-06-09 06:20:06 +08:00
|
|
|
writableTmpDirAsHomeHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonRelaxDeps = [ "pdfminer.six" ];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# AssertionError
|
|
|
|
"tests/test_convert.py::Test::test_cli_csv"
|
|
|
|
"tests/test_convert.py::Test::test_cli_csv_exclude"
|
|
|
|
"tests/test_convert.py::Test::test_csv"
|
2023-07-09 16:10:55 +08:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pdfplumber" ];
|
|
|
|
|
2025-01-26 14:23:41 -05:00
|
|
|
meta = {
|
2023-08-15 10:08:44 +02:00
|
|
|
description = "Plumb a PDF for detailed information about each char, rectangle, line, et cetera — and easily extract text and tables";
|
2024-03-19 03:14:51 +01:00
|
|
|
mainProgram = "pdfplumber";
|
2023-07-09 16:10:55 +08:00
|
|
|
homepage = "https://github.com/jsvine/pdfplumber";
|
|
|
|
changelog = "https://github.com/jsvine/pdfplumber/releases/tag/v${version}";
|
2025-01-26 14:23:41 -05:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ happysalada ];
|
2023-07-09 16:10:55 +08:00
|
|
|
};
|
|
|
|
}
|