2022-11-21 17:40:18 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2023-11-16 04:20:00 +00:00
|
|
|
, dill
|
2022-11-21 17:40:18 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, hatchling
|
|
|
|
, pytestCheckHook
|
2023-11-16 04:20:00 +00:00
|
|
|
, pythonOlder
|
2022-11-21 17:40:18 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "latexify-py";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.4.2";
|
|
|
|
pyproject = true;
|
2022-11-21 17:40:18 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "latexify_py";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-bBtAtBJfpStNYWhOJoypDI9hhE4g1ZFHBU8p6S1yCgU=";
|
2022-11-21 17:40:18 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
dill
|
|
|
|
];
|
2022-11-21 17:40:18 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"latexify"
|
|
|
|
];
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
cd src
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Generates LaTeX math description from Python functions";
|
|
|
|
homepage = "https://github.com/google/latexify_py";
|
2023-11-16 04:20:00 +00:00
|
|
|
changelog = "https://github.com/google/latexify_py/releases/tag/v${version}";
|
2022-11-21 17:40:18 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ prusnak ];
|
|
|
|
};
|
|
|
|
}
|