How to setup lightguns with current MAME core

I’m trying to setup a couple of GUN4Ir lightguns in RetroArch. Is there any guide about how to do it in the current MAME core? I have them working in the rest of cores with lightgun support without a problem.

Any idea?