1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
{
lib,
arabic-reshaper,
buildPythonPackage,
fetchFromGitHub,
html5lib,
pillow,
pyhanko,
pyhanko-certvalidator,
pypdf,
pytestCheckHook,
python-bidi,
reportlab,
setuptools,
svglib,
}:
buildPythonPackage rec {
pname = "xhtml2pdf";
version = "0.2.17";
pyproject = true;
src = fetchFromGitHub {
owner = "xhtml2pdf";
repo = "xhtml2pdf";
tag = "v${version}";
hash = "sha256-qp0JVp5efIrI98YT0rwFAMSEW+0aIhedfYGND4V7Mto=";
};
build-system = [
setuptools
];
dependencies = [
arabic-reshaper
html5lib
pillow
pyhanko
pyhanko-certvalidator
pypdf
python-bidi
reportlab
svglib
];
nativeCheckInputs = [ pytestCheckHook ];
disabledTests = [
# Tests requires network access
"test_document_cannot_identify_image"
"test_document_with_broken_image"
];
pythonImportsCheck = [
"xhtml2pdf"
"xhtml2pdf.pisa"
];
meta = {
changelog = "https://github.com/xhtml2pdf/xhtml2pdf/releases/tag/${src.tag}";
description = "PDF generator using HTML and CSS";
homepage = "https://github.com/xhtml2pdf/xhtml2pdf";
license = lib.licenses.asl20;
mainProgram = "xhtml2pdf";
maintainers = [ ];
};
}
|