Merge pull request #333903 from dotlambda/python3Packages.md2pdf

python312Packages.md2pdf: init at 1.0.1
This commit is contained in:
Pol Dellaiera 2024-08-11 20:17:27 +02:00 committed by GitHub
commit ffeda92906
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 61 additions and 0 deletions

View File

@ -0,0 +1,57 @@
{
buildPythonPackage,
docopt,
fetchFromGitHub,
lib,
markdown2,
pytest-cov-stub,
pytestCheckHook,
setuptools,
weasyprint,
}:
buildPythonPackage rec {
pname = "md2pdf";
version = "1.0.1";
pyproject = true;
src = fetchFromGitHub {
owner = "jmaupetit";
repo = "md2pdf";
rev = "refs/tags/${version}";
hash = "sha256-9B1vVfcBHk+xdE2Xouu95j3Hp4xm9d5DgPv2zKwCvHY=";
};
postPatch = ''
substituteInPlace setup.py \
--replace-fail '"pytest-runner",' ""
'';
build-system = [ setuptools ];
dependencies = [
docopt
markdown2
weasyprint
];
pythonImportsCheck = [ "md2pdf" ];
nativeCheckInputs = [
pytest-cov-stub
pytestCheckHook
];
preCheck = ''
export PATH="$out/bin:$PATH"
'';
meta = {
changelog = "https://github.com/jmaupetit/md2pdf/blob/${src.rev}/CHANGELOG.md";
description = "Markdown to PDF conversion tool";
homepage = "https://github.com/jmaupetit/md2pdf";
license = lib.licenses.mit;
mainProgram = "md2pdf";
maintainers = with lib.maintainers; [ dotlambda ];
};
}

View File

@ -9616,6 +9616,8 @@ with pkgs;
md2gemini = with python3.pkgs; toPythonApplication md2gemini; md2gemini = with python3.pkgs; toPythonApplication md2gemini;
md2pdf = with python3Packages; toPythonApplication md2pdf;
mdbook-emojicodes = callPackage ../tools/text/mdbook-emojicodes { }; mdbook-emojicodes = callPackage ../tools/text/mdbook-emojicodes { };
mdbook-epub = callPackage ../tools/text/mdbook-epub { mdbook-epub = callPackage ../tools/text/mdbook-epub {

View File

@ -7566,6 +7566,8 @@ self: super: with self; {
md2gemini = callPackage ../development/python-modules/md2gemini { }; md2gemini = callPackage ../development/python-modules/md2gemini { };
md2pdf = callPackage ../development/python-modules/md2pdf { };
mdformat = callPackage ../development/python-modules/mdformat { }; mdformat = callPackage ../development/python-modules/mdformat { };
mdformat-admon = callPackage ../development/python-modules/mdformat-admon { }; mdformat-admon = callPackage ../development/python-modules/mdformat-admon { };
mdformat-beautysh = callPackage ../development/python-modules/mdformat-beautysh { }; mdformat-beautysh = callPackage ../development/python-modules/mdformat-beautysh { };