diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pypandoc/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/pypandoc/default.nix | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pypandoc/default.nix b/nixpkgs/pkgs/development/python-modules/pypandoc/default.nix index c54e220228ab..b5acf6c05438 100644 --- a/nixpkgs/pkgs/development/python-modules/pypandoc/default.nix +++ b/nixpkgs/pkgs/development/python-modules/pypandoc/default.nix @@ -1,5 +1,6 @@ -{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch -, pandoc, haskellPackages, texlive }: +{ lib, substituteAll, buildPythonPackage, fetchFromGitHub +, pandoc, texlive +}: buildPythonPackage rec { pname = "pypandoc"; @@ -12,25 +13,18 @@ buildPythonPackage rec { sha256 = "1lpslfns6zxx7b0xr13bzg921lwrj5am8za0b2dviywk6iiib0ld"; }; - # https://github.com/bebraw/pypandoc/pull/204 patches = [ - (fetchpatch { - url = "https://github.com/sternenseemann/pypandoc/commit/e422e277dd667c77dae11fad931dbb6015e9a784.patch"; - sha256 = "11l11kh2a4k0h1g4yvijb60076kzxlkrvda3x6dc1s8fz352bpg3"; + (substituteAll { + src = ./static-pandoc-path.patch; + pandoc = "${lib.getBin pandoc}/bin/pandoc"; }) + ./skip-tests.patch + ./new-pandoc-headings.patch ]; - postPatch = '' - # set pandoc path statically - sed -i '/^__pandoc_path = None$/c__pandoc_path = "${pandoc}/bin/pandoc"' pypandoc/__init__.py - - # Skip test that requires network access - sed -i '/test_basic_conversion_from_http_url/i\\ @unittest.skip\("no network access during checkPhase"\)' tests.py - ''; - - preCheck = '' - export PATH="${haskellPackages.pandoc-citeproc}/bin:${texlive.combined.scheme-small}/bin:$PATH" - ''; + checkInputs = [ + texlive.combined.scheme-small + ]; meta = with lib; { description = "Thin wrapper for pandoc"; |