about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pylatexenc/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/pylatexenc/default.nix')
-rw-r--r--pkgs/development/python-modules/pylatexenc/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pylatexenc/default.nix b/pkgs/development/python-modules/pylatexenc/default.nix
new file mode 100644
index 0000000000000..146aed9a3ecf8
--- /dev/null
+++ b/pkgs/development/python-modules/pylatexenc/default.nix
@@ -0,0 +1,31 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pytest
+}:
+
+buildPythonPackage rec {
+  pname = "pylatexenc";
+  version = "2.1";
+
+  src = fetchFromGitHub {
+    owner = "phfaist";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0wnl00y5dl56aw9j4y21kqapraaravbycwfxdmjsbgl11nk4llx9";
+  };
+
+  pythonImportsCheck = [ "pylatexenc" ];
+  checkInputs = [ pytest ];
+  checkPhase = ''
+    pytest
+  '';
+
+  meta = with lib; {
+    description = "Simple LaTeX parser providing latex-to-unicode and unicode-to-latex conversion";
+    homepage = "https://pylatexenc.readthedocs.io";
+    downloadPage = "https;//www.github.com/phfaist/pylatexenc";
+    license = licenses.mit;
+    maintainers = with maintainers; [ drewrisinger ];
+  };
+}
\ No newline at end of file