about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pylatex/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/pylatex/default.nix')
-rw-r--r--pkgs/development/python-modules/pylatex/default.nix57
1 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pylatex/default.nix b/pkgs/development/python-modules/pylatex/default.nix
new file mode 100644
index 0000000000000..44926587aa33c
--- /dev/null
+++ b/pkgs/development/python-modules/pylatex/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pythonOlder
+, setuptools
+, ordered-set
+, pytestCheckHook
+, matplotlib
+, quantities
+, texlive
+}:
+
+buildPythonPackage rec {
+  pname = "pylatex";
+  version = "1.4.2";
+  pyproject = true;
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchFromGitHub {
+    owner = "JelteF";
+    repo = "PyLaTeX";
+    rev = "v${version}";
+    hash = "sha256-gZKMYGMp7bzDY5+Xx9h1AFP4l0Zd936fDfSXyW5lY1k=";
+  };
+
+  nativeBuildInputs = [
+    setuptools
+  ];
+
+  propagatedBuildInputs = [ ordered-set ];
+
+  pythonImportsCheck = [
+    "pylatex"
+    "pylatex.base_classes"
+  ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+    matplotlib
+    quantities
+    (texlive.combine { inherit (texlive)
+      scheme-small
+      lastpage
+      collection-fontsrecommended
+    ;})
+  ];
+
+  meta = with lib; {
+    description = "A Python library for creating LaTeX files and snippets";
+    homepage = "https://jeltef.github.io/PyLaTeX/current/";
+    downloadPage = "https://github.com/JelteF/PyLaTeX/releases";
+    changelog = "https://jeltef.github.io/PyLaTeX/current/changelog.html";
+    license = licenses.mit;
+    maintainers = with maintainers; [ MayNiklas ];
+  };
+}