1-methyl-4-(4-nitrophenyl)piperazine was a reagent in the preparation of diaminopyrimidines as reversible and irreversible inhibitors of mutant EGFR tyrosine kinases for treatment of non-small-cell lung cancer. It was also used in the prepn. of disubstituted pyrimidine compds. as EGFR or/and ALK inhibitors useful in the treatment of diseases.