1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 setuptools,
7 ordered-set,
8 pytestCheckHook,
9 matplotlib,
10 quantities,
11 texlive,
12}:
13
14buildPythonPackage rec {
15 pname = "pylatex";
16 version = "1.4.2";
17 pyproject = true;
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "JelteF";
23 repo = "PyLaTeX";
24 rev = "v${version}";
25 hash = "sha256-gZKMYGMp7bzDY5+Xx9h1AFP4l0Zd936fDfSXyW5lY1k=";
26 };
27
28 nativeBuildInputs = [ setuptools ];
29
30 propagatedBuildInputs = [ ordered-set ];
31
32 pythonImportsCheck = [
33 "pylatex"
34 "pylatex.base_classes"
35 ];
36
37 nativeCheckInputs = [
38 pytestCheckHook
39 matplotlib
40 quantities
41 (texlive.combine { inherit (texlive) scheme-small lastpage collection-fontsrecommended; })
42 ];
43
44 meta = with lib; {
45 description = "Python library for creating LaTeX files and snippets";
46 homepage = "https://jeltef.github.io/PyLaTeX/current/";
47 downloadPage = "https://github.com/JelteF/PyLaTeX/releases";
48 changelog = "https://jeltef.github.io/PyLaTeX/current/changelog.html";
49 license = licenses.mit;
50 maintainers = with maintainers; [ MayNiklas ];
51 };
52}