2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
setuptools,
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
defusedxml,
|
|
|
|
pillow,
|
|
|
|
fonttools,
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestCheckHook,
|
|
|
|
qrcode,
|
|
|
|
camelot,
|
|
|
|
uharfbuzz,
|
|
|
|
lxml,
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "fpdf2";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "2.7.9";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "py-pdf";
|
|
|
|
repo = "fpdf2";
|
2024-04-21 15:54:59 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-8CuK8ZFn4msOSNIdgOFjD3ygVeiBUw4/Bc3w1J6Kn9U=";
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
2024-02-29 20:09:43 +00:00
|
|
|
--replace-fail "--cov=fpdf --cov-report=xml" ""
|
2024-01-02 11:29:13 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ setuptools ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
defusedxml
|
|
|
|
pillow
|
|
|
|
fonttools
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
qrcode
|
|
|
|
camelot
|
|
|
|
uharfbuzz
|
2024-02-29 20:09:43 +00:00
|
|
|
lxml
|
2024-01-02 11:29:13 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
"test/table/test_table_extraction.py" # tabula-py not packaged yet
|
|
|
|
"test/signing/test_sign.py" # endesive not packaged yet
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"test_png_url" # tries to download file
|
|
|
|
"test_page_background" # tries to download file
|
|
|
|
"test_share_images_cache" # uses timing functions
|
2024-05-15 15:35:15 +00:00
|
|
|
"test_bidi_character" # tries to download file
|
|
|
|
"test_bidi_conformance" # tries to download file
|
|
|
|
"test_insert_jpg_jpxdecode" # JPEG2000 is broken
|
2024-01-02 11:29:13 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/py-pdf/fpdf2";
|
|
|
|
description = "Simple PDF generation for Python";
|
|
|
|
changelog = "https://github.com/py-pdf/fpdf2/blob/${version}/CHANGELOG.md";
|
|
|
|
license = lib.licenses.lgpl3Only;
|
|
|
|
maintainers = with lib.maintainers; [ jfvillablanca ];
|
|
|
|
};
|
|
|
|
}
|