From a4b39fac652c6d829ea39c10f72b43f2074b1609 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Fri, 24 Aug 2012 08:30:48 -0400 Subject: [PATCH] openjdk-bootstrap: nukerefs the whole thing and put it in a tarball --- .../compilers/openjdk/make-bootstrap.nix | 35 +++++++++++-------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/pkgs/development/compilers/openjdk/make-bootstrap.nix b/pkgs/development/compilers/openjdk/make-bootstrap.nix index 539e1bd23502..ca6533b72acc 100644 --- a/pkgs/development/compilers/openjdk/make-bootstrap.nix +++ b/pkgs/development/compilers/openjdk/make-bootstrap.nix @@ -1,19 +1,24 @@ -{ runCommand, openjdk }: +{ runCommand, openjdk, nukeReferences }: let arch = if openjdk.system == "x86_64-linux" then "amd64" else "i386"; in -runCommand "${openjdk.name}-bootstrap" {} '' - mkdir -p $out/bin - mkdir -p $out/lib - mkdir -p $out/jre/lib/{security,ext,${arch}/{jli,server,headless}} - cp ${openjdk}/bin/{idlj,ja{va{,c,p,h},r},rmic} $out/bin - cp ${openjdk}/lib/tools.jar $out/lib - cp ${openjdk}/jre/lib/{meta-index,{charsets,jce,jsse,rt,resources}.jar,currency.data} $out/jre/lib - cp ${openjdk}/jre/lib/security/java.security $out/jre/lib/security - cp ${openjdk}/jre/lib/ext/{meta-index,sunjce_provider.jar} $out/jre/lib/ext - cp ${openjdk}/jre/lib/${arch}/{jvm.cfg,lib{awt,java,verify,zip,nio,net}.so} $out/jre/lib/${arch} - cp ${openjdk}/jre/lib/${arch}/jli/libjli.so $out/jre/lib/${arch}/jli - cp ${openjdk}/jre/lib/${arch}/server/libjvm.so $out/jre/lib/${arch}/server - cp ${openjdk}/jre/lib/${arch}/headless/libmawt.so $out/jre/lib/${arch}/headless - cp -a ${openjdk}/include $out +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}} + 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 + cp ${openjdk}/jre/lib/security/java.security openjdk-bootstrap/jre/lib/security + cp ${openjdk}/jre/lib/ext/{meta-index,sunjce_provider.jar} openjdk-bootstrap/jre/lib/ext + 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}/headless/libmawt.so openjdk-bootstrap/jre/lib/${arch}/headless + cp -a ${openjdk}/include openjdk-bootstrap + + chmod -R +w openjdk-bootstrap + find openjdk-bootstrap -print0 | xargs -0 ${nukeReferences}/bin/nuke-refs + + tar cv openjdk-bootstrap | xz > $out ''