2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
setuptools,
|
|
|
|
pytestCheckHook,
|
2021-10-28 06:52:43 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "simpleeval";
|
2023-02-22 10:55:15 +00:00
|
|
|
version = "0.9.13";
|
2021-10-28 06:52:43 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "danthedeckie";
|
|
|
|
repo = pname;
|
2023-02-22 10:55:15 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-I1GILYPE6OyotgRe0Ek/iHHv6q9/b/MlcTxMAtfZD80=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2021-10-28 06:52:43 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2022-09-30 11:47:45 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-10-28 06:52:43 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "test_simpleeval.py" ];
|
2021-10-28 06:52:43 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "simpleeval" ];
|
2021-10-28 06:52:43 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple, safe single expression evaluator library";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/danthedeckie/simpleeval";
|
2023-02-22 10:55:15 +00:00
|
|
|
changelog = "https://github.com/danthedeckie/simpleeval/releases/tag/${version}";
|
2021-10-28 06:52:43 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ johbo ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|