From ca9144be02b24d912a371e9b67e42c1099eede86 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Mon, 19 Jun 2023 17:08:23 +0800 Subject: [PATCH 1/3] antlr4_13: init at 4.13.0 --- pkgs/development/tools/parsing/antlr/4.nix | 14 ++++++++++++++ pkgs/top-level/all-packages.nix | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-) 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 44986968eea2..c29417464c91 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18602,7 +18602,8 @@ with pkgs; antlr4_9 antlr4_10 antlr4_11 - antlr4_12; + antlr4_12 + antlr4_13; antlr4 = antlr4_12; From 5ca54e9579d4a47cac5036be47b69e1bbadf66e6 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Mon, 19 Jun 2023 17:09:22 +0800 Subject: [PATCH 2/3] antlr4: default to antlr4_13 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c29417464c91..7e765d5de032 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18605,7 +18605,7 @@ with pkgs; antlr4_12 antlr4_13; - antlr4 = antlr4_12; + antlr4 = antlr4_13; antlr = antlr4; From 061398e5054b3f3ca5678e713288001540299bbe Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Mon, 19 Jun 2023 17:25:01 +0800 Subject: [PATCH 3/3] python3Packages.antlr4-python3-runtime: fix build --- .../antlr4-python3-runtime/default.nix | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) 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