2005-09-26 15:10:04 +01:00
|
|
|
source $stdenv/setup
|
2004-10-13 15:21:20 +01:00
|
|
|
|
2005-09-26 15:10:04 +01:00
|
|
|
unpackFile $src
|
|
|
|
ensureDir $out
|
2004-10-13 15:21:20 +01:00
|
|
|
mv eclipse $out/
|
2005-09-26 15:10:04 +01:00
|
|
|
|
2005-10-08 16:32:56 +01:00
|
|
|
# Set the dynamic linker and RPATH.
|
|
|
|
rpath=
|
|
|
|
for i in $libraries; do
|
|
|
|
rpath=$rpath${rpath:+:}$i/lib
|
|
|
|
done
|
|
|
|
find $out \( -type f -a -perm +0100 \) \
|
|
|
|
-print \
|
2006-10-27 13:43:32 +01:00
|
|
|
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
2005-10-08 16:32:56 +01:00
|
|
|
--set-rpath "$rpath" {} \;
|
|
|
|
|
|
|
|
# Make a wrapper script so that the proper JDK is found.
|
2009-03-30 11:32:53 +01:00
|
|
|
# don't use makeWrapper in order to change the last line.
|
|
|
|
|
|
|
|
ensureDir $out/bin
|
|
|
|
cat >> $out/bin/eclipse << EOF
|
|
|
|
#! /bin/sh -e
|
|
|
|
export PATH=${jdk}/bin\${PATH:+:}\$PATH
|
|
|
|
export LD_LIBRARY_PATH=$rpath\${LD_LIBRARY_PATH:+:}\$LD_LIBRARY_PATH
|
|
|
|
exec \$(dirname $0)/../eclipse/eclipse $@
|
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/eclipse
|
2005-11-07 23:02:17 +00:00
|
|
|
|
2006-02-25 00:44:02 +00:00
|
|
|
ensureDir plugin-working-dir
|
|
|
|
workingdir="$(pwd)/plugin-working-dir"
|
|
|
|
for plugin in $plugins; do
|
|
|
|
if test -e $plugin/install; then
|
|
|
|
cd $workingdir
|
|
|
|
$plugin/install "$out/eclipse"
|
|
|
|
rm -rf $workingdir/*
|
|
|
|
else
|
|
|
|
# assume that it is a file
|
|
|
|
cp $plugin $out/eclipse/plugins
|
2006-02-25 01:24:21 +00:00
|
|
|
fi
|
2006-02-25 00:44:02 +00:00
|
|
|
done
|