1{ lib
2, arabic-reshaper
3, buildPythonPackage
4, fetchFromGitHub
5, html5lib
6, pillow
7, pyhanko
8, pypdf
9, pytestCheckHook
10, python-bidi
11, pythonOlder
12, reportlab
13, svglib
14}:
15
16buildPythonPackage rec {
17 pname = "xhtml2pdf";
18 version = "0.2.11";
19 format = "setuptools";
20
21 disabled = pythonOlder "3.7";
22
23 src = fetchFromGitHub {
24 owner = pname;
25 repo = pname;
26 rev = "refs/tags/v${version}";
27 hash = "sha256-L/HCw+O8bidtE5nDdO+cLS54m64dlJL+9Gjcye5gM+w=";
28 };
29
30 propagatedBuildInputs = [
31 arabic-reshaper
32 html5lib
33 pillow
34 pyhanko
35 pypdf
36 python-bidi
37 reportlab
38 svglib
39 ];
40
41 nativeCheckInputs = [
42 pytestCheckHook
43 ];
44
45 pythonImportsCheck = [
46 "xhtml2pdf"
47 ];
48
49 meta = with lib; {
50 description = "A PDF generator using HTML and CSS";
51 homepage = "https://github.com/xhtml2pdf/xhtml2pdf";
52 changelog = "https://github.com/xhtml2pdf/xhtml2pdf/releases/tag/v${version}";
53 license = licenses.asl20;
54 maintainers = with maintainers; [ ];
55 };
56}