···2021 # Helper for the common case where we have separate feature and
22 # plugin JARs.
23- buildEclipsePlugin = { name, srcFeature, srcPlugin, ... } @ attrs:
24- buildEclipsePluginBase (attrs // {
25- srcs = [ srcFeature srcPlugin ];
02627- buildCommand = ''
28- dropinDir="$out/eclipse/dropins/${name}"
2930- mkdir -p $dropinDir/features
31- unzip ${srcFeature} -d $dropinDir/features/
3233- mkdir -p $dropinDir/plugins
34- cp -v ${srcPlugin} $dropinDir/plugins/${name}.jar
35- '';
36- });
00000000000003738 # Helper for the case where the build directory has the layout of an
39 # Eclipse update site, that is, it contains the directories
···2021 # Helper for the common case where we have separate feature and
22 # plugin JARs.
23+ buildEclipsePlugin =
24+ { name, srcFeature, srcPlugin ? null, srcPlugins ? [], ... } @ attrs:
25+ assert srcPlugin == null -> srcPlugins != [];
26+ assert srcPlugin != null -> srcPlugins == [];
2728+ let
02930+ pSrcs = if (srcPlugin != null) then [ srcPlugin ] else srcPlugins;
03132+ in
33+34+ buildEclipsePluginBase (attrs // {
35+ srcs = [ srcFeature ] ++ pSrcs;
36+37+ buildCommand = ''
38+ dropinDir="$out/eclipse/dropins/${name}"
39+40+ mkdir -p $dropinDir/features
41+ unzip ${srcFeature} -d $dropinDir/features/
42+43+ mkdir -p $dropinDir/plugins
44+ for plugin in ${toString pSrcs}; do
45+ cp -v $plugin $dropinDir/plugins/$(stripHash $plugin)
46+ done
47+ '';
48+ });
4950 # Helper for the case where the build directory has the layout of an
51 # Eclipse update site, that is, it contains the directories