eclipse/plugins: support multiple plugins JARs
This commit is contained in:
parent
0cca54688f
commit
3a70f21738
@ -20,20 +20,32 @@ rec {
|
|||||||
|
|
||||||
# Helper for the common case where we have separate feature and
|
# Helper for the common case where we have separate feature and
|
||||||
# plugin JARs.
|
# plugin JARs.
|
||||||
buildEclipsePlugin = { name, srcFeature, srcPlugin, ... } @ attrs:
|
buildEclipsePlugin =
|
||||||
buildEclipsePluginBase (attrs // {
|
{ name, srcFeature, srcPlugin ? null, srcPlugins ? [], ... } @ attrs:
|
||||||
srcs = [ srcFeature srcPlugin ];
|
assert srcPlugin == null -> srcPlugins != [];
|
||||||
|
assert srcPlugin != null -> srcPlugins == [];
|
||||||
|
|
||||||
buildCommand = ''
|
let
|
||||||
dropinDir="$out/eclipse/dropins/${name}"
|
|
||||||
|
|
||||||
mkdir -p $dropinDir/features
|
pSrcs = if (srcPlugin != null) then [ srcPlugin ] else srcPlugins;
|
||||||
unzip ${srcFeature} -d $dropinDir/features/
|
|
||||||
|
|
||||||
mkdir -p $dropinDir/plugins
|
in
|
||||||
cp -v ${srcPlugin} $dropinDir/plugins/${name}.jar
|
|
||||||
'';
|
buildEclipsePluginBase (attrs // {
|
||||||
});
|
srcs = [ srcFeature ] ++ pSrcs;
|
||||||
|
|
||||||
|
buildCommand = ''
|
||||||
|
dropinDir="$out/eclipse/dropins/${name}"
|
||||||
|
|
||||||
|
mkdir -p $dropinDir/features
|
||||||
|
unzip ${srcFeature} -d $dropinDir/features/
|
||||||
|
|
||||||
|
mkdir -p $dropinDir/plugins
|
||||||
|
for plugin in ${toString pSrcs}; do
|
||||||
|
cp -v $plugin $dropinDir/plugins/$(stripHash $plugin)
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
|
||||||
# Helper for the case where the build directory has the layout of an
|
# Helper for the case where the build directory has the layout of an
|
||||||
# Eclipse update site, that is, it contains the directories
|
# Eclipse update site, that is, it contains the directories
|
||||||
|
Loading…
x
Reference in New Issue
Block a user