1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, pytestCheckHook
6}:
7
8buildPythonPackage rec {
9 pname = "esprima";
10 version = "4.0.1";
11 format = "setuptools";
12
13 disabled = pythonOlder "3.7";
14
15 src = fetchFromGitHub {
16 owner = "Kronuz";
17 repo = "esprima-python";
18 rev = "v${version}";
19 sha256 = "WtkPCReXhxyr6pOzE9gsdIeBlLk+nSnbxkS3OowEaHo=";
20 };
21
22 checkInputs = [
23 pytestCheckHook
24 ];
25
26 pytestFlagsArray = [
27 "test/__main__.py::TestEsprima"
28 ];
29
30 pythonImportsCheck = [
31 "esprima"
32 ];
33
34 meta = with lib; {
35 description = "Python parser for standard-compliant ECMAScript";
36 homepage = "https://github.com/Kronuz/esprima-python";
37 license = licenses.bsd2;
38 maintainers = with maintainers; [ fab ];
39 };
40}