I recently tried to rebuild the evince 3.28 snap from the provided snapcraft.yaml. However, “snapcraft cleanbuild” failed since the build happens in a xenial container and the source uses a newer version of gtk than in the xenial archives. According to the build logs at https://launchpad.net/~ubuntu-desktop/+snap/evince, the snap I downloaded was built using the gnome-3-26 backports ppa. Thus the yaml doesn’t include all the information needed to recreate the snap.
If the standard repositories don’t supply the required build-packages, can the yaml specify which additional repositories (such as gnome-3-26 backports) are needed? And is it possible to automatically install such additional dependencies in container builds?
it’s not possible to do this declaratively. The only way to achieve this purely with snapcraft.yaml changes is to add imperative code using the override-* blocks: