In reading a certain proof on the stacks project "http://stacks.math.columbia.edu/tag/00NV", I can't see how Nakayama's lemma is used to make the following conclusion:
"Assume M is finitely presented and flat.......Pick any prime p and $x_1,…,x_r\in M$ which map to a basis of M⊗Rκ(p). By Nakayama's Lemma these elements generate $M_g$ for some g∈R, g∉p. "
an important consequence of Nakayama's lemma (sometimes just called Nakayama's lemma) is this: let $R$ be a ring and $N$ a module. if there are elements $n_1,...,n_k$ whose image generates $N/IN$ for $I\subset \mathrm{rad}(R)$ ($\mathrm{rad}(R)$ is the Jacobson radical), then they generate $N$ (see condition (8) in Lemma 10.18.1). Now in this case you have sections that generate $M_\mathfrak{p}/\mathfrak{p}M_\mathfrak{p}$. Note that all the conditions of Nakayama's lemma are satisfied. This means that the sections generate $M_\mathfrak{p}$. This is where you need Nakayama's lemma. Then you need to use the definition of stalks to say that these sections generate in whole neighborhood around $\mathfrak{p}$.