1 { lib, stdenv, fetchurl, jdk, ant } :
3 stdenv.mkDerivation rec {
5 version = "11b-20160615";
8 url = "http://www2.cs.tum.edu/projects/cup/releases/java-cup-src-${version}.tar.gz";
9 sha256 = "1ymz3plngxclh7x3xr31537rvvak7lwyd0qkmnl1mkj5drh77rz0";
14 nativeBuildInputs = [ jdk ant ];
16 patches = [ ./javacup-0.11b_beta20160615-build-xml-git.patch ];
21 mkdir -p $out/{bin,share/{java,java-cup}}
22 cp dist/java-cup-11b.jar $out/share/java-cup/
23 cp dist/java-cup-11b-runtime.jar $out/share/java/
24 cat > $out/bin/javacup <<EOF
26 exec ${jdk.jre}/bin/java -jar $out/share/java-cup/java-cup-11b.jar "\$@"
28 chmod a+x $out/bin/javacup
32 homepage = "http://www2.cs.tum.edu/projects/cup/";
33 description = "LALR parser generator for Java";
34 license = lib.licenses.mit;
35 platforms = lib.platforms.all;
36 maintainers = [ lib.maintainers.romildo ];