One quirk I found is that variables defined in snap.yaml environment: sections are interpolated for $SNAP* variables for apps, but not in the configure hook, they are set to the un-interpolated string.
An example snap that shows this problem is here:
https://code.launchpad.net/~bloodearnest/+git/snap-env-test
The configure hook variables are left un-interpolated, but the app ones are. Additionally, a stray newline is added to the variables value!?
I note that only $SNAP* variables are interpolated, which i assume is a security feature? I would be nice if other variables defined within the same environment: block could also be interpreted?
I am working around this hardcoding /var/snap//current instead of $SNAP_DATA in my environment: block, but I need to strip my env vars in the configure hook code 