I think the NPCs in the back of the MM are a little easier to add these traits to. Make them small size and give them darkvision, sunlight sensitivity, and magic resistance. The CR really won’t change. If you want to fiddle around with Wisdom to make them consistent you can.
Here are some derro I worked up if you want them. Use the CR ¼ derro traits except for the following:
CR 1 Derro Brute
Armor Class 15 (leather armor + shield)
HP 27 (6d6 + 6)
STR: 14
Aggressive. As a bonus action, the derro brute can move up to its speed toward a hostile creature that it can see.
Actions.
Multiattack. The derro brute makes two flail attacks.
Flail. Melee Weapon Attack: +4 to hit, reach 5ft., one target. Hit: 6 (1d8 +2) bludgeoning damage.
CR 2 Derro Dervish
Armor Class 15 (studded leather armor)
HP 36 (8d6 + 8)
DEX: 16
Actions.
Multiattack. The derro dervish makes three melee attacks: two with its scimitar and one with its dagger. Or the derro dervish makes two ranged attacks with its longbow.
Scimitar. Melee Weapon Attack: +5 to hit, reach 5 ft., one target. Hit: 7 (1d6 + 4) slashing damage.
Dagger. Melee Weapon Attack. +5 to hit, reach 5 ft., one target. Hit: 6 (1d4 + 4) piercing damage.
Longbow. Ranged Weapon Attack: +5 to hit, range 150/600 ft., one target. Hit: 8 (1d8 + 4) piercing damage.
Reactions.
Parry. The derro dervish adds 2 to its AC against one melee attack that would hit. To do so, the dervish must see the attacker and be wielding a melee weapon.
For the CR 5 or 6 did you want a spellcaster or a big tough derro?
If you have VGtM you could use the Warlock of the Great Old One and just add the derro traits-CR6
There is a CR5 Gladiator in the MM that would make an effective challenge too if you want a melee opponent.