1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pandoc,
6 pandocfilters,
7 poetry-core,
8 pythonOlder,
9 substituteAll,
10 texliveSmall,
11}:
12
13buildPythonPackage rec {
14 pname = "pypandoc";
15 version = "1.13";
16 format = "pyproject";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "JessicaTegner";
22 repo = pname;
23 rev = "refs/tags/v${version}";
24 hash = "sha256-9fpits8O/50maM/e1lVVqBoTwUmcI+/IAYhVX1Pt6ZE=";
25 };
26
27 patches = [
28 (substituteAll {
29 src = ./static-pandoc-path.patch;
30 pandoc = "${lib.getBin pandoc}/bin/pandoc";
31 pandocVersion = pandoc.version;
32 })
33 ./skip-tests.patch
34 ];
35
36 nativeBuildInputs = [ poetry-core ];
37
38 nativeCheckInputs = [
39 texliveSmall
40 pandocfilters
41 ];
42
43 pythonImportsCheck = [ "pypandoc" ];
44
45 meta = with lib; {
46 description = "Thin wrapper for pandoc";
47 homepage = "https://github.com/JessicaTegner/pypandoc";
48 license = licenses.mit;
49 maintainers = with maintainers; [
50 sternenseemann
51 bennofs
52 ];
53 };
54}