1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hatchling,
6 pytestCheckHook,
7}:
8
9buildPythonPackage rec {
10 pname = "simpleeval";
11 version = "1.0.3";
12 pyproject = true;
13
14 src = fetchFromGitHub {
15 owner = "danthedeckie";
16 repo = "simpleeval";
17 tag = version;
18 hash = "sha256-CwCuQ/wd8nLKKXji2dzz9mvZrQEm2/kEm93Pan/8+90=";
19 };
20
21 build-system = [ hatchling ];
22
23 nativeCheckInputs = [ pytestCheckHook ];
24
25 enabledTestPaths = [ "test_simpleeval.py" ];
26
27 pythonImportsCheck = [ "simpleeval" ];
28
29 meta = with lib; {
30 description = "Simple, safe single expression evaluator library";
31 homepage = "https://github.com/danthedeckie/simpleeval";
32 changelog = "https://github.com/danthedeckie/simpleeval/releases/tag/${src.tag}";
33 license = licenses.mit;
34 maintainers = with maintainers; [ johbo ];
35 };
36}