Added support for Eclipse plugins with custom installers.

svn path=/nixpkgs/trunk/; revision=4907
This commit is contained in:
Martin Bravenboer 2006-02-25 00:44:02 +00:00
parent 3b1c205843
commit 06b5fa3519
4 changed files with 44 additions and 4 deletions

View File

@ -32,6 +32,15 @@ makeWrapper $out/eclipse/eclipse $out/bin/eclipse \
--prefix PATH ":" "$jdk/bin" \
--prefix LD_LIBRARY_PATH ":" "$rpath"
for i in $plugins; do
cp $i $out/eclipse/plugins
done
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
end
done

View File

@ -0,0 +1,21 @@
source $stdenv/setup
ensureDir $out
cat >> $out/install <<EOF
#! /bin/sh
PLUGIN=$plugin
UNZIP=$unzip/bin/unzip
ECLIPSE=\$1
\$UNZIP \$PLUGIN
if test -e plugins; then
cp -prd * \$ECLIPSE
else
cd *
cp -prd * \$ECLIPSE
fi
EOF
chmod u+x $out/install

View File

@ -0,0 +1,10 @@
{stdenv, unzip, plugin}:
let {
body =
stdenv.mkDerivation {
name = "eclipse-zip-plugin-installer";
builder = ./builder.sh;
inherit plugin unzip;
};
}

View File

@ -2111,7 +2111,7 @@ rec {
inherit plugins;
};
spoofax = (import ../applications/editors/eclipse/plugins/spoofax) {
spoofax = (import ../applications/editors/eclipse/plugins/sp) {
inherit fetchurl stdenv;
};