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