1{ lib
2, buildPythonPackage
3, dill
4, fetchFromGitHub
5, hatchling
6, pytestCheckHook
7, pythonOlder
8}:
9
10buildPythonPackage rec {
11 pname = "latexify-py";
12 version = "0.4.1";
13 pyproject = true;
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchFromGitHub {
18 owner = "google";
19 repo = "latexify_py";
20 rev = "refs/tags/v${version}";
21 hash = "sha256-sxXfm4zJJT+94jcSsYH7Ky3XwFOniSNxvcVUAsgz8u0=";
22 };
23
24 nativeBuildInputs = [
25 hatchling
26 ];
27
28 propagatedBuildInputs = [
29 dill
30 ];
31
32 nativeCheckInputs = [
33 pytestCheckHook
34 ];
35
36 pythonImportsCheck = [
37 "latexify"
38 ];
39
40 preCheck = ''
41 cd src
42 '';
43
44 meta = with lib; {
45 description = "Generates LaTeX math description from Python functions";
46 homepage = "https://github.com/google/latexify_py";
47 changelog = "https://github.com/google/latexify_py/releases/tag/v${version}";
48 license = licenses.asl20;
49 maintainers = with maintainers; [ prusnak ];
50 };
51}