python312Packages.dash-renderer: remove (#369714)
[NixPkgs.git] / pkgs / development / python-modules / xhtml2pdf / default.nix
blob1e2726e9dcc985009d79f855b873ed5d9fdb559d
2   lib,
3   arabic-reshaper,
4   buildPythonPackage,
5   fetchFromGitHub,
6   html5lib,
7   pillow,
8   pyhanko,
9   pyhanko-certvalidator,
10   pypdf,
11   pytestCheckHook,
12   python-bidi,
13   pythonOlder,
14   reportlab,
15   setuptools,
16   svglib,
19 buildPythonPackage rec {
20   pname = "xhtml2pdf";
21   version = "0.2.16";
22   pyproject = true;
24   disabled = pythonOlder "3.8";
26   src = fetchFromGitHub {
27     owner = "xhtml2pdf";
28     repo = "xhtml2pdf";
29     tag = "v${version}";
30     hash = "sha256-sva1Oqz4FsLz/www8IPVxol3D0hx5F5hQ0I/rSRP9sE=";
31   };
33   build-system = [
34     setuptools
35   ];
37   dependencies = [
38     arabic-reshaper
39     html5lib
40     pillow
41     pyhanko
42     pyhanko-certvalidator
43     pypdf
44     python-bidi
45     reportlab
46     svglib
47   ];
49   nativeCheckInputs = [ pytestCheckHook ];
51   disabledTests = [
52     # Tests requires network access
53     "test_document_cannot_identify_image"
54     "test_document_with_broken_image"
55   ];
57   pythonImportsCheck = [
58     "xhtml2pdf"
59     "xhtml2pdf.pisa"
60   ];
62   meta = {
63     changelog = "https://github.com/xhtml2pdf/xhtml2pdf/releases/tag/v${version}";
64     description = "PDF generator using HTML and CSS";
65     homepage = "https://github.com/xhtml2pdf/xhtml2pdf";
66     license = lib.licenses.asl20;
67     mainProgram = "xhtml2pdf";
68     maintainers = with lib.maintainers; [ drupol ];
69   };