1{ stdenv, buildPythonPackage, fetchPypi
2, pip, pandoc, glibcLocales, haskellPackages, texlive }:
3
4buildPythonPackage rec {
5 pname = "pypandoc";
6 version = "1.4";
7 name = "${pname}-${version}";
8
9 src = fetchPypi {
10 inherit pname version;
11 sha256 = "e914e6d5f84a76764887e4d909b09d63308725f0cbb5293872c2c92f07c11a5b";
12 };
13
14 # Fix tests: first requires network access, second is a bug (reported upstream)
15 preConfigure = ''
16 substituteInPlace tests.py --replace "pypandoc.convert(url, 'html')" "'GPL2 license'"
17 substituteInPlace tests.py --replace "pypandoc.convert_file(file_name, lua_file_name)" "'<h1 id=\"title\">title</h1>'"
18 '';
19
20 LC_ALL="en_US.UTF-8";
21
22 propagatedBuildInputs = [ pip ];
23
24 buildInputs = [ pandoc texlive.combined.scheme-small haskellPackages.pandoc-citeproc glibcLocales ];
25
26 meta = with stdenv.lib; {
27 description = "Thin wrapper for pandoc";
28 homepage = https://github.com/bebraw/pypandoc;
29 license = licenses.mit;
30 maintainers = with maintainers; [ bennofs kristoff3r ];
31 };
32}