Adding stagePackages after install

My app allows users to write their own plugin. Some of them need to have access to xprops, ffmpeg, etc. Some use cases may need more than this.

But stagePackages is defined at the time of packaging. So how do I go about this situation? How should my snap craft.yml should look like?

To further add context to the problem. I want to create a flexible system where the app

  • allows limited dependencies for most users(who wouldn’t use plugins)
  • for power users(who decide to write their plugins), allow access to more dependencies