Can a snapcraft plugin bring in stage packages and declare plugs?

Sergio Schvezov sergio.schvezov at
Thu Jan 5 12:39:02 UTC 2017

El 05/01/17 a las 09:31, Alberto Mardegan escribió:
> Hi all!
>    I'm working on simplifying the process for creating snaps of webapps.
> I've tried building a part, but that doesn't seem to work (see
> --
> comments welcome, by the way :-) ).
> Now I'm considering achieving the same goal by writing a snapcraft
> plugin. Before starting to dig into this, I'd like to know what exactly
> can be done by a plugin; in particular, are these tasks feasible?
> - Automatically adding stage-packages to the part

This is possible, look at the python plugin. There's a class attribute 
you can extend.

> - Declaring plugs (like setting up the ubuntu-app-platform plug)

This is not possible, we've toy'ed with these ideas so far (just for the 
sake of curiosity), some orthogonal to others, others not:

- parts can declare apps
- parts can declare environment that apps can reference
- parts can declare satisfying components or procedures that a plugin 
for such part would otherwise take care off (through use of `after` and 
a new `provides` keyword if plugin would know how to treat).

All these are a bit too early to introduce given that there are way too 
many concepts to deal with today; we might introduce some (or none) of 
these in some future.

More information about the Snapcraft mailing list