about summary refs log tree commit diff
path: root/pkgs/development/python-modules/mistune
diff options
context:
space:
mode:
authorDmitry Bogatov <git#v1@kaction.cc>2021-03-27 00:00:00 +0000
committerSandro Jäckel <sandro.jaeckel@gmail.com>2021-04-08 11:32:22 +0200
commitb233405aac04e996a818e08863a03f1086901aab (patch)
treea97a10536a2356d5205bf18c839ce5210ba88e82 /pkgs/development/python-modules/mistune
parent22fcc95daa722b837cacb9b50dda7b3da992183d (diff)
python3.pkgs.mistune: write derivation for mistune=2.0.0a4
This version is required for md2gemini program and is incompatible with
mistune=0.8.4
Diffstat (limited to 'pkgs/development/python-modules/mistune')
-rw-r--r--pkgs/development/python-modules/mistune/common.nix18
-rw-r--r--pkgs/development/python-modules/mistune/default.nix26
2 files changed, 25 insertions, 19 deletions
diff --git a/pkgs/development/python-modules/mistune/common.nix b/pkgs/development/python-modules/mistune/common.nix
new file mode 100644
index 0000000000000..e7290ebf82277
--- /dev/null
+++ b/pkgs/development/python-modules/mistune/common.nix
@@ -0,0 +1,18 @@
+{ lib, buildPythonPackage, fetchPypi, nose, version, sha256 }:
+
+buildPythonPackage rec {
+  inherit version;
+  pname = "mistune";
+
+  src = fetchPypi {
+    inherit pname version sha256;
+  };
+
+  buildInputs = [ nose ];
+
+  meta = with lib; {
+    description = "The fastest markdown parser in pure Python";
+    homepage = "https://github.com/lepture/mistune";
+    license = licenses.bsd3;
+  };
+}
diff --git a/pkgs/development/python-modules/mistune/default.nix b/pkgs/development/python-modules/mistune/default.nix
index cde668bd5fbe9..3020eca4eed58 100644
--- a/pkgs/development/python-modules/mistune/default.nix
+++ b/pkgs/development/python-modules/mistune/default.nix
@@ -1,23 +1,11 @@
-{ lib
-, buildPythonPackage
-, fetchPypi
-, nose
-}:
-
-buildPythonPackage rec {
-  pname = "mistune";
-  version = "0.8.4";
-
-  src = fetchPypi {
-    inherit pname version;
+self: rec {
+  mistune_0_8 = self.callPackage ./common.nix {
+    version = "0.8.4";
     sha256 = "59a3429db53c50b5c6bcc8a07f8848cb00d7dc8bdb431a4ab41920d201d4756e";
   };
-
-  buildInputs = [ nose ];
-
-  meta = with lib; {
-    description = "The fastest markdown parser in pure Python";
-    homepage = "https://github.com/lepture/mistune";
-    license = licenses.bsd3;
+  mistune_2_0 = self.callPackage ./common.nix {
+    version = "2.0.0a4";
+    sha256 = "0i6cblmjl58kdmaa21xm0l1ls0kvjpfy45sf73fw3ws6305f628k";
   };
+  mistune = mistune_0_8;
 }