diff --git a/pkgs/development/python-modules/antlr4-python3-runtime/default.nix b/pkgs/development/python-modules/antlr4-python3-runtime/default.nix index 39fef995bf98..20daf71c8cda 100644 --- a/pkgs/development/python-modules/antlr4-python3-runtime/default.nix +++ b/pkgs/development/python-modules/antlr4-python3-runtime/default.nix @@ -1,17 +1,27 @@ { lib , buildPythonPackage -, isPy3k +, setuptools , python -, antlr4 }: +, antlr4 +}: buildPythonPackage rec { pname = "antlr4-python3-runtime"; inherit (antlr4.runtime.cpp) version src; + + format = "pyproject"; + disabled = python.pythonOlder "3.6"; sourceRoot = "${src.name}/runtime/Python3"; - # in 4.9, test was renamed to tests + nativeBuildInputs = [ + setuptools + ]; + + # We use an asterisk because this expression is used also for old antlr + # versions, where there the tests directory is `test` and not `tests`. + # See e.g in package `baserow`. checkPhase = '' cd test* ${python.interpreter} run.py diff --git a/pkgs/development/tools/parsing/antlr/4.nix b/pkgs/development/tools/parsing/antlr/4.nix index 512732d06279..6c004a7b0b37 100644 --- a/pkgs/development/tools/parsing/antlr/4.nix +++ b/pkgs/development/tools/parsing/antlr/4.nix @@ -103,6 +103,20 @@ let }; in { + antlr4_13 = (mkAntlr { + version = "4.13.0"; + sourceSha256 = "sha256-s1yAdScMYg1wFpYNsBAtpifIhQsnSAgJg7JjPDx+htc="; + jarSha256 = "sha256-vG9KvA0iWidXASbFFAJWnwAKje2jSHtw52QoQOVw5KY="; + extraCppCmakeFlags = [ + # Generate CMake config files, which are not installed by default. + "-DANTLR4_INSTALL=ON" + + # Disable tests, since they require downloading googletest, which is + # not available in a sandboxed build. + "-DANTLR_BUILD_CPP_TESTS=OFF" + ]; + }).antlr; + antlr4_12 = (mkAntlr { version = "4.12.0"; sourceSha256 = "sha256-0JMG8UYFT+IAWvARY2KnuXSr5X6LlVZN4LJHy5d4x08="; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 497ff2761007..115ca4e13eb5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18605,9 +18605,10 @@ with pkgs; antlr4_9 antlr4_10 antlr4_11 - antlr4_12; + antlr4_12 + antlr4_13; - antlr4 = antlr4_12; + antlr4 = antlr4_13; antlr = antlr4;