Charmonium production in ¯ p-induced reactions on nuclei