Request: Catkin plugin configurable PLUGIN_STAGE_SOURCES

I’m afraid not, as that would lead to a snap that could not be built in a clean environment (e.g. in CI). However, there is a way you can do this by providing your own custom Catkin plugin in the project in question. Create a snap/plugins directory within your project (alongside the snapcraft.yaml). Create a new file called snap/plugins/x-catkin.py. Make the contents of that file look something like this:

from snapcraft.plugins import catkin

class CustomCatkinPlugin(catkin.CatkinPlugin):

    @property
    def PLUGIN_STAGE_SOURCES(self):
        return """
deb http://${prefix}.ubuntu.com/${suffix}/ xenial main universe
deb http://${prefix}.ubuntu.com/${suffix}/ xenial-updates main universe
deb http://${prefix}.ubuntu.com/${suffix}/ xenial-security main universe
deb http://${security}.ubuntu.com/${suffix}/ xenial-security main universe
"""

That’s a minimum, I wouldn’t remove any of those repositories. However, you can add new lines there pointing to your own custom mirror. Then the rest of the behavior is inherited from the Catkin plugin and it works as normal. You use this custom Catkin plugin no differently: just specify plugin: catkin as usual, and Snapcraft will pick this one up instead of the built-in one.

As a side note, have you considered using rosinstall files to freeze things instead of an archive mirror?