openjdk: Build from bootstrap
This commit is contained in:
parent
a4b39fac65
commit
228c35f0b2
21
pkgs/development/compilers/openjdk/bootstrap.nix
Normal file
21
pkgs/development/compilers/openjdk/bootstrap.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{ runCommand, glibc, fetchurl }:
|
||||
|
||||
let
|
||||
# !!! These should be on nixos.org
|
||||
src = if glibc.system == "x86_64-linux" then
|
||||
fetchurl {
|
||||
url = ftp://linode.shealevy.com/openjdk-bootstrap-x86_64-linux-2012-08-24.tar.xz;
|
||||
sha256 = "0gla9dxrfq2w1hvgsnn8jg8a60k27im6z43a6iidi0qmwa0wah32";
|
||||
}
|
||||
else if glibc.system == "i686-linux" then
|
||||
fetchurl {
|
||||
url = ftp://linode.shealevy.com/openjdk-bootstrap-i686-linux-2012-08-24.tar.xz;
|
||||
sha256 = "184wq212bycwbbq4ix8cc6jwjxkrqw9b01zb86q95kqpa8zy5206";
|
||||
}
|
||||
else throw "No bootstrap for system";
|
||||
in
|
||||
|
||||
runCommand "openjdk-bootstrap" {} ''
|
||||
xz -dc ${src} | sed "s/e*-glibc-[^/]*/$(basename ${glibc})/g" | tar xv
|
||||
mv openjdk-bootstrap $out
|
||||
''
|
@ -107,6 +107,7 @@ stdenv.mkDerivation rec {
|
||||
"UNIXCOMMAND_PATH="
|
||||
"BOOTDIR=${jdk}"
|
||||
"DROPS_DIR=$(DROPS_PATH)"
|
||||
"SKIP_BOOT_CYCLE=false"
|
||||
];
|
||||
|
||||
configurePhase = ''
|
||||
|
@ -5,7 +5,7 @@ let arch = if openjdk.system == "x86_64-linux" then "amd64" else "i386"; in
|
||||
runCommand "${openjdk.name}-bootstrap.tar.xz" {} ''
|
||||
mkdir -p openjdk-bootstrap/bin
|
||||
mkdir -p openjdk-bootstrap/lib
|
||||
mkdir -p openjdk-bootstrap/jre/lib/{security,ext,${arch}/{jli,server,headless}}
|
||||
mkdir -p openjdk-bootstrap/jre/lib/{security,ext,${arch}/{jli,server,client,headless}}
|
||||
cp ${openjdk}/bin/{idlj,ja{va{,c,p,h},r},rmic} openjdk-bootstrap/bin
|
||||
cp ${openjdk}/lib/tools.jar openjdk-bootstrap/lib
|
||||
cp ${openjdk}/jre/lib/{meta-index,{charsets,jce,jsse,rt,resources}.jar,currency.data} openjdk-bootstrap/jre/lib
|
||||
@ -14,6 +14,8 @@ runCommand "${openjdk.name}-bootstrap.tar.xz" {} ''
|
||||
cp ${openjdk}/jre/lib/${arch}/{jvm.cfg,lib{awt,java,verify,zip,nio,net}.so} openjdk-bootstrap/jre/lib/${arch}
|
||||
cp ${openjdk}/jre/lib/${arch}/jli/libjli.so openjdk-bootstrap/jre/lib/${arch}/jli
|
||||
cp ${openjdk}/jre/lib/${arch}/server/libjvm.so openjdk-bootstrap/jre/lib/${arch}/server
|
||||
cp ${openjdk}/jre/lib/${arch}/client/libjvm.so openjdk-bootstrap/jre/lib/${arch}/client ||
|
||||
rmdir openjdk-bootstrap/jre/lib/${arch}/client
|
||||
cp ${openjdk}/jre/lib/${arch}/headless/libmawt.so openjdk-bootstrap/jre/lib/${arch}/headless
|
||||
cp -a ${openjdk}/include openjdk-bootstrap
|
||||
|
||||
|
@ -2342,11 +2342,16 @@ let
|
||||
|
||||
path64 = callPackage ../development/compilers/path64 { };
|
||||
|
||||
openjdkBootstrap = callPackage ../development/compilers/openjdk/bootstrap.nix {};
|
||||
|
||||
openjdk =
|
||||
if stdenv.isDarwin then
|
||||
callPackage ../development/compilers/openjdk-darwin { }
|
||||
else
|
||||
callPackage ../development/compilers/openjdk { };
|
||||
callPackage ../development/compilers/openjdk {
|
||||
jdk = pkgs.openjdkBootstrap;
|
||||
ant = pkgs.ant.override { jdk = pkgs.openjdkBootstrap; };
|
||||
};
|
||||
|
||||
openjre = callPackage ../development/compilers/openjdk {
|
||||
jreOnly = true;
|
||||
|
Loading…
Reference in New Issue
Block a user