Make the vagaar by frying all the vagaar ingredients in oil until the spices are fragrant, about 2 minutes. If you burn the vagaar, discard, wash the pot and start again - do not try and rescue the curry.
Add the onion and fry until soft - about 8-10 minutes, adding water as necessary to stop the spices from sticking and burning on the bottom.
Remove from the pot and blend in a food processor with some water to help the blending. Add the tamarind paste, if using, to a cup of warm water and mush around with your hands, removing any pips or hard bits.
Fry the aubergine, curry leaves, 1/2 tsp turmeric, 1 tsp salt and 1 tbsp sugar in some oil until starting to soften, adding water if necessary to stop the aubergine sticking/burning.Add the grated tomato, blended onion/vagaar, tamarind (if using, or a cup of plain water if not using), chickpeas, cover and cook over medium-low heat for 20-30 minutes, until the aubergine is cooked through.
Taste at this point and add more salt, sugar or acidity (in the form of lemon juice/vinegar/tamarind) if necessary.Stir through the yoghurt, top with the coriander and serve immediately with basmati rice.