nixpkgs/pkgs/development/libraries/java/rhino/default.nix
Bjørn Forsman c9baba9212 Fix many package descriptions
(My OCD kicked in today...)

Remove repeated package names, capitalize first word, remove trailing
periods and move overlong descriptions to longDescription.

I also simplified some descriptions as well, when they were particularly
long or technical, often based on Arch Linux' package descriptions.

I've tried to stay away from generated expressions (and I think I
succeeded).

Some specifics worth mentioning:
 * cron, has "Vixie Cron" in its description. The "Vixie" part is not
   mentioned anywhere else. I kept it in a parenthesis at the end of the
   description.

 * ctags description started with "Exuberant Ctags ...", and the
   "exuberant" part is not mentioned elsewhere. Kept it in a parenthesis
   at the end of description.

 * nix has the description "The Nix Deployment System". Since that
   doesn't really say much what it is/does (especially after removing
   the package name!), I changed that to "Powerful package manager that
   makes package management reliable and reproducible" (borrowed from
   nixos.org).

 * Tons of "GNU Foo, Foo is a [the important bits]" descriptions
   is changed to just [the important bits]. If the package name doesn't
   contain GNU I don't think it's needed to say it in the description
   either.
2014-08-24 22:31:37 +02:00

58 lines
1.4 KiB
Nix

{ fetchurl, stdenv, unzip, ant, javac, jvm }:
let
version = "1.7R2";
options = "-Dbuild.compiler=gcj"; # FIXME: We assume GCJ here.
xbeans = fetchurl {
url = "http://archive.apache.org/dist/xmlbeans/binaries/xmlbeans-2.2.0.zip";
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.
mkdir -p "build/tmp-xbean"
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 =
''
mkdir -p "$out/share/java"
cp -v *.jar "$out/share/java"
'';
meta = {
description = "An implementation of JavaScript written in 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/;
license = [ "MPLv1.1" /* or */ "GPLv2+" ];
};
}