2009-10-19 16:47:04 +02:00
|
|
|
{ fetchurl, stdenv, unzip, ant, javac, jvm }:
|
|
|
|
|
|
|
|
let
|
|
|
|
version = "1.7R2";
|
|
|
|
options = "-Dbuild.compiler=gcj"; # FIXME: We assume GCJ here.
|
|
|
|
|
|
|
|
xbeans = fetchurl {
|
2012-08-25 19:40:15 +02:00
|
|
|
url = "http://archive.apache.org/dist/xmlbeans/binaries/xmlbeans-2.2.0.zip";
|
2009-10-19 16:47:04 +02:00
|
|
|
sha256 = "1pb08d9j81d0wz5wj31idz198iwhqb7mch872n08jh1354rjlqwk";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "rhino-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_7R2.zip";
|
|
|
|
sha256 = "1p32hkghi6bkc3cf2dcqyaw5cjj7403mykcp0fy8f5bsnv0pszv7";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./gcj-type-mismatch.patch ];
|
|
|
|
|
|
|
|
preConfigure =
|
|
|
|
'' find -name \*.jar -or -name \*.class -exec rm -v {} \;
|
|
|
|
|
|
|
|
# The build process tries to download it by itself.
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p "build/tmp-xbean"
|
2009-10-19 16:47:04 +02:00
|
|
|
ln -sv "${xbeans}" "build/tmp-xbean/xbean.zip"
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ unzip ant javac jvm ];
|
|
|
|
|
|
|
|
buildPhase = "ant ${options} jar";
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
# FIXME: Install javadoc as well.
|
|
|
|
installPhase =
|
2012-01-18 21:16:00 +01:00
|
|
|
'' mkdir -p "$out/lib/java"
|
2009-10-19 16:47:04 +02:00
|
|
|
cp -v *.jar "$out/lib/java"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Mozilla Rhino: JavaScript for 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.
|
|
|
|
'';
|
|
|
|
|
|
|
|
homepage = http://www.mozilla.org/rhino/;
|
|
|
|
|
|
|
|
licenses = [ "MPLv1.1" /* or */ "GPLv2+" ];
|
|
|
|
|
2013-08-16 23:44:33 +02:00
|
|
|
maintainers = [ ];
|
2009-10-19 16:47:04 +02:00
|
|
|
};
|
|
|
|
}
|