1{ fetchurl, stdenv, javac, jvm, antlr, pkgconfig, gtk2, gconf, ecj }:
2
3stdenv.mkDerivation rec {
4 name = "classpath-0.99";
5
6 src = fetchurl {
7 url = "mirror://gnu/classpath/${name}.tar.gz";
8 sha256 = "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr";
9 };
10
11 patches = [ ./missing-casts.patch ];
12
13 nativeBuildInputs = [ pkgconfig ];
14 buildInputs = [ javac jvm antlr gtk2 gconf ecj ];
15
16 configurePhase = ''
17 # GCJ tries to compile all of Classpath during the `configure' run when
18 # trying to build in the source tree (see
19 # http://www.mail-archive.com/classpath@gnu.org/msg15079.html), thus we
20 # build out-of-tree.
21 mkdir ../build
22 cd ../build
23 echo "building in \`$PWD'"
24
25 ../${name}/configure --prefix="$out" \
26 --enable-fast-install --disable-dependency-tracking \
27 ${configureFlags}
28 '';
29
30 /* Plug-in support requires Xulrunner and all that. Maybe someday,
31 optionally.
32
33 Compilation with `-Werror' is disabled because of this:
34
35 native/jni/native-lib/cpnet.c: In function 'cpnet_addMembership':
36 native/jni/native-lib/cpnet.c:583: error: dereferencing type-punned pointer will break strict-aliasing rules
37 native/jni/native-lib/cpnet.c: In function 'cpnet_dropMembership':
38 native/jni/native-lib/cpnet.c:598: error: dereferencing type-punned pointer will break strict-aliasing rules
39
40 */
41
42 configureFlags = "--disable-Werror --disable-plugin --with-antlr-jar=${antlr}/lib/antlr.jar";
43
44 meta = {
45 description = "Essential libraries for Java";
46
47 longDescription = ''
48 GNU Classpath, Essential Libraries for Java, is a GNU project to create
49 free core class libraries for use with virtual machines and compilers
50 for the Java programming language.
51 '';
52
53 homepage = http://www.gnu.org/software/classpath/;
54
55 # The exception makes it similar to LGPLv2+ AFAICS.
56 license = stdenv.lib.licenses.gpl2ClasspathPlus;
57
58 maintainers = [ ];
59 platforms = stdenv.lib.platforms.linux;
60 };
61}