Saw this the other day and immediately came up with several different ways that could be adapted to a rifle if one was creative enough:
Small Rig bracket There’s also this:
Battery holder I have one of the 5k cylinder shaped ones. Last time I had to use it I just strapped it to the off side of my AR stock up under the cheek piece with some ranger bands. Worked like a champ.