diff --git a/pkgs/development/python-modules/cjkwrap/default.nix b/pkgs/development/python-modules/cjkwrap/default.nix new file mode 100644 index 000000000000..43e5909ec47b --- /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 000000000000..7b4686dcac40 --- /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 000000000000..7aba4ade4141 --- /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 cde668bd5fbe..3020eca4eed5 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; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ef8d2f501ece..e13d5831fb04 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6001,6 +6001,8 @@ in m2r = python3Packages.callPackage ../tools/text/m2r { }; + md2gemini = with python3.pkgs; toPythonApplication md2gemini; + mdbook = callPackage ../tools/text/mdbook { inherit (darwin.apple_sdk.frameworks) CoreServices; }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a95c425694bf..b4644d0231ce 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1303,6 +1303,10 @@ in { citeproc-py = callPackage ../development/python-modules/citeproc-py { }; + cjkwrap = callPackage ../development/python-modules/cjkwrap { }; + + cjson = callPackage ../development/python-modules/cjson { }; + ckcc-protocol = callPackage ../development/python-modules/ckcc-protocol { }; class-registry = callPackage ../development/python-modules/class-registry { }; @@ -3945,6 +3949,8 @@ in { mcstatus = callPackage ../development/python-modules/mcstatus { }; + md2gemini = callPackage ../development/python-modules/md2gemini { }; + MDP = callPackage ../development/python-modules/mdp { }; measurement = callPackage ../development/python-modules/measurement { }; @@ -4020,7 +4026,11 @@ in { mistletoe = callPackage ../development/python-modules/mistletoe { }; - mistune = callPackage ../development/python-modules/mistune { }; + inherit (import ../development/python-modules/mistune self) + mistune + mistune_0_8 + mistune_2_0 + ; mitmproxy = callPackage ../development/python-modules/mitmproxy { };