Well, Weinberg does physics not formal mathematics. I think this book is one of the best on QM written in the recent years. I think all of Weinberg's textbooks are masterpieces in clarity and style. Of course, he's a theoretical physicist and not a mathematician dealing with the exact formulation of QM as a mathematical theory.
I've Weinberg's book not with me over the weekend. So I provide my own derivation. The idea is the definition of the observables from group theory, based on the symmetry of the model. In this case we deal with the fundamental space-time symmetries and here even only with translation invariance. To keep the notation simple, I consider one-dimensional motion. The generalization to 3D is straight forward. In non-relatistic QM you can start with a minimal model, only invoking the translation group, assuming the existence of a position operator for a particle (strictly speaking the logic is to construct all ray representations of the Galileo group and then construct the appropriate position operators from it, but that's not necessary here). I also set ##\hbar=1## (natural units).
So we start with the Heisenberg algebra, defining momentum as the generator of spatial translations:
$$[\hat{x},\hat{p}]=\mathrm{i} \hat{1}.$$
Now we assume the existence of a (generalized) position eigenstate with eigenvalue ##0##, ##|x=0 \rangle## (I also use the Dirac notation; I don't know, why Weinberg doesn't like Dirac and find the Dirac notation much clearer, because you have a clear indication which kind of quantity you deal with). Now, if ##\hat{p}## generates spatial translations we should have
$$|x \rangle=\exp(-\mathrm{i} \hat{p} x)|x=0 \rangle.$$
To prove this we use the commutation relation in exponentiated form, i.e., we consider the operator-valued function
$$\hat{X}(\alpha)=\exp(\mathrm{i} \hat{p} \alpha) \hat{x} \exp(-\mathrm{i} \hat{p} \alpha).$$
We can easily derive a differential equation for this function by taking the derivative
$$\frac{\mathrm{d}}{\mathrm{d} \alpha} \hat{X}(\alpha)=\exp(\mathrm{i} \hat{p} \alpha) \mathrm{i} [\hat{p},\hat{x}]\exp(-\mathrm{i} \hat{p} \alpha)=\hat{1}.$$
Since ##\hat{X}(\alpha=0)=\hat{x}## we have
$$\hat{X}(\alpha)=\hat{x}+\alpha \hat{1}$$
and thus
$$\hat{x} \exp(-\mathrm{i} \hat{p} x)|x=0 \rangle = \exp(-\mathrm{i} \hat{p} x) \hat{X}(x)|x=0 \rangle = x \exp(-\mathrm{i} \hat{p} x)|x=0 \rangle,$$
i.e.
$$|x \rangle=\exp(-\mathrm{i} \hat{p} x)|x =0 \rangle$$
is a generalized eigenvector of ##\hat{x}## with eigenvalue ##x##. The spectrum of ##\hat{x}## is thus the entire real axis.
Now we can easily calculate the position representation of the momentum eigenstates, for which one can derive in the very same way as for ##\hat{x}## the spectrum to be also the entire real axis using that ##-\hat{x}## is the generator for momentum translations again using the Heisenberg commutation relation:
$$u_p(x)=\langle x|p \rangle=\langle x=0|\exp(+\mathrm{i} \hat{p} x|p \rangle = \exp(\mathrm{i} \hat{p} x) \langle x=0|p \rangle.$$
Now we want to normalize this to a ##\delta## distribution,
$$\langle p|p' \rangle=\delta(p-p') \; \Rightarrow \; \langle x=0|p \rangle=\frac{1}{\sqrt{2 \pi}},$$
so that
$$u_p(x)=\langle x|p \rangle=\frac{1}{\sqrt{2 \pi}} \exp(\mathrm{i} p x).$$
Now for a Hilbert-space vector we have for the wave function in position representation ##\psi(x)=\langle x|\psi \rangle##
$$\hat{p} \psi(x):=\langle x|\hat{p} \psi \rangle = \int_{\mathbb{R}} \mathrm{d} p p u_p(x) \langle p|\psi \rangle=-\mathrm{i} \partial_x \int_{\mathbb{R}} \mathrm{d} p u_p(x) \langle p|\psi \rangle=-\mathrm{i} \partial_x \psi(x).$$
All this is of course only a physicist's formal derivation. To prove all this in a mathematical rigorous way needs an entire book on Hilbert space theory/functional analysis.