about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-01-13 13:16:17 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-01-13 13:16:17 +0100
commit6fb27abf3330139b7f5a868ae988fcf04284a1ca (patch)
tree4e5772e2bf7b785413ea69d15deb38e53925cf6e /pkgs/development
parent78d3180dbe8896500a35a848675462aeafe6f1b9 (diff)
parentcf4acab5670e9c04cbd924ad0835ba5a5219b296 (diff)
downloadnixlib-6fb27abf3330139b7f5a868ae988fcf04284a1ca.tar
nixlib-6fb27abf3330139b7f5a868ae988fcf04284a1ca.tar.gz
nixlib-6fb27abf3330139b7f5a868ae988fcf04284a1ca.tar.bz2
nixlib-6fb27abf3330139b7f5a868ae988fcf04284a1ca.tar.lz
nixlib-6fb27abf3330139b7f5a868ae988fcf04284a1ca.tar.xz
nixlib-6fb27abf3330139b7f5a868ae988fcf04284a1ca.tar.zst
nixlib-6fb27abf3330139b7f5a868ae988fcf04284a1ca.zip
Merge branch 'java'
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/compilers/closure/default.nix6
-rw-r--r--pkgs/development/compilers/openjdk/default.nix129
-rw-r--r--pkgs/development/eclipse/ecj/default.nix84
-rw-r--r--pkgs/development/interpreters/clojure/binary.nix47
-rw-r--r--pkgs/development/interpreters/clojure/clooj-wrapper.nix11
-rw-r--r--pkgs/development/interpreters/clojure/clooj.nix23
-rw-r--r--pkgs/development/interpreters/clojure/default.nix25
-rw-r--r--pkgs/development/interpreters/clojure/wrapper.nix11
-rwxr-xr-xpkgs/development/interpreters/kaffe/builder.sh5
-rw-r--r--pkgs/development/interpreters/kaffe/default.nix14
-rw-r--r--pkgs/development/libraries/java/hydra-ant-logger/default.nix23
-rw-r--r--pkgs/development/libraries/java/icedtea/default.nix114
-rw-r--r--pkgs/development/libraries/java/icedtea/nixos-slash-bin.patch20
-rw-r--r--pkgs/development/libraries/java/rhino/default.nix67
-rw-r--r--pkgs/development/libraries/java/xalanj/default.nix57
-rw-r--r--pkgs/development/libraries/java/xerces/default.nix57
-rw-r--r--pkgs/development/tools/build-managers/apache-ant/ant-contrib.nix17
-rw-r--r--pkgs/development/tools/build-managers/apache-ant/builder.sh53
-rw-r--r--pkgs/development/tools/build-managers/apache-ant/default.nix114
-rw-r--r--pkgs/development/tools/build-managers/apache-ant/from-source.nix90
-rw-r--r--pkgs/development/tools/build-managers/apache-ant/use-gcj.patch18
-rw-r--r--pkgs/development/tools/build-managers/leiningen/builder.sh8
-rw-r--r--pkgs/development/tools/build-managers/leiningen/lein_2.3.0.patch2
-rw-r--r--pkgs/development/tools/parsing/jikespg/builder.sh15
-rw-r--r--pkgs/development/tools/parsing/jikespg/default.nix15
25 files changed, 285 insertions, 740 deletions
diff --git a/pkgs/development/compilers/closure/default.nix b/pkgs/development/compilers/closure/default.nix
index 13c9f1c03505..428346b78b6b 100644
--- a/pkgs/development/compilers/closure/default.nix
+++ b/pkgs/development/compilers/closure/default.nix
@@ -14,11 +14,11 @@ stdenv.mkDerivation rec {
   buildInputs = [ gnutar ];
 
   installPhase = ''
-    mkdir -p $out/lib/java $out/bin
+    mkdir -p $out/share/java $out/bin
     tar -xzf $src
-    cp -r compiler.jar $out/lib/java/
+    cp -r compiler.jar $out/share/java/
     echo "#!${bash}/bin/bash" > $out/bin/closure-compiler
-    echo "${jre}/bin/java -jar $out/lib/java/compiler.jar \"\$@\"" >> $out/bin/closure-compiler
+    echo "${jre}/bin/java -jar $out/share/java/compiler.jar \"\$@\"" >> $out/bin/closure-compiler
     chmod +x $out/bin/closure-compiler
   '';
 
diff --git a/pkgs/development/compilers/openjdk/default.nix b/pkgs/development/compilers/openjdk/default.nix
index fd229cf5b139..b99139c0e3fe 100644
--- a/pkgs/development/compilers/openjdk/default.nix
+++ b/pkgs/development/compilers/openjdk/default.nix
@@ -1,30 +1,6 @@
-{ stdenv
-, fetchurl
-, unzip
-, zip
-, procps
-, coreutils
-, alsaLib
-, ant
-, freetype
-, cups
-, which
-, jdk
-, nettools
-, libX11
-, libXt
-, libXext
-, libXrender
-, libXtst
-, libXi
-, libXinerama
-, libXcursor
-, fontconfig
-, cpio
-, cacert
-, jreOnly ? false
-, perl
-}:
+{ stdenv, fetchurl, unzip, zip, procps, coreutils, alsaLib, ant, freetype, cups
+, which, jdk, nettools, libX11, libXt, libXext, libXrender, libXtst, libXi, libXinerama
+, libXcursor, fontconfig, cpio, cacert, perl, setJavaClassPath }:
 
 let
 
@@ -46,35 +22,20 @@ let
 in
 
 stdenv.mkDerivation rec {
-  name = "openj${if jreOnly then "re" else "dk"}-7u${update}b${build}";
+  name = "openjdk-7u${update}b${build}";
 
   src = fetchurl {
     url = http://www.java.net/download/openjdk/jdk7u40/promoted/b43/openjdk-7u40-fcs-src-b43-26_aug_2013.zip;
     sha256 = "15h5nmbw6yn5596ccakqdbs0vd8hmslsfg5sfk8wmjvn31bfmy00";
   };
 
-  #  outputs = [ "out" ] ++ stdenv.lib.optionals (! jreOnly) [ "jre" ];
-
-  buildInputs = [
-    unzip
-    procps
-    ant
-    which
-    zip
-    cpio
-    nettools
-    alsaLib
-    libX11
-    libXt
-    libXext
-    libXrender
-    libXtst
-    libXi
-    libXinerama
-    libXcursor
-    fontconfig
-    perl
-  ];
+  outputs = [ "out" "jre" ];
+
+  buildInputs =
+    [ unzip procps ant which zip cpio nettools alsaLib
+      libX11 libXt libXext libXrender libXtst libXi libXinerama libXcursor
+      fontconfig perl
+    ];
 
   NIX_LDFLAGS = "-lfontconfig -lXcursor -lXinerama";
 
@@ -85,13 +46,12 @@ stdenv.mkDerivation rec {
 
     sed -i "s@/bin/echo -e@${coreutils}/bin/echo -e@" \
       openjdk/{jdk,corba}/make/common/shared/Defs-utils.gmk
-
-    sed -i "s@<Xrender.h>@<X11/extensions/Xrender.h>@" \
-      openjdk/jdk/src/solaris/native/sun/java2d/x11/XRSurfaceData.c
   '';
 
   patches = [ ./cppflags-include-fix.patch ];
 
+  NIX_NO_SELF_RPATH = true;
+
   makeFlags = [
     "SORT=${coreutils}/bin/sort"
     "ALSA_INCLUDE=${alsaLib}/include/alsa/version.h"
@@ -108,43 +68,68 @@ stdenv.mkDerivation rec {
     "UNLIMITED_CRYPTO=1"
   ];
 
-  configurePhase = ''
-    make $makeFlags sanity
-  '';
+  configurePhase = "true";
 
   installPhase = ''
-    mkdir -p $out
-    cp -av build/*/j2${if jreOnly then "re" else "sdk"}-image/* $out
+    mkdir -p $out/lib/openjdk $out/share $jre/lib/openjdk
+
+    cp -av build/*/j2sdk-image/* $out/lib/openjdk
+
+    # Move some stuff to top-level.
+    mv $out/lib/openjdk/include $out/include
+    mv $out/lib/openjdk/man $out/share/man
 
     # Remove some broken manpages.
     rm -rf $out/share/man/ja*
 
     # Remove crap from the installation.
-    rm -rf $out/demo $out/sample
+    rm -rf $out/lib/openjdk/demo $out/lib/openjdk/sample
+
+    # Move the JRE to a separate output.
+    mv $out/lib/openjdk/jre $jre/lib/openjdk/
+    ln -s $jre/lib/openjdk/jre $out/lib/openjdk/jre
+
+    # Remove duplicate binaries.
+    for i in $(cd $out/lib/openjdk/bin && echo *); do
+      if cmp -s $out/lib/openjdk/bin/$i $jre/lib/openjdk/jre/bin/$i; then
+        ln -sfn $jre/lib/openjdk/jre/bin/$i $out/lib/openjdk/bin/$i
+      fi
+    done
 
     # Generate certificates.
-    pushd $out/${if ! jreOnly then "jre/" else ""}lib/security
+    pushd $jre/lib/openjdk/jre/lib/security
     rm cacerts
-    perl ${./generate-cacerts.pl} $out/bin/keytool ${cacert}/etc/ca-bundle.crt
+    perl ${./generate-cacerts.pl} $jre/lib/openjdk/jre/bin/keytool ${cacert}/etc/ca-bundle.crt
     popd
+
+    ln -s $out/lib/openjdk/bin $out/bin
+    ln -s $jre/lib/openjdk/jre/bin $jre/bin
+  ''; # */
+
+  # FIXME: this is unnecessary once the multiple-outputs branch is merged.
+  preFixup = ''
+    prefix=$jre stripDirs "$stripDebugList" "''${stripDebugFlags:--S}"
+    patchELF $jre
+    propagatedNativeBuildInputs+=" $jre"
+
+    # Propagate the setJavaClassPath setup hook from the JRE so that
+    # any package that depends on the JRE has $CLASSPATH set up
+    # properly.
+    mkdir -p $jre/nix-support
+    echo -n "${setJavaClassPath}" > $jre/nix-support/propagated-native-build-inputs
+
+    # Set JAVA_HOME automatically.
+    mkdir -p $out/nix-support
+    cat <<EOF > $out/nix-support/setup-hook
+    if [ -n "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
+    EOF
   '';
-#  '' + (if jreOnly then "" else ''
-#    if [ -z $jre ]; then
-#      exit 0
-#    fi
-#    mkdir -p $jre
-#    cp -av build/*/j2re-image/* $jre
-#  '');
 
   meta = {
     homepage = http://openjdk.java.net/;
-
     license = "GPLv2";
-
     description = "The open-source Java Development Kit";
-
     maintainers = [ stdenv.lib.maintainers.shlevy ];
-
     platforms = stdenv.lib.platforms.linux;
   };
 
diff --git a/pkgs/development/eclipse/ecj/default.nix b/pkgs/development/eclipse/ecj/default.nix
index ba3e643a4fea..786fcdba18a8 100644
--- a/pkgs/development/eclipse/ecj/default.nix
+++ b/pkgs/development/eclipse/ecj/default.nix
@@ -1,59 +1,59 @@
-{ stdenv, fetchurl, unzip, ant, gcj }:
+{ stdenv, fetchurl, unzip, ant, jdk, makeWrapper }:
 
 let
   version = "3.7.2";
   date    = "201202080800";
-  isGCJ   = stdenv.lib.strings.substring 0 3 gcj.name == "gcj";
-  javaExec  = if isGCJ then "gij" else "java";
-  javaFlags = if isGCJ then "--cp" else "-cp";
 in
-  stdenv.mkDerivation rec {
-    name = "ecj-${version}";
 
-    src = fetchurl {
-      url = "http://eclipse.ialto.org/eclipse/downloads/drops/R-${version}-${date}/ecjsrc-${version}.jar";
-      sha256 = "0swyysbyfmv068x8q1c5jqpwk5zb4xahg17aypx5rwb660f8fpbm";
-    };
+stdenv.mkDerivation rec {
+  name = "ecj-${version}";
 
-    buildInputs = [ unzip ant gcj ];
+  src = fetchurl {
+    url = "http://eclipse.ialto.org/eclipse/downloads/drops/R-${version}-${date}/ecjsrc-${version}.jar";
+    sha256 = "0swyysbyfmv068x8q1c5jqpwk5zb4xahg17aypx5rwb660f8fpbm";
+  };
 
-    unpackPhase = ''
-      mkdir "${name}"
-      cd "${name}"
-      unzip "$src"
-    '';
+  buildInputs = [ unzip ant jdk makeWrapper ];
 
-    # Use whatever compiler Ant knows.
-    buildPhase = "ant build";
+  unpackPhase = ''
+    mkdir "${name}"
+    cd "${name}"
+    unzip "$src"
+  '';
 
-    installPhase = ''
-      mkdir -pv "$out/lib/java"
-      cp -v *.jar "$out/lib/java"
+  # Use whatever compiler Ant knows.
+  buildPhase = "ant build";
 
-      mkdir -pv "$out/bin"
-      cat > "$out/bin/ecj" <<EOF
-#! /bin/sh
-exec "$(type -P ${javaExec})" ${javaFlags} "$out/lib/java/ecj.jar" org.eclipse.jdt.internal.compiler.batch.Main \$@
-EOF
+  installPhase = ''
+    mkdir -pv $out/share/java
+    cp -v *.jar $out/share/java
 
-      chmod u+x "$out/bin/ecj"
-    '';
+    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"
 
-    meta = {
-      description = "The Eclipse Compiler for Java (ECJ)";
+    # Add a setup hook that causes Ant to use the ECJ.
+    mkdir -p $out/nix-support
+    cat <<EOF > $out/nix-support/setup-hook
+    export NIX_ANT_ARGS="-Dbuild.compiler=org.eclipse.jdt.core.JDTCompilerAdapter \$NIX_ANT_ARGS"
+    EOF
+  '';
 
-      longDescription = ''
-        ECJ is an incremental Java compiler.  Implemented as an Eclipse
-        builder, it is based on technology evolved from VisualAge for Java
-        compiler.  In particular, it allows users to run and debug code which
-        still contains unresolved errors.
-      '';
+  meta = {
+    description = "The Eclipse Compiler for Java (ECJ)";
+
+    longDescription = ''
+      ECJ is an incremental Java compiler.  Implemented as an Eclipse
+      builder, it is based on technology evolved from VisualAge for Java
+      compiler.  In particular, it allows users to run and debug code which
+      still contains unresolved errors.
+    '';
 
-      homepage = http://www.eclipse.org/jdt/core/index.php;
+    homepage = http://www.eclipse.org/jdt/core/index.php;
 
-      # http://www.eclipse.org/legal/epl-v10.html (free software, copyleft)
-      license = "EPLv1.0";
+    # http://www.eclipse.org/legal/epl-v10.html (free software, copyleft)
+    license = "EPLv1.0";
 
-      maintainers = [ ];
-    };
-  }
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/development/interpreters/clojure/binary.nix b/pkgs/development/interpreters/clojure/binary.nix
deleted file mode 100644
index 1678a9323799..000000000000
--- a/pkgs/development/interpreters/clojure/binary.nix
+++ /dev/null
@@ -1,47 +0,0 @@
-{stdenv, fetchurl, unzip}:
-
-stdenv.mkDerivation rec {
-  version = "1.5.1";
-  name = "clojure-binary-${version}";
-
-  src = fetchurl {
-    url = "http://repo1.maven.org/maven2/org/clojure/clojure/${version}/clojure-${version}.zip";
-    sha256 = "1qgiji6ddvv40khp3qb3xfz09g7p4nnsh3pywqglb9f16v534yzy";
-  };
-
-
-  buildInputs = [ unzip ];
-
-  phases = "unpackPhase installPhase";
-
-  installPhase = "
-    mkdir -p $out/lib/java
-    cp clojure-${version}.jar clojure.jar
-    install -t $out/lib/java clojure.jar
-  ";
-
-  meta = {
-    description = "a Lisp dialect for the JVM";
-    homepage = http://clojure.org/;
-    license = stdenv.lib.licenses.bsd3;
-    longDescription = ''
-      Clojure is a dynamic programming language that targets the Java
-      Virtual Machine. It is designed to be a general-purpose language,
-      combining the approachability and interactive development of a
-      scripting language with an efficient and robust infrastructure for
-      multithreaded programming. Clojure is a compiled language - it
-      compiles directly to JVM bytecode, yet remains completely
-      dynamic. Every feature supported by Clojure is supported at
-      runtime. Clojure provides easy access to the Java frameworks, with
-      optional type hints and type inference, to ensure that calls to Java
-      can avoid reflection.
-
-      Clojure is a dialect of Lisp, and shares with Lisp the code-as-data
-      philosophy and a powerful macro system. Clojure is predominantly a
-      functional programming language, and features a rich set of immutable,
-      persistent data structures. When mutable state is needed, Clojure
-      offers a software transactional memory system and reactive Agent
-      system that ensure clean, correct, multithreaded designs.
-    '';
-  };
-}
diff --git a/pkgs/development/interpreters/clojure/clooj-wrapper.nix b/pkgs/development/interpreters/clojure/clooj-wrapper.nix
deleted file mode 100644
index fd95b86451fe..000000000000
--- a/pkgs/development/interpreters/clojure/clooj-wrapper.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{writeTextFile, jre, clooj}:
-
-writeTextFile {
-  name = "clooj-wrapper";
-  executable = true;
-  destination = "/bin/clooj";
-  text = ''
-    #!/bin/sh
-    exec ${jre}/bin/java -jar ${clooj}/lib/java/clooj.jar
-  '';
-}
diff --git a/pkgs/development/interpreters/clojure/clooj.nix b/pkgs/development/interpreters/clojure/clooj.nix
index 2ad6f751f2bd..c1e104458302 100644
--- a/pkgs/development/interpreters/clojure/clooj.nix
+++ b/pkgs/development/interpreters/clojure/clooj.nix
@@ -1,24 +1,27 @@
-{stdenv, fetchurl}:
+{ stdenv, fetchurl, jre, makeWrapper }:
+
+let version = "0.4.4"; in
+
+stdenv.mkDerivation {
+  name = "clooj-${version}";
 
-let
   jar = fetchurl {
-    url = https://github.com/downloads/arthuredelstein/clooj/clooj-0.1.36-STANDALONE.jar;
-    sha256 = "173c66c0aade3ae5d21622f629e60efa51a03ad83c087b02c25e806c5b7f838c";
+    url = "http://www.mediafire.com/download/prkf64humftrmz3/clooj-${version}-standalone.jar";
+    sha256 = "0hbc29bg2a86rm3sx9kvj7h7db9j0kbnrb706wsfiyk3zi3bavnd";
   };
-in
 
-stdenv.mkDerivation {
-  name = "clooj-0.1.32";
+  buildInputs = [ makeWrapper ];
 
   phases = "installPhase";
 
   installPhase = ''
-    mkdir -p $out/lib/java
-    ln -s ${jar} $out/lib/java/clooj.jar
+    mkdir -p $out/share/java
+    ln -s $jar $out/share/java/clooj.jar
+    makeWrapper ${jre}/bin/java $out/bin/clooj --add-flags "-jar $out/share/java/clooj.jar"
   '';
 
   meta = {
-    description = "clooj, a lightweight IDE for clojure";
+    description = "A lightweight IDE for Clojure";
     homepage = https://github.com/arthuredelstein/clooj;
     license = stdenv.lib.licenses.bsd3;
   };
diff --git a/pkgs/development/interpreters/clojure/default.nix b/pkgs/development/interpreters/clojure/default.nix
index dbbe4a9dcc31..6db652572a3a 100644
--- a/pkgs/development/interpreters/clojure/default.nix
+++ b/pkgs/development/interpreters/clojure/default.nix
@@ -1,30 +1,27 @@
-{stdenv, fetchurl, unzip, ant, version ? "1.4.0" }:
+{ stdenv, fetchurl, unzip, ant, jdk, makeWrapper }:
+
+let version = "1.5.1"; in
 
-let 
-  src_hashes = {
-    "1.4.0" = "27a5a151d5cc1bc3e52dff47c66111e637fefeb42d9bedfa1284a1a31d080171";
-    "1.5.0-RC1" = "111jm0nxkvqr1vrwcpvr70v5paasp8msrj5h8zm1c144c8zc1vln";
-  };
-in 
 stdenv.mkDerivation {
   name = "clojure-${version}";
 
   src = fetchurl {
     url = "http://repo1.maven.org/maven2/org/clojure/clojure/${version}/clojure-${version}.zip";
-    sha256 = (builtins.getAttr version src_hashes); 
+    sha256 = "1qgiji6ddvv40khp3qb3xfz09g7p4nnsh3pywqglb9f16v534yzy";
   };
 
-  buildInputs = [ unzip ant ];
+  buildInputs = [ unzip ant jdk makeWrapper ];
 
   buildPhase = "ant jar";
 
-  installPhase = "
-    mkdir -p $out/lib/java
-    install -t $out/lib/java clojure.jar
-  ";
+  installPhase = ''
+    mkdir -p $out/share/java $out/bin
+    install -t $out/share/java clojure.jar
+    makeWrapper ${jdk.jre}/bin/java $out/bin/clojure --add-flags "-cp $out/share/java/clojure.jar clojure.main"
+  '';
 
   meta = {
-    description = "a Lisp dialect for the JVM";
+    description = "A Lisp dialect for the JVM";
     homepage = http://clojure.org/;
     license = stdenv.lib.licenses.bsd3;
     longDescription = ''
diff --git a/pkgs/development/interpreters/clojure/wrapper.nix b/pkgs/development/interpreters/clojure/wrapper.nix
deleted file mode 100644
index a2a9a4044621..000000000000
--- a/pkgs/development/interpreters/clojure/wrapper.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{writeTextFile, jre, clojure}:
-
-writeTextFile {
-  name = "clojure-wrapper";
-  executable = true;
-  destination = "/bin/clojure";
-  text = ''
-    #!/bin/sh
-    exec ${jre}/bin/java -cp ${clojure}/lib/java/clojure.jar clojure.main
-  '';
-}
\ No newline at end of file
diff --git a/pkgs/development/interpreters/kaffe/builder.sh b/pkgs/development/interpreters/kaffe/builder.sh
deleted file mode 100755
index 823a8ebff0ec..000000000000
--- a/pkgs/development/interpreters/kaffe/builder.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-source $stdenv/setup || exit 1
-
-configureFlags="--with-jikes=$jikes/bin/jikes --enable-pure-java-math"
-genericBuild
-
diff --git a/pkgs/development/interpreters/kaffe/default.nix b/pkgs/development/interpreters/kaffe/default.nix
deleted file mode 100644
index 6f7ba6c18e9d..000000000000
--- a/pkgs/development/interpreters/kaffe/default.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-{stdenv, fetchurl, alsaLib, xlibs, jikes}:
-
-stdenv.mkDerivation {
-  name = "kaffe-1.1.4";
-  builder = ./builder.sh;
-  src = fetchurl {
-    url = ftp://ftp.kaffe.org/pub/kaffe/v1.1.x-development/kaffe-1.1.4.tar.gz;
-    md5 = "94d6e7035ba68c2221dce68bb5b3f6e9";
-  };
-  inherit jikes alsaLib;
-  inherit (xlibs) libXaw libX11;
-
-  buildInputs = [jikes alsaLib xlibs.libXaw xlibs.libX11];
-}
diff --git a/pkgs/development/libraries/java/hydra-ant-logger/default.nix b/pkgs/development/libraries/java/hydra-ant-logger/default.nix
index 1439c6101ab9..c54c3f3a8ee8 100644
--- a/pkgs/development/libraries/java/hydra-ant-logger/default.nix
+++ b/pkgs/development/libraries/java/hydra-ant-logger/default.nix
@@ -1,24 +1,21 @@
-{ fetchsvn, stdenv, ant }:
+{ fetchgit, stdenv, ant, jdk }:
 
 stdenv.mkDerivation rec {
   name = "hydra-ant-logger-${version}";
   version = "2010.2";
 
-  src = fetchsvn {
-    url = https://svn.nixos.org/repos/nix/hydra-ant-logger/trunk;
-    rev = 20396;
-    sha256 = "1lp5zy80m4y2kq222q2x052ys5mlhgc7y4kxh2bl48744f1fkgyr";
+  src = fetchgit {
+    url = https://github.com/NixOS/hydra-ant-logger.git;
+    rev = "dae3224f4ed42418d3492bdf5bee4f825819006f";
+    sha256 = "01s7m6007rn9107rw5wcgna7i20x6p6kfzl4f79jrvpkjy6kz176";
   };
 
-  buildInputs = [ ant ];
+  buildInputs = [ ant jdk ];
 
-  buildPhase = ''
-    ln -s ${ant}/lib/ant.jar lib/ant.jar
-    ant 
-  '';
+  buildPhase = "mkdir lib; ant";
 
-  installPhase = '' 
-    mkdir -p "$out/lib/java"
-    cp -v *.jar "$out/lib/java"
+  installPhase = ''
+    mkdir -p $out/share/java
+    cp -v *.jar $out/share/java
   '';
 }
diff --git a/pkgs/development/libraries/java/icedtea/default.nix b/pkgs/development/libraries/java/icedtea/default.nix
deleted file mode 100644
index 094e2a10f950..000000000000
--- a/pkgs/development/libraries/java/icedtea/default.nix
+++ /dev/null
@@ -1,114 +0,0 @@
-/* XXX: This is work in progress and it needs your help!  */
-
-/* See http://icedtea.classpath.org/wiki/BuildRequirements for a
-   list of dependencies.  */
-
-{ fetchurl, stdenv, which
-, wget, cpio, file, ecj, gcj, ant, gawk, procps, inetutils, zip, unzip, zlib
-, alsaLib, cups, lesstif, freetype, classpath, libjpeg, libpng, giflib
-, xalanj, xerces, rhino
-, libX11, libXp, libXtst, libXinerama, libXt, libXrender, xproto
-, pkgconfig, xulrunner, pulseaudio }:
-
-let
-  # These variables must match those in the top-level `Makefile.am'.
-  openjdkVersion   = "b16";
-  openjdkDate      = "24_apr_2009";
-  openjdkURL       =
-    "http://download.java.net/openjdk/jdk6/promoted/${openjdkVersion}/";
-  openjdkSourceZip = "openjdk-6-src-${openjdkVersion}-${openjdkDate}.tar.gz";
-
-  openjdk          = fetchurl {
-    url = "${openjdkURL}${openjdkSourceZip}";
-    sha256 = "084lkhsnj29finb6pmvrh83nqbliwv32gdi5q5sv43dpv24r85cn";
-  };
-
-  hotspot          = fetchurl {
-    url = "http://hg.openjdk.java.net/hsx/hsx14/master/archive/09f7962b8b44.tar.gz";
-    sha256 = "1jbd9ki5ip96293mv1qil20yqcgvkmcrhs302j0n8i8f3v1j70bf";
-  };
-
-in
-
-stdenv.mkDerivation rec {
-  name = "icedtea6-1.6.1";
-
-  src = fetchurl {
-    url = "http://icedtea.classpath.org/download/source/${name}.tar.gz";
-    sha256 = "11vaanfmz842x576wrw5qldpkksi8wqjmh9wikn5gxyjk87qq3k5";
-  };
-
-  buildInputs = [
-    wget  # Not actually used, thanks to `--with-openjdk-src-zip' et al.
-    which cpio file ecj gcj ant gawk procps inetutils zip unzip zlib
-    alsaLib cups lesstif freetype classpath libjpeg libpng giflib
-    xalanj xerces
-    libX11 libXp libXtst libXinerama libXt libXrender xproto
-    pkgconfig /* xulrunner */ pulseaudio
-  ];
-
-  preConfigure =
-    '' # Use the Sun-compatible tools (`jar', etc.).
-       export PATH="${gcj.gcc}/lib/jvm/bin:$PATH"
-
-       # Copy patches.
-       cp -v "${./nixos-slash-bin.patch}" patches/nixos-slash-bin.patch
-    '';
-
-  configureFlags =
-    stdenv.lib.concatStringsSep " "
-      [ "--with-gcj-home=${gcj}"
-        "--with-ecj" "--with-ecj-jar=${ecj}/lib/java/ecj.jar"
-        "--with-openjdk-src-zip=${openjdk}"
-        "--with-hotspot-src-zip=${hotspot}"
-        "--with-ant-home=${ant}/lib/java"
-        "--with-xalan2-jar=${xalanj}/lib/java/xalan.jar"
-        "--with-xalan2-serializer-jar=${xalanj}/lib/java/xalan.jar"
-        "--with-xerces2-jar=${xerces}/lib/java/xercesImpl.jar"
-        "--with-rhino=${rhino}/lib/java/js.jar"
-        "--disable-plugin" # FIXME: Enable it someday.
-
-        "--with-parallel-job"
-      ];
-
-  makeFlags =
-    [ # Have OpenCDK use tools from $PATH.
-      "ALT_UNIXCCS_PATH=" "ALT_UNIXCOMMAND_PATH=" "ALT_USRBIN_PATH="
-      "ALT_COMPILER_PATH=" "ALT_DEVTOOLS_PATH="
-
-      # Libraries.
-      "ALT_MOTIF_DIR="
-      "ALT_FREETYPE_HEADERS_PATH=${freetype}/include"
-      "ALT_FREETYPE_LIB_PATH=${freetype}/lib"
-      "ALT_CUPS_HEADERS_PATH=${cups}/include"
-      "ALT_CUPS_LIB_PATH=${cups}/lib"
-
-      # Tell IcedTea about our patches.
-      "DISTRIBUTION_PATCHES=patches/nixos-slash-bin.patch"
-    ];
-
-  meta = {
-    description = "IcedTea, a libre Java development kit based on OpenJDK";
-
-    longDescription =
-      '' The IcedTea project provides a harness to build the source code from
-         http://openjdk.java.net using Free Software build tools and adds a
-         number of key features to the upstream OpenJDK codebase: a Free
-         64-bit plugin with LiveConnect and Java Web Start support, support
-         for additional platforms via a pure interpreted mode in HotSpot
-         (Zero) or the alternative CACAO virtual machine.  Experimental JIT
-         support for Zero is also available via Shark.
-      '';
-
-    license = "GPLv2"; /* and multiple-licensing, e.g., for the plug-ins */
-
-    homepage = http://icedtea.classpath.org/;
-
-    maintainers = [ ];
-
-    # Restrict to GNU systems for now.
-    platforms = stdenv.lib.platforms.gnu;
-
-    broken = true;
-  };
-}
diff --git a/pkgs/development/libraries/java/icedtea/nixos-slash-bin.patch b/pkgs/development/libraries/java/icedtea/nixos-slash-bin.patch
deleted file mode 100644
index df4d1f4d03f9..000000000000
--- a/pkgs/development/libraries/java/icedtea/nixos-slash-bin.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Remove references to /bin/echo to allow NixOS builds.
-
---- openjdk/jdk/make/common/shared/Defs-utils.gmk	2009-04-24 09:33:55.000000000 +0200
-+++ openjdk/jdk/make/common/shared/Defs-utils.gmk	2010-01-19 15:39:29.000000000 +0100
-@@ -177,7 +177,7 @@ ifeq ($(PLATFORM),linux)
- 
-   NAWK           = $(USRBIN_PATH)gawk
-   # Intrinsic unix command, with backslash-escaped character interpretation
--  ECHO           = /bin/echo -e
-+  ECHO           = echo -e
-   # These are really in UTILS_USR_BIN_PATH on Linux (only sccs is not)
-   AR             = $(UTILS_USR_BIN_PATH)ar
-   AS             = $(UTILS_USR_BIN_PATH)as
-@@ -195,6 +195,6 @@ ifeq ($(PLATFORM),solaris)
-   # Intrinsic unix command, with backslash-escaped character interpretation
-   #   (not using -e  will cause build failure when using /bin/bash)
-   #   (using -e breaks something else)
--  ECHO           = /usr/bin/echo
-+  ECHO           = echo
- endif
diff --git a/pkgs/development/libraries/java/rhino/default.nix b/pkgs/development/libraries/java/rhino/default.nix
index a61ea5e60452..ec19e381281d 100644
--- a/pkgs/development/libraries/java/rhino/default.nix
+++ b/pkgs/development/libraries/java/rhino/default.nix
@@ -9,48 +9,49 @@ let
     sha256 = "1pb08d9j81d0wz5wj31idz198iwhqb7mch872n08jh1354rjlqwk";
   };
 in
-  stdenv.mkDerivation {
-    name = "rhino-${version}";
 
-    src = fetchurl {
-      url = "ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_7R2.zip";
-      sha256 = "1p32hkghi6bkc3cf2dcqyaw5cjj7403mykcp0fy8f5bsnv0pszv7";
-    };
+stdenv.mkDerivation {
+  name = "rhino-${version}";
 
-    patches = [ ./gcj-type-mismatch.patch ];
+  src = fetchurl {
+    url = "ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_7R2.zip";
+    sha256 = "1p32hkghi6bkc3cf2dcqyaw5cjj7403mykcp0fy8f5bsnv0pszv7";
+  };
 
-    preConfigure =
-      '' find -name \*.jar -or -name \*.class -exec rm -v {} \;
+  patches = [ ./gcj-type-mismatch.patch ];
 
-         # The build process tries to download it by itself.
-         mkdir -p "build/tmp-xbean"
-         ln -sv "${xbeans}" "build/tmp-xbean/xbean.zip"
-      '';
+  preConfigure =
+    ''
+      find -name \*.jar -or -name \*.class -exec rm -v {} \;
 
-    buildInputs = [ unzip ant javac jvm ];
+      # The build process tries to download it by itself.
+      mkdir -p "build/tmp-xbean"
+      ln -sv "${xbeans}" "build/tmp-xbean/xbean.zip"
+    '';
 
-    buildPhase = "ant ${options} jar";
-    doCheck    = false;
+  buildInputs = [ unzip ant javac jvm ];
 
-    # FIXME: Install javadoc as well.
-    installPhase =
-      '' mkdir -p "$out/lib/java"
-         cp -v *.jar "$out/lib/java"
-      '';
+  buildPhase = "ant ${options} jar";
+  doCheck    = false;
 
-    meta = {
-      description = "Mozilla Rhino: JavaScript for Java";
+  # FIXME: Install javadoc as well.
+  installPhase =
+    ''
+      mkdir -p "$out/share/java"
+      cp -v *.jar "$out/share/java"
+    '';
 
-      longDescription =
-        '' Rhino is an open-source implementation of JavaScript written
-           entirely in Java.  It is typically embedded into Java applications
-           to provide scripting to end users.
-        '';
+  meta = {
+    description = "Mozilla Rhino: JavaScript for Java";
 
-      homepage = http://www.mozilla.org/rhino/;
+    longDescription =
+      '' Rhino is an open-source implementation of JavaScript written
+         entirely in Java.  It is typically embedded into Java applications
+         to provide scripting to end users.
+      '';
 
-      licenses = [ "MPLv1.1" /* or */ "GPLv2+" ];
+    homepage = http://www.mozilla.org/rhino/;
 
-      maintainers = [ ];
-    };
-  }
+    licenses = [ "MPLv1.1" /* or */ "GPLv2+" ];
+  };
+}
diff --git a/pkgs/development/libraries/java/xalanj/default.nix b/pkgs/development/libraries/java/xalanj/default.nix
deleted file mode 100644
index c5ffed50be1b..000000000000
--- a/pkgs/development/libraries/java/xalanj/default.nix
+++ /dev/null
@@ -1,57 +0,0 @@
-{ fetchurl, stdenv, ant, javac, jvm, xerces }:
-
-let
-  version = "2.7.1";
-  options = "-Dbuild.compiler=gcj";   # FIXME: We assume GCJ here.
-in
-  stdenv.mkDerivation {
-    name = "xalan-j-${version}";
-
-    src = fetchurl {
-      url = "mirror://apache/xml/xalan-j/source/xalan-j_2_7_1-src.tar.gz";
-      sha256 = "0hxhx0n0ynflq1d01sma658ipwn3f3902x6n8mfk70mqkdiallps";
-    };
-
-    buildInputs = [ ant javac jvm xerces ];
-
-    configurePhase =
-      '' rm -v lib/xerces*.jar
-         export CLASSPATH="${xerces}/lib/java"
-      '';
-
-    buildPhase = "ant ${options} jar";
-    doCheck    = false;
-
-    # FIXME: Install javadoc as well.
-    installPhase =
-      '' mkdir -p "$out/lib/java"
-         cp -v build/x*.jar "$out/lib/java"
-      '';
-
-    meta = {
-      description = "Apache Xalan-Java, an XSLT processor";
-
-      longDescription =
-        '' Xalan-Java is an XSLT processor for transforming XML documents
-           into HTML, text, or other XML document types.  It implements XSL
-           Transformations (XSLT) Version 1.0 and XML Path Language (XPath)
-           Version 1.0 and can be used from the command line, in an applet or a
-           servlet, or as a module in other program.
-
-           Xalan-Java implements the javax.xml.transform interface in Java
-           API for XML Processing (JAXP) 1.3.  This interface provides a
-           modular framework and a standard API for performing XML
-           transformations, and utilizes system properties to determine which
-           Transformer and which XML parser to use.
-
-           Xalan-Java also implements the javax.xml.xpath interface in JAXP
-           1.3, which provides an object-model neutral API for evaluation of
-           XPath expressions and access to the evaluation environment.
-        '';
-
-      homepage = http://xml.apache.org/xalan-j/;
-      license = "Apache-2.0";
-
-      maintainers = [ ];
-    };
-  }
diff --git a/pkgs/development/libraries/java/xerces/default.nix b/pkgs/development/libraries/java/xerces/default.nix
deleted file mode 100644
index ed46747dbb20..000000000000
--- a/pkgs/development/libraries/java/xerces/default.nix
+++ /dev/null
@@ -1,57 +0,0 @@
-{ fetchurl, stdenv, ant, javac, jvm }:
-
-let
-  version = "2.9.1";
-  tools   = fetchurl {
-    url = "mirror://apache/xerces/j/source/Xerces-J-tools.${version}.tar.gz";
-    sha256 = "1zzbq9ijy0f3v8w2sws9w79bkda34m9i01993md94n8fccnkiwac";
-  };
-  options = "-Dbuild.compiler=gcj";   # FIXME: We assume GCJ here.
-in
-  stdenv.mkDerivation {
-    name = "xerces-j-${version}";
-
-    src = fetchurl {
-      url = "mirror://apache/xerces/j/source/Xerces-J-src.${version}.tar.gz";
-      sha256 = "14h5jp58999f0rg4mkyab015hkgsxa8n6cx53ia0sjialxi01bqk";
-    };
-
-    buildInputs = [ ant javac jvm ];
-
-    configurePhase = "tar xzvf ${tools}";
-    buildPhase     = "ant ${options} jar";
-
-    # The `tests' directory is missing from the tarball.
-    doCheck = false;
-
-    # FIXME: Install javadoc as well.
-    installPhase =
-      '' mkdir -p "$out/lib/java"
-         cp -v build/xerces*.jar "$out/lib/java"
-      '';
-
-    meta = {
-      description = "Apache Xerces, an XML parser for Java";
-
-      longDescription =
-        '' Xerces2 Java is a library for parsing, validating and manipulating
-           XML documents.
-
-           Xerces 2.x introduced the Xerces Native Interface (XNI), a
-           complete framework for building parser components and
-           configurations that is extremely modular and easy to program.  XNI
-           is merely an internal set of interfaces.  There is no need for an
-           XML application programmer to learn XNI if they only intend to
-           interface to the Xerces2 parser using standard interfaces like
-           JAXP, DOM, and SAX.  Xerces developers and application developers
-           that need more power and flexibility than that provided by the
-           standard interfaces should read and understand XNI.
-        '';
-
-      homepage = http://xerces.apache.org/xerces2-j/;
-
-      license = "Apache-2.0";
-
-      maintainers = [ ];
-    };
-  }
diff --git a/pkgs/development/tools/build-managers/apache-ant/ant-contrib.nix b/pkgs/development/tools/build-managers/apache-ant/ant-contrib.nix
deleted file mode 100644
index ca61f43c7385..000000000000
--- a/pkgs/development/tools/build-managers/apache-ant/ant-contrib.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-args: with args;
-
-stdenv.mkDerivation {
-  name = "ant-contrib-1.0b3";
-
-  installPhase = ''
-    mkdir -p $out
-    mv ant-contrib*.jar $out/
-  '';
-
-  phases = "unpackPhase installPhase";
-
-  src = fetchurl {
-    url = mirror://sourceforge/ant-contrib/ant-contrib-1.0b3-bin.tar.bz2;
-    sha256 = "96effcca2581c1ab42a4828c770b48d54852edf9e71cefc9ed2ffd6590571ad1";
-  };
-}
diff --git a/pkgs/development/tools/build-managers/apache-ant/builder.sh b/pkgs/development/tools/build-managers/apache-ant/builder.sh
deleted file mode 100644
index 68aa89d475e8..000000000000
--- a/pkgs/development/tools/build-managers/apache-ant/builder.sh
+++ /dev/null
@@ -1,53 +0,0 @@
-source $stdenv/setup
-
-tar jxf $src || exit 1
-mkdir -p $out
-
-mv apache-ant-*/* $out || exit 1
-
-# add ant-contrib
-cp $antContrib/*.jar $out/lib
-
-# remove crap in the root directory
-
-for file in $out/*
-do
-  if test -f $file ; then
-    rm $file
-  fi
-done
-rm -rf $out/docs
-
-# prevent the use of hacky scripts. This will be handled in Nix.
-rm $out/bin/* || exit 1
-
-# add ant script. This script is to be invoked with all
-# appropiate variables and will try to be clever or user-friendly.
-
-cat >> $out/bin/ant <<EOF
-#! /bin/sh
-
-export JAVA_HOME=$jdk
-export JAVACMD=$jdk/bin/java
-export LANG="en_US"
-
-export ANT_HOME=$out
- 
-if [ -z "\$LOCALCLASSPATH" ] ; then
-    LOCALCLASSPATH=\$ANT_HOME/lib/ant-launcher.jar
-else
-    LOCALCLASSPATH=\$ANT_HOME/lib/ant-launcher.jar:\$LOCALCLASSPATH
-fi
-
-if [ -n "\$JIKESPATH" ]; then
-  exec "\$JAVACMD" \$NIX_ANT_OPTS \$ANT_OPTS -classpath "\$LOCALCLASSPATH" -Dant.home="\${ANT_HOME}" -Djikes.class.path="\$JIKESPATH" org.apache.tools.ant.launch.Launcher \$NIX_ANT_ARGS \$ANT_ARGS -lib "$CLASSPATH" "\$@"
-else
-  exec "\$JAVACMD" \$NIX_ANT_OPTS \$ANT_OPTS -classpath "\$LOCALCLASSPATH" -Dant.home="\${ANT_HOME}" org.apache.tools.ant.launch.Launcher \$NIX_ANT_ARGS \$ANT_ARGS -lib "$CLASSPATH" "\$@"
-  fi
-fi
-EOF
-
-chmod a+x $out/bin/ant
-
-ln -s $out/bin/ant $out/bin/antRun
-
diff --git a/pkgs/development/tools/build-managers/apache-ant/default.nix b/pkgs/development/tools/build-managers/apache-ant/default.nix
index c14e09e25b7f..19c664c2ea7e 100644
--- a/pkgs/development/tools/build-managers/apache-ant/default.nix
+++ b/pkgs/development/tools/build-managers/apache-ant/default.nix
@@ -1,30 +1,110 @@
-{ fetchurl, stdenv, jdk }:
+{ fetchurl, stdenv, makeWrapper }:
 
-let
+let version = "1.9.3"; in
 
-  antContrib = import ./ant-contrib.nix {
-    inherit fetchurl stdenv;
+stdenv.mkDerivation {
+  name = "ant-${version}";
+
+  buildInputs = [ makeWrapper ];
+
+  src = fetchurl {
+    url = "mirror://apache/ant/binaries/apache-ant-${version}-bin.tar.bz2";
+    sha1 = "efcf206e24b0dd1583c501182ad163af277951a4";
   };
 
-  version = "1.8.4";
+  contrib = fetchurl {
+    url = mirror://sourceforge/ant-contrib/ant-contrib-1.0b3-bin.tar.bz2;
+    sha256 = "96effcca2581c1ab42a4828c770b48d54852edf9e71cefc9ed2ffd6590571ad1";
+  };
 
-in
+  installPhase =
+    ''
+      mkdir -p $out/bin $out/lib/ant
+      mv * $out/lib/ant/
 
-stdenv.mkDerivation {
-  name = "ant-${(builtins.parseDrvName jdk.name).name}-${version}";
+      # Get rid of the manual (35 MiB).  Maybe we should put this in a
+      # separate output.  Also get rid of the Ant scripts since we
+      # provide our own.
+      rm -rf $out/lib/ant/{manual,bin,WHATSNEW}
 
-  builder = ./builder.sh;
-  
-  buildInputs = [ antContrib jdk ];
+      # Install ant-contrib.
+      unpackFile $contrib
+      cp -p ant-contrib/ant-contrib-*.jar $out/lib/ant/lib/
 
-  inherit antContrib jdk;
+      cat >> $out/bin/ant <<EOF
+      #! ${stdenv.shell} -e
 
-  src = fetchurl {
-    url = "mirror://apache/ant/binaries/apache-ant-${version}-bin.tar.bz2";
-    sha1 = "d9e3e83dd9664cfe1dcd4841c082db3f559af922";
-  };
+      ANT_HOME=$out/lib/ant
+
+      # Find the JDK by looking for javac.  As a fall-back, find the
+      # JRE by looking for java.  The latter allows just the JRE to be
+      # used with (say) ECJ as the compiler.  Finally, allow the GNU
+      # JVM.
+      if [ -z "\$JAVA_HOME" ]; then
+          for i in javac java gij; do
+              if p="\$(type -p \$i)"; then
+                  export JAVA_HOME="\$(dirname \$(dirname \$(readlink -f \$p)))"
+                  break
+              fi
+          done
+          if [ -z "\$JAVA_HOME" ]; then
+              echo "\$0: cannot find the JDK or JRE" >&2
+              exit 1
+          fi
+      fi
+
+      if [ -z \$NIX_JVM ]; then
+          if [ -e \$JAVA_HOME/bin/java ]; then
+              NIX_JVM=\$JAVA_HOME/bin/java
+          elif [ -e \$JAVA_HOME/bin/gij ]; then
+              NIX_JVM=\$JAVA_HOME/bin/gij
+          else
+              NIX_JVM=java
+          fi
+      fi
+
+      LOCALCLASSPATH="\$ANT_HOME/lib/ant-launcher.jar\''${LOCALCLASSPATH:+:}\$LOCALCLASSPATH"
+
+      if [ -e \$JAVA_HOME/lib/tools.jar ]; then
+          LOCALCLASSPATH="\$JAVA_HOME/lib/tools.jar\''${LOCALCLASSPATH:+:}\$LOCALCLASSPATH"
+      fi
+
+      exec \$NIX_JVM \$NIX_ANT_OPTS \$ANT_OPTS -classpath "\$LOCALCLASSPATH" \
+          -Dant.home=\$ANT_HOME -Dant.library.dir="\$ANT_LIB" \
+          org.apache.tools.ant.launch.Launcher \$NIX_ANT_ARGS \$ANT_ARGS \
+          -cp "\$CLASSPATH" "\$@"
+      EOF
+
+      chmod +x $out/bin/ant
+    ''; # */
 
   meta = {
-    description = "Java-based build tool";
+    homepage = http://ant.apache.org/;
+    description = "A Java-based build tool";
+
+    longDescription = ''
+      Apache Ant is a Java-based build tool.  In theory, it is kind of like
+      Make, but without Make's wrinkles.
+
+      Why another build tool when there is already make, gnumake, nmake, jam,
+      and others? Because all those tools have limitations that Ant's
+      original author couldn't live with when developing software across
+      multiple platforms.  Make-like tools are inherently shell-based -- they
+      evaluate a set of dependencies, then execute commands not unlike what
+      you would issue in a shell.  This means that you can easily extend
+      these tools by using or writing any program for the OS that you are
+      working on.  However, this also means that you limit yourself to the
+      OS, or at least the OS type such as Unix, that you are working on.
+
+      Ant is different.  Instead of a model where it is extended with
+      shell-based commands, Ant is extended using Java classes.  Instead of
+      writing shell commands, the configuration files are XML-based, calling
+      out a target tree where various tasks get executed.  Each task is run
+      by an object that implements a particular Task interface.
+    '';
+
+    license = stdenv.lib.licenses.asl20;
+    maintainers = [ stdenv.lib.maintainers.eelco ];
+    platforms = stdenv.lib.platforms.all;
   };
 }
diff --git a/pkgs/development/tools/build-managers/apache-ant/from-source.nix b/pkgs/development/tools/build-managers/apache-ant/from-source.nix
deleted file mode 100644
index 14213415ff84..000000000000
--- a/pkgs/development/tools/build-managers/apache-ant/from-source.nix
+++ /dev/null
@@ -1,90 +0,0 @@
-{ stdenv, fetchurl, gcj, junit }:
-
-let version = "1.7.1"; in
-
-/* TODO: Once we have Icedtea, use this Nix expression to build Ant with
-   Sun's javac.  */
-
-stdenv.mkDerivation {
-  name = "ant-gcj-${version}";
-
-  src = fetchurl {
-    url = "mirror://apache/ant/source/apache-ant-${version}-src.tar.bz2";
-    sha256 = "19pvqvgkxgpgsqm4lvbki5sm0z84kxmykdqicvfad47gc1r9mi2d";
-  };
-
-  patches = [ ./use-gcj.patch ];
-
-  buildInputs = [ gcj junit ];
-
-  configurePhase = ''
-    mkdir -p "tool-aliases/bin"
-    cd "tool-aliases/bin"
-    cat > javac <<EOF
-#!/bin/sh
-opts="-C"
-echo 'running \`gcj '"\$opts \$@'..."
-exec "$(type -P gcj)" \$opts \$@
-EOF
-    chmod +x javac
-    ln -sv $(type -P gij) java
-    export PATH="$PWD:$PATH"
-
-    cd ../..
-    export JAVA_HOME="$PWD/tool-aliases"
-
-    # Make JUnit visible.
-    export CLASSPATH="$(find ${junit} -name \*.jar -printf "%p:")"
-  '';
-
-  # Note: We don't build the javadoc.
-  buildPhase = ''
-    mkdir -p "$out"
-    ./build.sh -Dant.install="$out" install-lite
-  '';
-
-  installPhase = ''
-    # Actually, everything is already installed at this point, so we just
-    # rearrange a few things.
-    rm -v "$out/bin/"*.bat
-
-    mkdir -p "$out/lib/java"
-    mv -v "$out/lib/"*.jar "$out/lib/java"
-    sed -i "$out/bin/ant" \
-        -e "s|^ANT_LIB=.*$|ANT_LIB=$out/lib/java|g ;
-            s|JAVACMD=java.*$|JAVACMD=${gcj}/lib/jvm/bin/java|g ;
-            /^ant_exec_command/i export ANT_HOME=$out"
-  '';
-
-  meta = {
-    description = "Java-based build tool";
-
-    longDescription = ''
-      Apache Ant is a Java-based build tool.  In theory, it is kind of like
-      Make, but without Make's wrinkles.
-
-      Why another build tool when there is already make, gnumake, nmake, jam,
-      and others? Because all those tools have limitations that Ant's
-      original author couldn't live with when developing software across
-      multiple platforms.  Make-like tools are inherently shell-based -- they
-      evaluate a set of dependencies, then execute commands not unlike what
-      you would issue in a shell.  This means that you can easily extend
-      these tools by using or writing any program for the OS that you are
-      working on.  However, this also means that you limit yourself to the
-      OS, or at least the OS type such as Unix, that you are working on.
-
-      Ant is different.  Instead of a model where it is extended with
-      shell-based commands, Ant is extended using Java classes.  Instead of
-      writing shell commands, the configuration files are XML-based, calling
-      out a target tree where various tasks get executed.  Each task is run
-      by an object that implements a particular Task interface.
-    '';
-
-    homepage = http://ant.apache.org/;
-
-    license = "APLv2";
-
-    maintainers = [ ];
-    platforms = stdenv.lib.platforms.gnu;  # arbitrary choice
-  };
-}
diff --git a/pkgs/development/tools/build-managers/apache-ant/use-gcj.patch b/pkgs/development/tools/build-managers/apache-ant/use-gcj.patch
deleted file mode 100644
index db82d3ba689e..000000000000
--- a/pkgs/development/tools/build-managers/apache-ant/use-gcj.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Setting `java.compiler' or `build.compiler' in `build.properties' isn't enough.
-
---- apache-ant-1.7.1/build.xml	2008-06-27 07:05:23.000000000 +0200
-+++ apache-ant-1.7.1/build.xml	2009-09-24 15:10:53.000000000 +0200
-@@ -578,12 +578,7 @@
-       classname="com.jcraft.jsch.Session"
-       classpathref="classpath"/>
- 
--    <condition property="build.compiler" value="classic">
--      <not>
--        <isset property="jdk1.3+"/>
--      </not>
--    </condition>
--    <property name="build.compiler" value="modern"/>
-+    <property name="build.compiler" value="gcj"/>
- 
-     <!--check for XSD support in the parser-->
-     <condition property="xmlschema.present">
diff --git a/pkgs/development/tools/build-managers/leiningen/builder.sh b/pkgs/development/tools/build-managers/leiningen/builder.sh
index 8d0924028cc8..6a66466506cb 100644
--- a/pkgs/development/tools/build-managers/leiningen/builder.sh
+++ b/pkgs/development/tools/build-managers/leiningen/builder.sh
@@ -1,16 +1,14 @@
 #!/bin/bash
 
-set -e
-
 source $stdenv/setup
 
-mkdir -pv $out/bin $out/lib
+mkdir -pv $out/bin $out/share/java
 
 out_bin=$out/bin/lein
 
 cp -v $src $out_bin
-cp -v $jarsrc $out/lib
-cp -v $clojure/lib/java/* $out/lib
+cp -v $jarsrc $out/share/java
+cp -v $clojure/share/java/* $out/share/java/
 
 for p in $patches;
 do
diff --git a/pkgs/development/tools/build-managers/leiningen/lein_2.3.0.patch b/pkgs/development/tools/build-managers/leiningen/lein_2.3.0.patch
index 23f6b6247764..f7d5bc4d9a7e 100644
--- a/pkgs/development/tools/build-managers/leiningen/lein_2.3.0.patch
+++ b/pkgs/development/tools/build-managers/leiningen/lein_2.3.0.patch
@@ -1,4 +1,4 @@
 46c47
 < LEIN_JAR=/usr/share/java/leiningen-$LEIN_VERSION-standalone.jar
 ---
-> LEIN_JAR=$(find $(dirname $0)/../lib -name *-standalone.jar | head -n 1)
+> LEIN_JAR=$(find $(dirname $0)/../share/java -name *-standalone.jar | head -n 1)
diff --git a/pkgs/development/tools/parsing/jikespg/builder.sh b/pkgs/development/tools/parsing/jikespg/builder.sh
deleted file mode 100644
index e63ec9808f23..000000000000
--- a/pkgs/development/tools/parsing/jikespg/builder.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-source $stdenv/setup
-
-set -e
-
-configurePhase() {
-  tar zxvf $src 
-  cd jikespg/src
-}
-
-installPhase() {
-  mkdir -p $out/bin
-  cp jikespg $out/bin
-}
-
-genericBuild
diff --git a/pkgs/development/tools/parsing/jikespg/default.nix b/pkgs/development/tools/parsing/jikespg/default.nix
index 290e9a3a0033..ea66204d9cd5 100644
--- a/pkgs/development/tools/parsing/jikespg/default.nix
+++ b/pkgs/development/tools/parsing/jikespg/default.nix
@@ -2,9 +2,22 @@
 
 stdenv.mkDerivation {
   name = "jikespg-1.3";
-  builder = ./builder.sh;
+
   src = fetchurl {
     url = mirror://sourceforge/jikes/jikespg-1.3.tar.gz;
     md5 = "eba183713d9ae61a887211be80eeb21f";
   };
+
+  sourceRoot = "jikespg/src";
+
+  installPhase =
+    ''
+      mkdir -p $out/bin
+      cp jikespg $out/bin
+    '';
+
+  meta = {
+    homepage = http://jikes.sourceforge.net/;
+    description = "The Jikes Parser Generator";
+  };
 }