  The $^{58}$Ni $(n,\gamma)$ cross section has been measured at the neutron
time of flight facility n_TOF at CERN, in the energy range from 27 meV up to
400 keV. In total, 51 resonances have been analyzed up to 122 keV. Maxwellian
averaged cross sections (MACS) have been calculated for stellar temperatures of
kT$=$5-100 keV with uncertainties of less than 6%, showing fair agreement with
recent experimental and evaluated data up to kT = 50 keV. The MACS extracted in
the present work at 30 keV is 34.2$\pm$0.6$_\mathrm{stat}\pm$1.8$_\mathrm{sys}$
mb, in agreement with latest results and evaluations, but 12% lower relative to
the recent KADoNIS compilation of astrophysical cross sections. When included
in models of the s-process nucleosynthesis in massive stars, this change
results in a 60% increase of the abundance of $^{58}$Ni, with a negligible
propagation on heavier isotopes. The reason is that, using both the old or the
new MACS, 58Ni is efficiently depleted by neutron captures.
