However, Justice Wylie gave the teen a discount for his early guilty plea which saved the Rosillo family going through a trial and also took into account his immaturity.
Derrick-Hardie pleaded guilty in July to murdering Mr Rosillo, 18, at a birthday party in Pakuranga in July last year.
In court today he appeared wooden as he sat in the dock and stared straight ahead while Mr Rosillo's mother Joan read an emotional victim impact statement.
Justice Wylie suppressed the statement after the family asked for privacy.
The court had earlier been told Derrick-Hardie's then-girlfriend had been flirting and talking with Mr Rosillo at the party before Derrick-Hardie asked her to leave with him.
She agreed but when an argument broke out between them, Mr Rosillo stepped in.
Derrick-Hardie accused his ex-girlfriend of being unfaithful. She responded by kissing Mr Rosillo, who returned the kiss.
The Crown said Derrick-Hardie responded with a frenzied attack. He grabbed Mr Rosillo by the neck, and stabbed him in the chest, face and abdomen. Friends tried to help Mr Rosillo but he died at the scene.
Derrick-Hardie went on the run but was arrested the next day at the Heritage Hotel in downtown Auckland.
Crown prosecutor Warren Cathcart said Derrick-Hardie's violence was not just a reaction to what had happened between his ex-girlfriend and Mr Rosillo but was the result of a "murderous mindset".
Mr Cathcart said Derrick-Hardie carried knives in the weeks leading up to the stabbing and talked on the social network website Facebook about stabbing people.
In one incident, at a different party, he pulled a knife on another teenager, who ran away.
In another incident, he went armed with a machete to meet a girl.
Justice Wylie took the teen's history into account and said the courts had to take a tough stance on knife-carrying.
"You distinguished yourself as being a dangerous and menacing member of society," he told Derrick-Hardie.
He urged him to seek help while he was in prison.
"By doing so, you will be able to reward the faith your family has shown you."