Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5dc7314c5332
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8f9d3bfddb69
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Jun 20, 2017

  1. antlr4_7: init at 4.7

    Includes a more recent version of antlr to nixpkgs. Previous
    versions exist already, but version 4 brings many changes
    to the generated code and runtime targets.
    
    The install location has been changed from previous versions
    of antlr to make use of the set-java-classpath hook, which
    is required to make use of both the runtime and the binary.
    
    Also includes the testing rig as a script to allow graphical
    inspection of parse trees.
    John Children committed Jun 20, 2017
    Copy the full SHA
    ea440ea View commit details

Commits on Jun 24, 2017

  1. Merge pull request #26594 from jchildren/master

    antlr4_7: init at 4.7
    Mic92 authored Jun 24, 2017
    Copy the full SHA
    8f9d3bf View commit details
Showing with 44 additions and 0 deletions.
  1. +41 −0 pkgs/development/tools/parsing/antlr/4.7.nix
  2. +3 −0 pkgs/top-level/all-packages.nix
41 changes: 41 additions & 0 deletions pkgs/development/tools/parsing/antlr/4.7.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{stdenv, fetchurl, jre}:

stdenv.mkDerivation rec {
name = "antlr-${version}";
version = "4.7";
src = fetchurl {
url ="http://www.antlr.org/download/antlr-${version}-complete.jar";
sha256 = "0r08ay63s5aajix5j8j7lf7j7l7wiwdkr112b66nyhkj5f6c72yd";
};

unpackPhase = "true";

installPhase = ''
mkdir -p "$out"/{share/java,bin}
cp "$src" "$out/share/java/antlr-${version}-complete.jar"
echo "#! ${stdenv.shell}" >> "$out/bin/antlr"
echo "'${jre}/bin/java' -cp '$out/share/java/antlr-${version}-complete.jar:$CLASSPATH' -Xmx500M org.antlr.v4.Tool \"\$@\"" >> "$out/bin/antlr"
echo "#! ${stdenv.shell}" >> "$out/bin/grun"
echo "'${jre}/bin/java' -cp '$out/share/java/antlr-${version}-complete.jar:$CLASSPATH' org.antlr.v4.gui.TestRig \"\$@\"" >> "$out/bin/grun"
chmod a+x "$out/bin/antlr" "$out/bin/grun"
ln -s "$out/bin/antlr"{,4}
'';

inherit jre;

meta = with stdenv.lib; {
description = "Powerful parser generator";
longDescription = ''
ANTLR (ANother Tool for Language Recognition) is a powerful parser
generator for reading, processing, executing, or translating structured
text or binary files. It's widely used to build languages, tools, and
frameworks. From a grammar, ANTLR generates a parser that can build and
walk parse trees.
'';
homepage = http://www.antlr.org/;
platforms = platforms.linux;
};
}
3 changes: 3 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -6426,6 +6426,9 @@ with pkgs;
antlr3_5 = callPackage ../development/tools/parsing/antlr/3.5.nix { };
antlr3 = antlr3_5;

antlr4_7 = callPackage ../development/tools/parsing/antlr/4.7.nix { };
antlr4 = antlr4_7;

ant = apacheAnt;

apacheAnt = callPackage ../development/tools/build-managers/apache-ant { };