2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2022-03-30 09:31:56 +00:00
|
|
|
, arabic-reshaper
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2022-03-30 09:31:56 +00:00
|
|
|
, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, html5lib
|
2022-03-30 09:31:56 +00:00
|
|
|
, pillow
|
2022-04-27 09:35:20 +00:00
|
|
|
, pyhanko
|
2022-03-30 09:31:56 +00:00
|
|
|
, pypdf3
|
|
|
|
, pytestCheckHook
|
2020-11-21 19:51:51 +00:00
|
|
|
, python-bidi
|
2022-03-30 09:31:56 +00:00
|
|
|
, pythonOlder
|
|
|
|
, reportlab
|
|
|
|
, svglib
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "xhtml2pdf";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "0.2.7";
|
2022-03-30 09:31:56 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
# Tests are only available on GitHub
|
2022-03-30 09:31:56 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2022-04-27 09:35:20 +00:00
|
|
|
# Currently it is not possible to fetch from version as there is a branch with the same name
|
|
|
|
rev = "afa72cdbbdaf7d459261c1605263101ffcd999af";
|
|
|
|
sha256 = "sha256-plyIM7Ohnp5UBWz/UDTJa1UeWK9yckSZR16wxmLrpnc=";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-21 19:51:51 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-03-30 09:31:56 +00:00
|
|
|
arabic-reshaper
|
|
|
|
html5lib
|
|
|
|
pillow
|
2022-04-27 09:35:20 +00:00
|
|
|
pyhanko
|
2022-03-30 09:31:56 +00:00
|
|
|
pypdf3
|
|
|
|
python-bidi
|
|
|
|
reportlab
|
|
|
|
svglib
|
2020-11-21 19:51:51 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"xhtml2pdf"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A PDF generator using HTML and CSS";
|
|
|
|
homepage = "https://github.com/xhtml2pdf/xhtml2pdf";
|
|
|
|
license = licenses.asl20;
|
2022-03-30 09:31:56 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|