summary refs log tree commit diff
path: root/pkgs/development/python-modules/xhtml2pdf/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/xhtml2pdf/default.nix')
-rw-r--r--pkgs/development/python-modules/xhtml2pdf/default.nix49
1 files changed, 34 insertions, 15 deletions
diff --git a/pkgs/development/python-modules/xhtml2pdf/default.nix b/pkgs/development/python-modules/xhtml2pdf/default.nix
index efdb40cd6f8..5a47fc90f67 100644
--- a/pkgs/development/python-modules/xhtml2pdf/default.nix
+++ b/pkgs/development/python-modules/xhtml2pdf/default.nix
@@ -1,34 +1,53 @@
 { lib
+, arabic-reshaper
 , buildPythonPackage
-, fetchPypi
-, pillow
+, fetchFromGitHub
 , html5lib
-, pypdf2
-, reportlab
-, six
+, pillow
+, pypdf3
+, pytestCheckHook
 , python-bidi
-, arabic-reshaper
-, setuptools
+, pythonOlder
+, reportlab
+, svglib
 }:
 
 buildPythonPackage rec {
   pname = "xhtml2pdf";
-  version = "0.2.5";
+  version = "0.2.6";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-EyIERvAC98LqPTMCdwWqTkm1RiMhikscL0tnMZUHIT8=";
+  };
 
   propagatedBuildInputs = [
-    pillow html5lib pypdf2 reportlab six
-    setuptools python-bidi arabic-reshaper
+    arabic-reshaper
+    html5lib
+    pillow
+    pypdf3
+    python-bidi
+    reportlab
+    svglib
   ];
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "6797e974fac66f0efbe927c1539a2756ca4fe8777eaa5882bac132fc76b39421";
-  };
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "xhtml2pdf"
+  ];
 
   meta = with lib; {
     description = "A PDF generator using HTML and CSS";
     homepage = "https://github.com/xhtml2pdf/xhtml2pdf";
     license = licenses.asl20;
+    maintainers = with maintainers; [ ];
   };
-
 }