about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pylatex/default.nix
blob: 44926587aa33c473228eb4c36db3c5ebba852f1b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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 ];
  };
}