Added ecj (The Eclipse Compiler for Java) to Nix. This means that Java

5.0 code can now be compiled and run in Nix (the J2RE 5.0 was already
available without deployment problems).

Also, I need ecj to checkout its behaviour and warnings as a second
reference (javac).


svn path=/nixpkgs/trunk/; revision=3783
This commit is contained in:
Martin Bravenboer 2005-09-06 00:00:22 +00:00
parent f99dacf885
commit 7e75cb7cc4
4 changed files with 41 additions and 0 deletions

View file

@ -0,0 +1,21 @@
. $stdenv/setup
unzip $src
cd jdtcoresrc
ant -f compilejdtcorewithjavac.xml
mkdir -p $out/share/ecj
mv ecj.jar $out/share/ecj
mkdir -p $out/bin
cat >> $out/bin/ecj <<EOF
#! /bin/sh
export JAVA_HOME=$j2re
export LANG="en_US"
$j2re/bin/java -cp $out/share/ecj/ecj.jar org.eclipse.jdt.internal.compiler.batch.Main \$@
EOF
chmod u+x $out/bin/ecj

View file

@ -0,0 +1,13 @@
{stdenv, fetchurl, unzip, ant, j2re}:
stdenv.mkDerivation {
name = "ecj-3.1";
builder = ./builder.sh;
src = fetchurl {
url = ftp://sunsite.informatik.rwth-aachen.de/pub/mirror/eclipse/R-3.1-200506271435/eclipse-sourceBuild-srcIncluded-3.1.zip;
md5 = "19ad65d52005da5eaa1d3687b3a50de2";
};
inherit j2re;
buildInputs = [unzip ant j2re];
}

View file

@ -482,6 +482,11 @@ rec {
inherit fetchurl stdenv;
};
ecj = (import ../development/compilers/ecj) {
inherit fetchurl stdenv unzip j2re;
ant = apacheAntBlackdown14;
};
blackdown = (import ../development/compilers/blackdown) {
inherit fetchurl stdenv;
};

View file

@ -110,6 +110,8 @@ let {
blackdown
apacheAntBlackdown14
jikes
ecj
j2re
jetty
;};