I've seen in other questions that pair production is not possible in vacuum, i.e. it needs a nucleus or something massive in order for conservation of momentum to hold. I've seen the derivation of that, where you end up with energy of the photon not even being larger than $2m_e c^2$ of the electron and positron. I think I got that covered.
But how does the equations/math look if I were to include the nucleus ? Do I just add a nucleus on the left and right side of the equation ($p_\gamma + p_\text{nuc} = p_\text{nuc'} + p_e + p_p$), and then just go to town with that, or is there something tricky about it ? Because after having be searching for it on Google, there really doesn't seem to be any "proof" of how this is done. So either is really easy, or not as easy as I think it might be.
So yes, what is the right way to do it ?