it is a primary mineral in some massive sulfide deposits formed by volcanism