about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorwisut hantanong <wizzup@gmail.com>2017-07-15 14:51:07 +0700
committerJörg Thalheim <joerg@thalheim.io>2017-07-15 17:40:55 +0100
commitb493824162bcf9cbe490e1fad74fca5ce30d28d0 (patch)
treee9b6084216d123db23af40cd66ae4f8f38cf46cf /pkgs
parent911655fe5fb5709087b5cda8721dc3678b4a2a93 (diff)
downloadnixlib-b493824162bcf9cbe490e1fad74fca5ce30d28d0.tar
nixlib-b493824162bcf9cbe490e1fad74fca5ce30d28d0.tar.gz
nixlib-b493824162bcf9cbe490e1fad74fca5ce30d28d0.tar.bz2
nixlib-b493824162bcf9cbe490e1fad74fca5ce30d28d0.tar.lz
nixlib-b493824162bcf9cbe490e1fad74fca5ce30d28d0.tar.xz
nixlib-b493824162bcf9cbe490e1fad74fca5ce30d28d0.tar.zst
nixlib-b493824162bcf9cbe490e1fad74fca5ce30d28d0.zip
python.pkgs.pypandoc: move to separate expression
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/pypandoc/default.nix32
-rw-r--r--pkgs/top-level/python-packages.nix26
2 files changed, 33 insertions, 25 deletions
diff --git a/pkgs/development/python-modules/pypandoc/default.nix b/pkgs/development/python-modules/pypandoc/default.nix
new file mode 100644
index 000000000000..8e06ba38ef97
--- /dev/null
+++ b/pkgs/development/python-modules/pypandoc/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, buildPythonPackage, fetchPypi
+, pip, pandoc, glibcLocales, haskellPackages, texlive }:
+
+buildPythonPackage rec {
+  pname = "pypandoc";
+  version = "1.3.3";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0628f2kn4gqimnhpf251fgzl723hwgyl3idy69dkzyjvi45s5zm6";
+  };
+
+  # 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 kristoff3r ];
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index f6a71581b8ac..f74d9baae8c4 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -29930,31 +29930,7 @@ EOF
     };
   };
 
-  pypandoc = buildPythonPackage rec {
-    name = "pypandoc-1.3.3";
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/p/pypandoc/${name}.tar.gz";
-      sha256 = "0628f2kn4gqimnhpf251fgzl723hwgyl3idy69dkzyjvi45s5zm6";
-    };
-
-    # 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 = with self; [ self.pip ];
-    buildInputs = [ pkgs.pandoc pkgs.texlive.combined.scheme-small pkgs.haskellPackages.pandoc-citeproc pkgs.glibcLocales ];
-
-    meta = with pkgs.stdenv.lib; {
-      description = "Thin wrapper for pandoc";
-      homepage = "https://github.com/bebraw/pypandoc";
-      license = licenses.mit;
-      maintainers = with maintainers; [ bennofs kristoff3r ];
-    };
-  };
+  pypandoc = callPackage ../development/python-modules/pypandoc { };
 
   yamllint = callPackage ../development/python-modules/yamllint { };