1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pandoc,
6 pandocfilters,
7 poetry-core,
8 pythonOlder,
9 replaceVars,
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 = "pypandoc";
23 tag = "v${version}";
24 hash = "sha256-9fpits8O/50maM/e1lVVqBoTwUmcI+/IAYhVX1Pt6ZE=";
25 };
26
27 patches = [
28 (replaceVars ./static-pandoc-path.patch {
29 pandoc = "${lib.getBin pandoc}/bin/pandoc";
30 pandocVersion = pandoc.version;
31 })
32 ./skip-tests.patch
33 ];
34
35 nativeBuildInputs = [ poetry-core ];
36
37 nativeCheckInputs = [
38 texliveSmall
39 pandocfilters
40 ];
41
42 pythonImportsCheck = [ "pypandoc" ];
43
44 meta = with lib; {
45 description = "Thin wrapper for pandoc";
46 homepage = "https://github.com/JessicaTegner/pypandoc";
47 license = licenses.mit;
48 maintainers = with maintainers; [
49 sternenseemann
50 bennofs
51 ];
52 };
53}