2005-09-26 16:10:04 +02:00
|
|
|
source $stdenv/setup
|
|
|
|
source $makeWrapper
|
2004-10-13 16:21:20 +02:00
|
|
|
|
2005-09-26 16:10:04 +02:00
|
|
|
unpackFile $src
|
|
|
|
ensureDir $out
|
2004-10-13 16:21:20 +02:00
|
|
|
mv eclipse $out/
|
2005-09-26 16:10:04 +02:00
|
|
|
|
2005-10-08 17:32:56 +02:00
|
|
|
# Unpack the jars that contain .so files.
|
|
|
|
#echo "unpacking some jars..."
|
|
|
|
#for i in $(find $out -name "*.linux*.jar"); do
|
|
|
|
# echo $i
|
|
|
|
# cd $(dirname $i) && $jdk/bin/jar -x < $i
|
|
|
|
# rm $i
|
|
|
|
#done
|
|
|
|
|
|
|
|
# Set the dynamic linker and RPATH.
|
|
|
|
rpath=
|
|
|
|
for i in $libraries; do
|
|
|
|
rpath=$rpath${rpath:+:}$i/lib
|
|
|
|
done
|
|
|
|
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
|
|
|
|
find $out \( -type f -a -perm +0100 \) \
|
|
|
|
-print \
|
|
|
|
-exec patchelf --interpreter $glibc/lib/ld-linux.so.* \
|
|
|
|
--set-rpath "$rpath" {} \;
|
|
|
|
#find $out \( -type f -a -name "*.so*" \) \
|
|
|
|
# -print \
|
|
|
|
# -exec patchelf --set-rpath "$rpath" {} \;
|
|
|
|
|
|
|
|
# Make a wrapper script so that the proper JDK is found.
|
|
|
|
makeWrapper $out/eclipse/eclipse $out/bin/eclipse \
|
|
|
|
--prefix PATH ":" "$jdk/bin" \
|
|
|
|
--prefix LD_LIBRARY_PATH ":" "$rpath"
|