summary refs log tree commit diff
path: root/pkgs/development/tools/parsing/antlr/3.5.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/parsing/antlr/3.5.nix')
-rw-r--r--pkgs/development/tools/parsing/antlr/3.5.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/pkgs/development/tools/parsing/antlr/3.5.nix b/pkgs/development/tools/parsing/antlr/3.5.nix
index 6fa6323d3e8..cb6263aca42 100644
--- a/pkgs/development/tools/parsing/antlr/3.5.nix
+++ b/pkgs/development/tools/parsing/antlr/3.5.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, fetchFromGitHub, jre}:
+{lib, stdenv, fetchpatch, fetchurl, fetchFromGitHub, jre}:
 
 stdenv.mkDerivation rec {
   pname = "antlr";
@@ -14,6 +14,13 @@ stdenv.mkDerivation rec {
     sha256 = "1i0w2v9prrmczlwkfijfp4zfqfgrss90a7yk2hg3y0gkg2s4abbk";
   };
 
+  patches = [
+    (fetchpatch {
+      url = "https://src.fedoraproject.org/rpms/antlr3/raw/f1bb8d639678047935e1761c3bf3c1c7da8d0f1d/f/0006-antlr3memory.hpp-fix-for-C-20-mode.patch";
+      sha256 = "0apk904afjqbad6c7z9r72a9lkbz69vwrl8j2a6zgxjn8dfb2p8b";
+    })
+  ];
+
   installPhase = ''
     mkdir -p "$out"/{lib/antlr,bin,include}
     cp "$jar" "$out/lib/antlr/antlr-${version}-complete.jar"
@@ -28,7 +35,7 @@ stdenv.mkDerivation rec {
 
   inherit jre;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Powerful parser generator";
     longDescription = ''
       ANTLR (ANother Tool for Language Recognition) is a powerful parser
@@ -40,6 +47,6 @@ stdenv.mkDerivation rec {
     homepage = "https://www.antlr.org/";
     license = licenses.bsd3;
     platforms = platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.farlion ];
+    maintainers = [ lib.maintainers.farlion ];
   };
 }