I’m not completely clear on what you’re saying, but looking at the history of your project I think I understand. To clarify, you’re saying:
Structuring my project like this doesn’t work:
/
|- snapcraft.yaml
|- hooks/
|- configure
But structuring it like this does:
/
|- snap/
|- snapcraft.yaml
|- hooks/
|- configure
Assuming I understand correctly, it has less to do with the location of the snapcraft.yaml and more to do with the location of the hooks themselves.
Referring to the docs, there are two ways to tell snapcraft to put hooks into your snap:
- Putting them in
<root>/snap/hooks/
- Build your hooks as parts and install them into
<snap>/snap/hooks/
It appears you’re trying to do (1), but you didn’t follow that directory layout in the first rendition. Only in the second did you conform to the necessary convention.