mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
Added support for Eclipse plugins with custom installers.
svn path=/nixpkgs/trunk/; revision=4907
This commit is contained in:
parent
3b1c205843
commit
06b5fa3519
4 changed files with 44 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
10
pkgs/applications/editors/eclipse/plugins/installers/zip.nix
Normal file
10
pkgs/applications/editors/eclipse/plugins/installers/zip.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{stdenv, unzip, plugin}:
|
||||
|
||||
let {
|
||||
body =
|
||||
stdenv.mkDerivation {
|
||||
name = "eclipse-zip-plugin-installer";
|
||||
builder = ./builder.sh;
|
||||
inherit plugin unzip;
|
||||
};
|
||||
}
|
|
@ -2111,7 +2111,7 @@ rec {
|
|||
inherit plugins;
|
||||
};
|
||||
|
||||
spoofax = (import ../applications/editors/eclipse/plugins/spoofax) {
|
||||
spoofax = (import ../applications/editors/eclipse/plugins/sp) {
|
||||
inherit fetchurl stdenv;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue