SPIRou is a near-infrared (nIR) spectropolarimeter at the CFHT, covering the YJHK nIR spectral bands ($980-2350,mathrm{nm}$). We describe the development and current status of the SPIRou wavelength calibration in order to obtain precise radial velocities (RVs) in the nIR. We make use of a UNe hollow-cathode lamp and a Fabry-Perot etalon to calibrate the pixel-wavelength correspondence for SPIRou. Different methods are developed for identifying the hollow-cathode lines, for calibrating the wavelength dependence of the Fabry-Perot cavity width, and for combining the two calibrators. The hollow-cathode spectra alone do not provide a sufficiently accurate wavelength solution to meet the design requirements of an internal error of $mathrm{<0.45,m,s^{-1}}$, for an overall RV precision of $mathrm{1,m,s^{-1}}$. However, the combination with the Fabry-Perot spectra allows for significant improvements, leading to an internal error of $mathrm{sim 0.15,m,s^{-1}}$. We examine the inter-night stability, intra-night stability, and impact on the stellar RVs of the wavelength solution.