2007-03-05 18:13:53 +01:00
|
|
|
{ swingSupport ? true
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, unzip
|
2007-03-05 18:55:17 +01:00
|
|
|
, xlibs ? null
|
2007-03-05 18:13:53 +01:00
|
|
|
, installjdk ? true
|
|
|
|
}:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @todo Support x86_64-linux.
|
|
|
|
*/
|
|
|
|
assert stdenv.system == "i686-linux";
|
2007-03-05 18:55:17 +01:00
|
|
|
assert swingSupport -> xlibs != null;
|
2007-03-05 18:13:53 +01:00
|
|
|
|
|
|
|
(stdenv.mkDerivation {
|
|
|
|
name =
|
|
|
|
if installjdk then "jdk-1.6.0" else "jre-1.6.0";
|
|
|
|
|
|
|
|
src =
|
|
|
|
fetchurl {
|
|
|
|
url = http://download.java.net/dlj/binaries/jdk-6-dlj-linux-i586.bin;
|
|
|
|
sha256 = "0rw48124fdc5rhafj6qzrysb4w823jbn3awxgn07kcy1nvnrhkqw";
|
|
|
|
};
|
|
|
|
|
|
|
|
builder = ./dlj-bundle-builder.sh;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* If jdk5 is added, make sure to use the original construct script.
|
|
|
|
* This copy removes references to kinit, klist, ktab, which seem to be
|
|
|
|
* gone in jdk.
|
|
|
|
*/
|
|
|
|
construct = ./jdk6-construct.sh;
|
|
|
|
inherit installjdk;
|
|
|
|
|
|
|
|
buildInputs = [unzip];
|
|
|
|
libraries =
|
2007-03-05 18:55:17 +01:00
|
|
|
(if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi] else []);
|
2007-03-05 18:13:53 +01:00
|
|
|
} // {
|
|
|
|
inherit swingSupport;
|
|
|
|
} // {
|
|
|
|
mozillaPlugin =
|
|
|
|
if installjdk then "jre/plugin/i386/ns7" else "/plugin/i386/ns7";
|
|
|
|
}
|
|
|
|
)
|