How to use a snap within my snap?


#1

I’d like to use the node snap within my snap. How do I do this? Can it only be done through interfaces or can the snap literally be included inside my snap?

If interfaces are the way to do it, can I make it so node is installed when my snap is installed?


#2

Check out the stage-snaps Snapcraft property, using it via the content interface is also technically possible if the runtime snap exposes such interface.


#3

Ah that sounds like exactly what I need. Is it documented anywhere? It doesn’t seem to have made it into https://docs.snapcraft.io/snapcraft-yaml-reference yet.


#4

It’s in the parts reference: https://docs.snapcraft.io/snapcraft-parts-metadata

You’re right about the complete snapcraft reference not having it. It doesn’t seem like that page gets updated as often as the individual top-level and parts reference pages.


#5

I’ve added the missing entry to the standalone reference.