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:
parent
f99dacf885
commit
7e75cb7cc4
4 changed files with 41 additions and 0 deletions
21
pkgs/development/compilers/ecj/builder.sh
Normal file
21
pkgs/development/compilers/ecj/builder.sh
Normal 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
|
13
pkgs/development/compilers/ecj/default.nix
Normal file
13
pkgs/development/compilers/ecj/default.nix
Normal 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];
|
||||
}
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -110,6 +110,8 @@ let {
|
|||
blackdown
|
||||
apacheAntBlackdown14
|
||||
jikes
|
||||
ecj
|
||||
j2re
|
||||
jetty
|
||||
;};
|
||||
|
||||
|
|
Loading…
Reference in a new issue