diff options
author | Martin Bravenboer <martin.bravenboer@logicblox.com> | 2006-02-25 00:44:02 +0000 |
---|---|---|
committer | Martin Bravenboer <martin.bravenboer@logicblox.com> | 2006-02-25 00:44:02 +0000 |
commit | 06b5fa35193ff6ea7bf4d60a13eeac3052de742c (patch) | |
tree | 171616f03a5dd76bbf8a17acc6adaa2e7205acbd /pkgs/applications/editors | |
parent | 3b1c2058432fcf691e49e202f6a2a2cee90c94df (diff) | |
download | nixlib-06b5fa35193ff6ea7bf4d60a13eeac3052de742c.tar nixlib-06b5fa35193ff6ea7bf4d60a13eeac3052de742c.tar.gz nixlib-06b5fa35193ff6ea7bf4d60a13eeac3052de742c.tar.bz2 nixlib-06b5fa35193ff6ea7bf4d60a13eeac3052de742c.tar.lz nixlib-06b5fa35193ff6ea7bf4d60a13eeac3052de742c.tar.xz nixlib-06b5fa35193ff6ea7bf4d60a13eeac3052de742c.tar.zst nixlib-06b5fa35193ff6ea7bf4d60a13eeac3052de742c.zip |
Added support for Eclipse plugins with custom installers.
svn path=/nixpkgs/trunk/; revision=4907
Diffstat (limited to 'pkgs/applications/editors')
3 files changed, 43 insertions, 3 deletions
diff --git a/pkgs/applications/editors/eclipse/builder.sh b/pkgs/applications/editors/eclipse/builder.sh index a40692a55997..eb32410b352a 100755 --- a/pkgs/applications/editors/eclipse/builder.sh +++ b/pkgs/applications/editors/eclipse/builder.sh @@ -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 \ No newline at end of file +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 diff --git a/pkgs/applications/editors/eclipse/plugins/installers/builder.sh b/pkgs/applications/editors/eclipse/plugins/installers/builder.sh new file mode 100644 index 000000000000..8c00f1e2270c --- /dev/null +++ b/pkgs/applications/editors/eclipse/plugins/installers/builder.sh @@ -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 diff --git a/pkgs/applications/editors/eclipse/plugins/installers/zip.nix b/pkgs/applications/editors/eclipse/plugins/installers/zip.nix new file mode 100644 index 000000000000..e8ccb12b1a31 --- /dev/null +++ b/pkgs/applications/editors/eclipse/plugins/installers/zip.nix @@ -0,0 +1,10 @@ +{stdenv, unzip, plugin}: + +let { + body = + stdenv.mkDerivation { + name = "eclipse-zip-plugin-installer"; + builder = ./builder.sh; + inherit plugin unzip; + }; +} \ No newline at end of file |