forked from mirrors/nixpkgs
* Purify the JRE.
svn path=/nixpkgs/trunk/; revision=7936
This commit is contained in:
parent
f69d866898
commit
e17d20b6d2
|
@ -1,19 +1,11 @@
|
|||
#! /bin/sh
|
||||
source $stdenv/setup
|
||||
|
||||
source $stdenv/setup || exit 1
|
||||
unzip $src || true
|
||||
|
||||
cp $src $version.bin || exit 1
|
||||
chmod u+x $version.bin || exit 1
|
||||
|
||||
alias more=cat
|
||||
|
||||
echo "Unpacking J2RE"
|
||||
yes yes | ./$version.bin || exit 1
|
||||
|
||||
mkdir $out || exit 1
|
||||
ensureDir $out
|
||||
|
||||
echo "Moving sources to the right location"
|
||||
mv $version/* $out/ || exit 1
|
||||
mv $version/* $out/
|
||||
|
||||
echo "Removing files at top level"
|
||||
for file in $out/*
|
||||
|
@ -23,3 +15,19 @@ do
|
|||
fi
|
||||
done
|
||||
rm -rf $out/docs
|
||||
|
||||
# Set the dynamic linker.
|
||||
rpath=
|
||||
for i in $libraries; do
|
||||
rpath=$rpath${rpath:+:}$i/lib
|
||||
done
|
||||
find $out -type f -perm +100 \
|
||||
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "$rpath" {} \;
|
||||
|
||||
# Unpack .pack files.
|
||||
for i in $(find $out -name "*.pack"); do
|
||||
echo "unpacking $i..."
|
||||
$out/bin/unpack200 "$i" "$(dirname $i)/$(basename $i .pack).jar"
|
||||
rm "$i"
|
||||
done
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{stdenv, fetchurl}:
|
||||
{stdenv, fetchurl, unzip}:
|
||||
|
||||
if stdenv.system == "i686-linux"
|
||||
then
|
||||
(import ./jre-sun-linux.nix) {
|
||||
inherit stdenv fetchurl;
|
||||
inherit stdenv fetchurl unzip;
|
||||
}
|
||||
else
|
||||
false
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{stdenv, fetchurl}:
|
||||
{stdenv, fetchurl, unzip}:
|
||||
|
||||
assert stdenv.system == "i686-linux";
|
||||
|
||||
|
@ -10,6 +10,7 @@ assert stdenv.system == "i686-linux";
|
|||
url = http://jdl.sun.com/webapps/download/AutoDL?BundleId=10542;
|
||||
md5 = "e2ad1c9e47f3e34d1efae059b9e2a2d9";
|
||||
};
|
||||
buildInputs = [unzip];
|
||||
})
|
||||
|
||||
// {mozillaPlugin = "/plugin/i386/ns7";}
|
||||
|
|
|
@ -865,7 +865,7 @@ rec {
|
|||
};
|
||||
|
||||
jre = import ../development/interpreters/jre {
|
||||
inherit fetchurl stdenv;
|
||||
inherit fetchurl stdenv unzip;
|
||||
};
|
||||
|
||||
kaffe = import ../development/interpreters/kaffe {
|
||||
|
|
Loading…
Reference in a new issue