at 15.09-beta 1.1 kB view raw
1{ runCommand, openjdk, nukeReferences }: 2 3runCommand "${openjdk.name}-bootstrap.tar.xz" {} '' 4 mkdir -pv openjdk-bootstrap/lib 5 6 # Do a deep copy of the openjdk 7 cp -vrL ${openjdk.home} openjdk-bootstrap/lib 8 9 # Includes are needed for building the native jvm 10 cp -vrL ${openjdk}/include openjdk-bootstrap 11 12 # The binaries are actually stored in the openjdk lib 13 ln -sv lib/openjdk/bin openjdk-bootstrap/bin 14 find . -name libjli.so 15 (cd openjdk-bootstrap/lib; find . -name libjli.so -exec ln -sfv {} libjli.so \;) 16 17 chmod -R +w openjdk-bootstrap 18 19 # Remove components we don't need 20 find openjdk-bootstrap -name \*.diz -exec rm {} \; 21 find openjdk-bootstrap -name \*.ttf -exec rm {} \; 22 find openjdk-bootstrap -name \*.gif -exec rm {} \; 23 find openjdk-bootstrap -name src.zip -exec rm {} \; 24 rm -rf openjdk-bootstrap/lib/openjdk/jre/bin 25 26 # Remove all of the references to the native nix store 27 find openjdk-bootstrap -print0 | xargs -0 ${nukeReferences}/bin/nuke-refs 28 29 # Create the output tarball 30 tar cv openjdk-bootstrap | xz > $out 31''