Hadron–hadron interactions from imaginary-time Nambu–Bethe–Salpeter wave function on the lattice