Widlar current source
I am not sure if this actually answers the question the right way, but it might help to think about \$M_2\$ as a source follower:

The current through \$M_2\$ is \$V_{s2}/R\$. This current is mirrored by the cascode PMOS current mirror, so:

$$
I_{ds1} = \frac{V_{s2}}{R}
$$

Now \$V_{gs,2}\$ is pretty constant. (If \$M_2\$ is acting like a source follower.) Therefore:

$$ 
g_{m1} \equiv \frac{\partial I_{ds1}}{\partial V_{gs1}} = \frac{\partial I_{ds1}}{\partial V_{g2}} \approx \frac{\partial I_{ds1}}{\partial V_{s2}} = \frac{1}{R}
$$

I suppose there are a few conditions necessary for that to work, but when they are met it seems like \$g_{m1}\$ is (almost) independent of W/L matching in the bottom NMOSes.