You will require,
1) A semiconductor lasing medium.
2) A power source around the lasing medium to provide the initial light.
3) A method to produce population inversion in the lasing medium so that on the average more atoms are in the excited state than in the ground state of the lasing medium.
4) Possibly a way to reinforce the produced light by bouncing it back in to lasing medium so that a chain reaction can occur.
5) Lastly, a solid frame body to contain all this material inside a tube that can fit on the top of your glock.
6) Polarization of light should not be a matter of concern to you but if it is you will also need a Brewster window at the exit point of your laser.
Let me know how it goes for you! ;) :D