Is it possible to have snapcraft.yaml in a deeper subdirectory?


I’m hoping to make a PR to an upstream which keeps all packaging under a packaging subdirectory. If I move snapcraft.yaml to there it isn’t picked up by snapcraft (and presumably the automatic build service). Is it possible to move snapcraft.yaml to anywhere other than the root directory or under snap/ and still have it found by snapcraft or the automatic build service?


I had the same issue with the snap for nxengine-evo.
See also this issue.
To my knowledge, snapcraft supports these locations for the snapcraft.yaml:

  • snap/snapcraft.yaml
  • snapcraft.yaml
  • .snapcraft.yaml

In my case upstream was happy with adding a .snapcraft.yaml at the project root (similar to e.g. existing ci dot files) and placing additional snap-specific assents in the packaging-related subdirectory.