summary refs log tree commit diff
path: root/pkgs/development/python-modules/pypandoc/default.nix
blob: 3af86dabe21511245bf448139bd4ef6ff7485f59 (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
{ stdenv, buildPythonPackage, fetchPypi
, pip, pandoc, glibcLocales, haskellPackages, texlive }:

buildPythonPackage rec {
  pname = "pypandoc";
  version = "1.4";

  src = fetchPypi {
    inherit pname version;
    sha256 = "e914e6d5f84a76764887e4d909b09d63308725f0cbb5293872c2c92f07c11a5b";
  };

  # Fix tests: first requires network access, second is a bug (reported upstream)
  preConfigure = ''
    substituteInPlace tests.py --replace "pypandoc.convert(url, 'html')" "'GPL2 license'"
    substituteInPlace tests.py --replace "pypandoc.convert_file(file_name, lua_file_name)" "'<h1 id=\"title\">title</h1>'"
  '';

  LC_ALL="en_US.UTF-8";

  propagatedBuildInputs = [ pip ];

  buildInputs = [ pandoc texlive.combined.scheme-small haskellPackages.pandoc-citeproc glibcLocales ];

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

    broken = true; # incompatible with pandoc v2
  };
}