File tree Expand file tree Collapse file tree 3 files changed +61
-0
lines changed
development/python-modules/md2pdf Expand file tree Collapse file tree 3 files changed +61
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ buildPythonPackage ,
3+ docopt ,
4+ fetchFromGitHub ,
5+ lib ,
6+ markdown2 ,
7+ pytest-cov-stub ,
8+ pytestCheckHook ,
9+ setuptools ,
10+ weasyprint ,
11+ } :
12+
13+ buildPythonPackage rec {
14+ pname = "md2pdf" ;
15+ version = "1.0.1" ;
16+ pyproject = true ;
17+
18+ src = fetchFromGitHub {
19+ owner = "jmaupetit" ;
20+ repo = "md2pdf" ;
21+ rev = "refs/tags/${ version } " ;
22+ hash = "sha256-9B1vVfcBHk+xdE2Xouu95j3Hp4xm9d5DgPv2zKwCvHY=" ;
23+ } ;
24+
25+ postPatch = ''
26+ substituteInPlace setup.py \
27+ --replace-fail '"pytest-runner",' ""
28+ '' ;
29+
30+ build-system = [ setuptools ] ;
31+
32+ dependencies = [
33+ docopt
34+ markdown2
35+ weasyprint
36+ ] ;
37+
38+ pythonImportsCheck = [ "md2pdf" ] ;
39+
40+ nativeCheckInputs = [
41+ pytest-cov-stub
42+ pytestCheckHook
43+ ] ;
44+
45+ preCheck = ''
46+ export PATH="$out/bin:$PATH"
47+ '' ;
48+
49+ meta = {
50+ changelog = "https://github.com/jmaupetit/md2pdf/blob/${ src . rev } /CHANGELOG.md" ;
51+ description = "Markdown to PDF conversion tool" ;
52+ homepage = "https://github.com/jmaupetit/md2pdf" ;
53+ license = lib . licenses . mit ;
54+ mainProgram = "md2pdf" ;
55+ maintainers = with lib . maintainers ; [ dotlambda ] ;
56+ } ;
57+ }
Original file line number Diff line number Diff line change @@ -9616,6 +9616,8 @@ with pkgs;
96169616
96179617 md2gemini = with python3.pkgs; toPythonApplication md2gemini;
96189618
9619+ md2pdf = with python3Packages; toPythonApplication md2pdf;
9620+
96199621 mdbook-emojicodes = callPackage ../tools/text/mdbook-emojicodes { };
96209622
96219623 mdbook-epub = callPackage ../tools/text/mdbook-epub {
Original file line number Diff line number Diff line change @@ -7566,6 +7566,8 @@ self: super: with self; {
75667566
75677567 md2gemini = callPackage ../development/python-modules/md2gemini { };
75687568
7569+ md2pdf = callPackage ../development/python-modules/md2pdf { };
7570+
75697571 mdformat = callPackage ../development/python-modules/mdformat { };
75707572 mdformat-admon = callPackage ../development/python-modules/mdformat-admon { };
75717573 mdformat-beautysh = callPackage ../development/python-modules/mdformat-beautysh { };
You can’t perform that action at this time.
0 commit comments