summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2021-04-08 14:15:48 +0200
committerGitHub <noreply@github.com>2021-04-08 14:15:48 +0200
commit97490e67836cda5e181caf0a49f1e2d7ca31949f (patch)
treefaf55204993263e336f6af357b944390766e89c1 /pkgs/development
parent22fcc95daa722b837cacb9b50dda7b3da992183d (diff)
parent403481caf97303ed3a0acc5a85983379c22049ed (diff)
downloadnixpkgs-97490e67836cda5e181caf0a49f1e2d7ca31949f.tar
nixpkgs-97490e67836cda5e181caf0a49f1e2d7ca31949f.tar.gz
nixpkgs-97490e67836cda5e181caf0a49f1e2d7ca31949f.tar.bz2
nixpkgs-97490e67836cda5e181caf0a49f1e2d7ca31949f.tar.lz
nixpkgs-97490e67836cda5e181caf0a49f1e2d7ca31949f.tar.xz
nixpkgs-97490e67836cda5e181caf0a49f1e2d7ca31949f.tar.zst
nixpkgs-97490e67836cda5e181caf0a49f1e2d7ca31949f.zip
Merge pull request #117917 from KAction/md2gemini
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/cjkwrap/default.nix19
-rw-r--r--pkgs/development/python-modules/md2gemini/default.nix23
-rw-r--r--pkgs/development/python-modules/mistune/common.nix19
-rw-r--r--pkgs/development/python-modules/mistune/default.nix26
4 files changed, 68 insertions, 19 deletions
diff --git a/pkgs/development/python-modules/cjkwrap/default.nix b/pkgs/development/python-modules/cjkwrap/default.nix
new file mode 100644
index 00000000000..43e5909ec47
--- /dev/null
+++ b/pkgs/development/python-modules/cjkwrap/default.nix
@@ -0,0 +1,19 @@
+{ lib, buildPythonPackage, fetchPypi }:
+
+buildPythonPackage rec {
+  pname = "CJKwrap";
+  version = "2.2";
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1b603sg6c2gv9vmlxwr6r1qvhadqk3qp6vifmijris504zjx5ix2";
+  };
+
+  pythonImportsCheck = [ "cjkwrap" ];
+
+  meta = with lib; {
+    description = "A library for wrapping and filling CJK text";
+    homepage = "https://f.gallai.re/cjkwrap";
+    license = licenses.lgpl3Plus;
+    maintainers = [ maintainers.kaction ];
+  };
+}
diff --git a/pkgs/development/python-modules/md2gemini/default.nix b/pkgs/development/python-modules/md2gemini/default.nix
new file mode 100644
index 00000000000..7b4686dcac4
--- /dev/null
+++ b/pkgs/development/python-modules/md2gemini/default.nix
@@ -0,0 +1,23 @@
+{ lib, buildPythonPackage, fetchPypi, mistune_2_0, cjkwrap, wcwidth
+, pytestCheckHook }:
+
+buildPythonPackage rec {
+  pname = "md2gemini";
+  version = "1.8.1";
+
+  propagatedBuildInputs = [ mistune_2_0 cjkwrap wcwidth ];
+  checkInputs = [ pytestCheckHook ];
+  pythonImportsCheck = [ "md2gemini" ];
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0mfa0f0m762168fbsxjr1cx9yhj82dr8z1d28jl6hj9bkqnvvwiy";
+  };
+
+  meta = with lib; {
+    description = "Markdown to Gemini text format conversion library";
+    homepage = "https://github.com/makeworld-the-better-one/md2gemini";
+    license = licenses.lgpl3Plus;
+    maintainers = [ maintainers.kaction ];
+  };
+}
diff --git a/pkgs/development/python-modules/mistune/common.nix b/pkgs/development/python-modules/mistune/common.nix
new file mode 100644
index 00000000000..7aba4ade414
--- /dev/null
+++ b/pkgs/development/python-modules/mistune/common.nix
@@ -0,0 +1,19 @@
+{ lib, buildPythonPackage, fetchPypi, nose, version, sha256 }:
+
+buildPythonPackage rec {
+  inherit version;
+  pname = "mistune";
+
+  src = fetchPypi {
+    inherit pname version sha256;
+  };
+
+  buildInputs = [ nose ];
+  pythonImportsCheck = [ "mistune" ];
+
+  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 cde668bd5fb..3020eca4eed 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;
 }