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