summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
authorsternenseemann <git@lukasepple.de>2019-12-12 17:44:53 +0100
committerBenno Fünfstück <benno.fuenfstueck@gmail.com>2020-01-18 16:23:47 +0100
commit6b6e54eebd2ff71a4f1a5d52f6876eccded85392 (patch)
tree6b7f86dc5f9e41c3a44fcfc27b2811b97c0612bc /pkgs/development/python-modules
parent201d9b8916dd04d1c2eaa6c306a7a603d4859ae3 (diff)
downloadnixpkgs-6b6e54eebd2ff71a4f1a5d52f6876eccded85392.tar
nixpkgs-6b6e54eebd2ff71a4f1a5d52f6876eccded85392.tar.gz
nixpkgs-6b6e54eebd2ff71a4f1a5d52f6876eccded85392.tar.bz2
nixpkgs-6b6e54eebd2ff71a4f1a5d52f6876eccded85392.tar.lz
nixpkgs-6b6e54eebd2ff71a4f1a5d52f6876eccded85392.tar.xz
nixpkgs-6b6e54eebd2ff71a4f1a5d52f6876eccded85392.tar.zst
nixpkgs-6b6e54eebd2ff71a4f1a5d52f6876eccded85392.zip
pythonPackages.pypandoc: 1.4 -> 2018-06-18
Switch to an unstable version to make it work with pandoc v2.

Based on #56592 by @Twey. Reworked dependency handling.
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/pypandoc/default.nix32
1 files changed, 16 insertions, 16 deletions
diff --git a/pkgs/development/python-modules/pypandoc/default.nix b/pkgs/development/python-modules/pypandoc/default.nix
index 3af86dabe21..fc5263d8109 100644
--- a/pkgs/development/python-modules/pypandoc/default.nix
+++ b/pkgs/development/python-modules/pypandoc/default.nix
@@ -1,33 +1,33 @@
-{ stdenv, buildPythonPackage, fetchPypi
-, pip, pandoc, glibcLocales, haskellPackages, texlive }:
+{ stdenv, buildPythonPackage, fetchFromGitHub
+, pandoc, haskellPackages, texlive }:
 
 buildPythonPackage rec {
   pname = "pypandoc";
-  version = "1.4";
+  version = "unstable-2018-06-18";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "e914e6d5f84a76764887e4d909b09d63308725f0cbb5293872c2c92f07c11a5b";
+  src = fetchFromGitHub {
+    owner = "bebraw";
+    repo = pname;
+    rev = "87912f0f17e0a71c1160008df708c876d32e5819";
+    sha256 = "0l6knkxxhmni4lx8hyvbb71svnhza08ivyklqlk5fw637gznc0hx";
   };
 
-  # Fix tests: first requires network access, second is a bug (reported upstream)
-  preConfigure = ''
+  postPatch = ''
+    # set pandoc path statically
+    sed -i '/^__pandoc_path = None$/c__pandoc_path = "${pandoc}/bin/pandoc"' pypandoc/__init__.py
+
+    # Fix tests: requires network access
     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 ];
+  preCheck = ''
+    export PATH="${haskellPackages.pandoc-citeproc}/bin:${texlive.combined.scheme-small}/bin:$PATH"
+  '';
 
   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
   };
 }