2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
installShellFiles,
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
|
|
|
wheel,
|
|
|
|
docutils,
|
|
|
|
importlib-metadata,
|
|
|
|
jinja2,
|
|
|
|
packaging,
|
|
|
|
pygments,
|
|
|
|
pyyaml,
|
|
|
|
reportlab,
|
|
|
|
smartypants,
|
|
|
|
pillow,
|
|
|
|
pytestCheckHook,
|
|
|
|
pymupdf,
|
|
|
|
sphinx,
|
2022-10-21 18:38:19 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rst2pdf";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "0.102";
|
2022-10-21 18:38:19 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-NzAGJOlTpz7d3cuubyRjDvVGfCC+61jfZIrcUwhE9CU=";
|
2022-10-21 18:38:19 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"man"
|
|
|
|
];
|
2022-10-21 18:38:19 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2024-05-15 15:35:15 +00:00
|
|
|
installShellFiles
|
2022-10-21 18:38:19 +00:00
|
|
|
setuptools
|
2023-10-09 19:29:22 +00:00
|
|
|
setuptools-scm
|
|
|
|
wheel
|
2022-10-21 18:38:19 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
docutils
|
|
|
|
importlib-metadata
|
|
|
|
jinja2
|
|
|
|
packaging
|
|
|
|
pygments
|
|
|
|
pyyaml
|
|
|
|
reportlab
|
|
|
|
smartypants
|
|
|
|
pillow
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "rst2pdf" ];
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-10-21 18:38:19 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pymupdf
|
|
|
|
sphinx
|
|
|
|
];
|
|
|
|
|
|
|
|
# Test suite fails: https://github.com/rst2pdf/rst2pdf/issues/1067
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
postInstall = ''
|
2024-05-15 15:35:15 +00:00
|
|
|
${lib.getExe' docutils "rst2man"} doc/rst2pdf.rst rst2pdf.1
|
|
|
|
installManPage rst2pdf.1
|
2022-10-21 18:38:19 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Convert reStructured Text to PDF via ReportLab";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "rst2pdf";
|
2022-10-21 18:38:19 +00:00
|
|
|
homepage = "https://rst2pdf.org/";
|
2023-08-04 22:07:22 +00:00
|
|
|
changelog = "https://github.com/rst2pdf/rst2pdf/blob/${version}/CHANGES.rst";
|
2022-10-21 18:38:19 +00:00
|
|
|
license = licenses.mit;
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = with maintainers; [ pyrox0 ];
|
2022-10-21 18:38:19 +00:00
|
|
|
};
|
|
|
|
}
|