2019-12-12 16:44:53 +00:00
|
|
|
{ stdenv, buildPythonPackage, fetchFromGitHub
|
|
|
|
, pandoc, haskellPackages, texlive }:
|
2017-07-15 08:51:07 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pypandoc";
|
2019-12-12 16:44:53 +00:00
|
|
|
version = "unstable-2018-06-18";
|
2017-07-15 08:51:07 +01:00
|
|
|
|
2019-12-12 16:44:53 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bebraw";
|
|
|
|
repo = pname;
|
|
|
|
rev = "87912f0f17e0a71c1160008df708c876d32e5819";
|
|
|
|
sha256 = "0l6knkxxhmni4lx8hyvbb71svnhza08ivyklqlk5fw637gznc0hx";
|
2017-07-15 08:51:07 +01:00
|
|
|
};
|
|
|
|
|
2019-12-12 16:44:53 +00:00
|
|
|
postPatch = ''
|
|
|
|
# set pandoc path statically
|
|
|
|
sed -i '/^__pandoc_path = None$/c__pandoc_path = "${pandoc}/bin/pandoc"' pypandoc/__init__.py
|
|
|
|
|
|
|
|
# Fix tests: requires network access
|
2017-07-15 08:51:07 +01:00
|
|
|
substituteInPlace tests.py --replace "pypandoc.convert(url, 'html')" "'GPL2 license'"
|
|
|
|
'';
|
|
|
|
|
2019-12-12 16:44:53 +00:00
|
|
|
preCheck = ''
|
|
|
|
export PATH="${haskellPackages.pandoc-citeproc}/bin:${texlive.combined.scheme-small}/bin:$PATH"
|
|
|
|
'';
|
2017-07-15 08:51:07 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Thin wrapper for pandoc";
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = https://github.com/bebraw/pypandoc;
|
2017-07-15 08:51:07 +01:00
|
|
|
license = licenses.mit;
|
2020-01-19 11:41:36 +00:00
|
|
|
maintainers = with maintainers; [ sternenseemann bennofs ];
|
2017-07-15 08:51:07 +01:00
|
|
|
};
|
|
|
|
}
|