1{ lib 2, buildPythonPackage 3, setuptools 4, python 5, antlr4 6}: 7 8buildPythonPackage rec { 9 pname = "antlr4-python3-runtime"; 10 inherit (antlr4.runtime.cpp) version src; 11 12 format = "pyproject"; 13 14 disabled = python.pythonOlder "3.6"; 15 16 sourceRoot = "${src.name}/runtime/Python3"; 17 18 nativeBuildInputs = [ 19 setuptools 20 ]; 21 22 # We use an asterisk because this expression is used also for old antlr 23 # versions, where there the tests directory is `test` and not `tests`. 24 # See e.g in package `baserow`. 25 checkPhase = '' 26 cd test* 27 ${python.interpreter} run.py 28 ''; 29 30 meta = with lib; { 31 description = "Runtime for ANTLR"; 32 homepage = "https://www.antlr.org/"; 33 license = licenses.bsd3; 34 }; 35}