diff --git a/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
index 0908fb137261..2c7935078e34 100644
--- a/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
+++ b/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
@@ -309,6 +309,12 @@
+
+
+ The antlr package now defaults to the 4.x
+ release instead of the old 2.7.7 version.
+
+
diff --git a/nixos/doc/manual/release-notes/rl-2111.section.md b/nixos/doc/manual/release-notes/rl-2111.section.md
index a603f7358291..e97aed4ccf2a 100644
--- a/nixos/doc/manual/release-notes/rl-2111.section.md
+++ b/nixos/doc/manual/release-notes/rl-2111.section.md
@@ -85,4 +85,7 @@ In addition to numerous new and upgraded packages, this release has the followin
- GitVersionTree
- NDeskOptions
+* The `antlr` package now defaults to the 4.x release instead of the
+ old 2.7.7 version.
+
## Other Notable Changes {#sec-release-21.11-notable-changes}
diff --git a/pkgs/applications/version-management/srcml/default.nix b/pkgs/applications/version-management/srcml/default.nix
index c13a08a711c2..11dbfc299a49 100644
--- a/pkgs/applications/version-management/srcml/default.nix
+++ b/pkgs/applications/version-management/srcml/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, cmake, libxml2, libxslt, boost, libarchive, python, antlr,
+{ lib, stdenv, fetchurl, cmake, libxml2, libxslt, boost, libarchive, python, antlr2,
curl
}:
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
./gcc6.patch
];
- nativeBuildInputs = [ cmake antlr ];
+ nativeBuildInputs = [ cmake antlr2 ];
buildInputs = [ libxml2 libxslt boost libarchive python curl ];
meta = {
diff --git a/pkgs/development/libraries/nco/default.nix b/pkgs/development/libraries/nco/default.nix
index 958be905f835..b7df32633b4a 100644
--- a/pkgs/development/libraries/nco/default.nix
+++ b/pkgs/development/libraries/nco/default.nix
@@ -1,10 +1,10 @@
-{ lib, stdenv, fetchzip, netcdf, netcdfcxx4, gsl, udunits, antlr, which, curl, flex, coreutils }:
+{ lib, stdenv, fetchzip, netcdf, netcdfcxx4, gsl, udunits, antlr2, which, curl, flex, coreutils }:
stdenv.mkDerivation rec {
version = "4.9.8";
pname = "nco";
- nativeBuildInputs = [ flex which antlr ];
+ nativeBuildInputs = [ flex which antlr2 ];
buildInputs = [ netcdf netcdfcxx4 gsl udunits curl coreutils ];
src = fetchzip {
diff --git a/pkgs/development/python-modules/stringtemplate/default.nix b/pkgs/development/python-modules/stringtemplate/default.nix
index 8bdb69a3074e..336a371c0714 100644
--- a/pkgs/development/python-modules/stringtemplate/default.nix
+++ b/pkgs/development/python-modules/stringtemplate/default.nix
@@ -1,4 +1,4 @@
-{ lib, fetchurl, buildPythonPackage, antlr, isPy3k }:
+{ lib, fetchurl, buildPythonPackage, antlr2, isPy3k }:
buildPythonPackage rec {
pname = "PyStringTemplate";
@@ -9,7 +9,7 @@ buildPythonPackage rec {
sha256 = "0lbib0l8c1q7i1j610rwcdagymr1idahrql4dkgnm5rzyg2vk3ml";
};
- propagatedBuildInputs = [ antlr ];
+ propagatedBuildInputs = [ antlr2 ];
disabled = isPy3k;
diff --git a/pkgs/development/tools/database/sqlitebrowser/default.nix b/pkgs/development/tools/database/sqlitebrowser/default.nix
index 40238d0effa4..45b5f185880d 100644
--- a/pkgs/development/tools/database/sqlitebrowser/default.nix
+++ b/pkgs/development/tools/database/sqlitebrowser/default.nix
@@ -1,4 +1,4 @@
-{ mkDerivation, lib, fetchFromGitHub, cmake, antlr
+{ mkDerivation, lib, fetchFromGitHub, cmake
, qtbase, qttools, sqlite }:
mkDerivation rec {
@@ -16,7 +16,7 @@ mkDerivation rec {
# but qscintilla is currently in a bit of a mess as some consumers expect a
# -qt4 or -qt5 prefix while others do not.
# We *really* should get that cleaned up.
- buildInputs = [ antlr qtbase sqlite ];
+ buildInputs = [ qtbase sqlite ];
nativeBuildInputs = [ cmake qttools ];
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 9da0e75c795a..1213a05d66c1 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -12798,7 +12798,7 @@ in
ansible-lint = with python3.pkgs; toPythonApplication ansible-lint;
- antlr = callPackage ../development/tools/parsing/antlr/2.7.7.nix {
+ antlr2 = callPackage ../development/tools/parsing/antlr/2.7.7.nix {
jdk = jdk8; # todo: remove override https://github.com/nixos/nixpkgs/pull/89731
};
@@ -12816,6 +12816,8 @@ in
antlr4 = antlr4_8;
+ antlr = antlr4;
+
apacheAnt = callPackage ../development/tools/build-managers/apache-ant { };
apacheAnt_1_9 = callPackage ../development/tools/build-managers/apache-ant/1.9.nix { };
ant = apacheAnt;