nil plugin does not run any language-specific packaging logic, and is useful for parts with no source, or for parts with sources that don’t need to be compiled or packed.
By using the nil plugin, parts can be defined purely by using properties automatically included by Snapcraft, such as
For examples, search GitHub for projects already using the plugin.
ⓘ This is a snapcraft plugin. See Snapcraft plugins and Supported plugins for further details on how plugins are used.
The description for this plugin is not completely correct. It is useful for
parts with sources that don’t need to be compiled or packed, such as bash scripts. A better description would be that
nil plugin does not run any language specific packaging logic. At the same time, the docs could also contain a couple of example illustrating how to include files into a
snap without processing. I don’t see any examples for that in https://snapcraft.io/docs/snapcraft-parts-metadata
Thanks for this - I’ve added more details, and you’re right about adding a good example. We’re about to start adding better examples to all of our plugin and interface documentation pages - I’ll create a table in the docs category so that this work can be tracked.
An example for a single
bash script with explanations would be great. Actually, it would be great to have more simple way for adding files to a snap. Right now it is too cryptic.
# overriding the build/ step to copy the script for packing
cp myip.sh $SNAPCRAFT_PART_INSTALL/