From 393b2e3b19507d5df734be144cb29c59d989650e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 6 Jan 2014 14:22:33 +0100 Subject: [PATCH] ecj: Add a setup hook that makes Ant use ECJ automatically --- pkgs/development/eclipse/ecj/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/eclipse/ecj/default.nix b/pkgs/development/eclipse/ecj/default.nix index 432bdc72b3c..786fcdba18a 100644 --- a/pkgs/development/eclipse/ecj/default.nix +++ b/pkgs/development/eclipse/ecj/default.nix @@ -31,6 +31,12 @@ stdenv.mkDerivation rec { mkdir -pv $out/bin makeWrapper ${jdk.jre}/bin/java $out/bin/ecj \ --add-flags "-cp $out/share/java/ecj.jar org.eclipse.jdt.internal.compiler.batch.Main" + + # Add a setup hook that causes Ant to use the ECJ. + mkdir -p $out/nix-support + cat < $out/nix-support/setup-hook + export NIX_ANT_ARGS="-Dbuild.compiler=org.eclipse.jdt.core.JDTCompilerAdapter \$NIX_ANT_ARGS" + EOF ''; meta = {