about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pypandoc/default.nix
blob: 727545b7148dacf254a86064fb0c8c214ee38d97 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pandoc,
  pandocfilters,
  poetry-core,
  pythonOlder,
  substituteAll,
  texliveSmall,
}:

buildPythonPackage rec {
  pname = "pypandoc";
  version = "1.13";
  format = "pyproject";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "JessicaTegner";
    repo = pname;
    rev = "refs/tags/v${version}";
    hash = "sha256-9fpits8O/50maM/e1lVVqBoTwUmcI+/IAYhVX1Pt6ZE=";
  };

  patches = [
    (substituteAll {
      src = ./static-pandoc-path.patch;
      pandoc = "${lib.getBin pandoc}/bin/pandoc";
      pandocVersion = pandoc.version;
    })
    ./skip-tests.patch
  ];

  nativeBuildInputs = [ poetry-core ];

  nativeCheckInputs = [
    texliveSmall
    pandocfilters
  ];

  pythonImportsCheck = [ "pypandoc" ];

  meta = with lib; {
    description = "Thin wrapper for pandoc";
    homepage = "https://github.com/JessicaTegner/pypandoc";
    license = licenses.mit;
    maintainers = with maintainers; [
      sternenseemann
      bennofs
    ];
  };
}