glsl shader and specific light?

as I understand gl_LightSource defines the lightsource to be used for the shader input.
However I’m wondering if it would be possible to tell the shader to use a specific light in a scene only?

The problem with using gl_LightSource is that it’s values are set by fixed function OpenGL calls. If the BGE’s rasterizer were doing things properly, none of those values should be set for GLSL mode. However, some of those values do get set in GLSL mode anyways. In other words, your mileage may vary using things like gl_LightSource and gl_Material.

A more reliable method would be to pass in the information in as uniforms. This is a bit more work and requires more GLSL knowledge. However, using uniforms allows you to only pass in the information you want to use (your one light).

The BGE Python API allows you to setup uniforms:

If you want to do it without scripts, then providing that you can get away with being selective with lights on per-object basis instead of per-material, you can do so with layer only lamps.

The option is found in the lamp context and using it will mean that the lamp will only affect the shading of objects on the same layer as itself, I did a quick test and it does work.