From a26f334e219d2b9a7d28b4a6c24442fe7204edb0 Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Fri, 24 Jan 2020 10:54:04 -0500 Subject: [PATCH] pythonPackages.pylatexenc: init at 2.1 Latex converter for Python. Check dependency of qiskit. --- .../python-modules/pylatexenc/default.nix | 31 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/development/python-modules/pylatexenc/default.nix diff --git a/pkgs/development/python-modules/pylatexenc/default.nix b/pkgs/development/python-modules/pylatexenc/default.nix new file mode 100644 index 000000000000..146aed9a3ecf --- /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 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8ee05ad69e69..b2be86291d1b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3084,6 +3084,8 @@ in { pylama = callPackage ../development/python-modules/pylama { }; + pylatexenc = callPackage ../development/python-modules/pylatexenc { }; + pymbolic = callPackage ../development/python-modules/pymbolic { }; pymediainfo = callPackage ../development/python-modules/pymediainfo { };