Porphyry copper ore deposits are formed by concentration of copper within a granite stock during the ascent and crystallisation of a magma.
Chalcopyrite is an accessory mineral in Kambalda type komatiitic nickel ore deposits, formed from an immiscible sulfide liquid in sulfide-saturated ultramafic lavas.