Mineralogical controls on drainage quality during the weathering of waste rock