1 {lib, stdenv, fetchurl, jre}:
3 stdenv.mkDerivation rec {
7 url ="https://www.antlr3.org/download/antlr-${version}-complete.jar";
8 sha256 = "1xqbam8vf04q5fasb0m2n1pn5dbp2yw763sj492ncq04c5mqcglx";
14 mkdir -p "$out"/{lib/antlr,bin}
15 cp "$src" "$out/lib/antlr/antlr-${version}-complete.jar"
17 echo "#! ${stdenv.shell}" >> "$out/bin/antlr"
18 echo "'${jre}/bin/java' -cp '$out/lib/antlr/antlr-${version}-complete.jar' -Xms200M -Xmx400M org.antlr.Tool \"\$@\"" >> "$out/bin/antlr"
20 chmod a+x "$out/bin/antlr"
21 ln -s "$out/bin/antlr"{,3}
27 description = "Powerful parser generator";
29 ANTLR (ANother Tool for Language Recognition) is a powerful parser
30 generator for reading, processing, executing, or translating structured
31 text or binary files. It's widely used to build languages, tools, and
32 frameworks. From a grammar, ANTLR generates a parser that can build and
35 homepage = "https://www.antlr.org/";
36 sourceProvenance = with sourceTypes; [ binaryBytecode ];
37 license = licenses.bsd3;
38 platforms = platforms.linux ++ platforms.darwin;