Specifying other snaps as dependency

We’re looking into publishing our webapp as a snap. The application is written in Go, so creating the snap of the app itself is easy.

What I’m wondering about is if it is possible to declare other snaps as dependency, like «mysql» or «redis».
I have been looking at the Nextcloud snap where mysql is built from source and deployed inside the snap itself. This makes the whole build and update process much more complicated.

Is there any other way to achieve this? Like one might know it from docker-compose files I would like to make sure another snap is always installed along my own snap.

Since you haven’t got a reply yet, I’ll take a crack at this.

I think the short answer to your question is it’s not possible to declare such dependencies. But you can stage other snaps (sorta like stage-packages). See here (the parts.<part-name>.stage-snaps section):

I personally haven’t used stage-snaps, so can’t give you much details on how it works, but I think this is probably the closest to what your looking for.

Thank you @ryanjyoder! I’ll take a look at the stage-snaps feature then.