Here’s a workaround. This allows you to discover the necessary pieces to put in your yaml to make a local part out of the remote part.
mkdir -p ~/tmp/legacy
sed -i 's|base:|#base:|g' ./snap/snapcraft.yaml
snapcraft define desktop-qt5
Which will result in this output.
alan@KinkPad-K450:~/tmp/legacy$ snapcraft define desktop-qt5
Maintainer: 'Snapcraft community (https//forum.snapcraft.io)'
Description: Helpers for gtk2, gtk3, qt4 and qt5 or gnome-platform and glib minimal launchers.
It brings the necessary code and exports for binding and using those
desktop technologies in a relocatable fashion, enabling binding with
global desktop theme, icon theme, image caching, fonts, mimetype handlers
application global menu and gsettings integration.
It also brings basics ubuntu dependency packages.
1. add "after: [desktop-<technology>]" to your launcher:
- gtk2, gtk3, qt4 and qt5 corresponds to their respective toolkit
main dependencies and default choices.
- gnome-platform is similar to gtk3 without the extra depends, it's
meant to be used with the gnome platform which already includes those.
- glib-only enables to compile mime types and gsettings infos. If you
added your own graphical drivers, it will link them as well.
2. prepend your command with "desktop-launch", like:
commands: "desktop-launch foo" if foo is in $PATH. You can as well
specify: "desktop-launch $SNAP/foo".
3. add needed plugs to your application:
- for graphical application:
plugs: [x11 (or unity7 for appmenu integration)]. Think about adding
opengl if you need hw acceleration.
- if your application needs access to sound:
- accessing to user's home directory:
- read/write to gsettings:
- use of the shared platform snap content, first define the plug:
and then make your apps use it:
Note that an empty "gnome-platform" directory will be created for you
in your snap.
Follow those instructions and you’re done.