Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / rst2pdf / default.nix
blob6fb44840f5b2f2632f63354e2f46b386b82ebb3e
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , setuptools
5 , setuptools-scm
6 , wheel
7 , docutils
8 , importlib-metadata
9 , jinja2
10 , packaging
11 , pygments
12 , pyyaml
13 , reportlab
14 , smartypants
15 , pillow
16 , pytestCheckHook
17 , pymupdf
18 , sphinx
21 buildPythonPackage rec {
22   pname = "rst2pdf";
23   version = "0.101";
24   format = "pyproject";
26   src = fetchPypi {
27     inherit pname version;
28     hash = "sha256-AF8FssEIFHmeY2oVrAPNe85pbmgKWO52yD6ycNNzTSg=";
29   };
31   outputs = [ "out" "man" ];
33   nativeBuildInputs = [
34     setuptools
35     setuptools-scm
36     wheel
37   ];
39   propagatedBuildInputs = [
40     docutils
41     importlib-metadata
42     jinja2
43     packaging
44     pygments
45     pyyaml
46     reportlab
47     smartypants
48     pillow
49   ];
51   pythonImportsCheck = [
52     "rst2pdf"
53   ];
55   nativeCheckInputs = [
56     pytestCheckHook
57     pymupdf
58     sphinx
59   ];
61   # Test suite fails: https://github.com/rst2pdf/rst2pdf/issues/1067
62   doCheck = false;
64   postInstall = ''
65     mkdir -p $man/share/man/man1/
66     ${docutils}/bin/rst2man.py doc/rst2pdf.rst $man/share/man/man1/rst2pdf.1
67   '';
69   meta = with lib; {
70     description = "Convert reStructured Text to PDF via ReportLab";
71     homepage = "https://rst2pdf.org/";
72     changelog = "https://github.com/rst2pdf/rst2pdf/blob/${version}/CHANGES.rst";
73     license = licenses.mit;
74     maintainers = with maintainers; [ marsam ];
75   };