Blister aubergines over an open flame until blackened or roast in a tin at 220°C for 45 minutes.
Slowly cook garlic slices in oil in a frying pan over medium heat until they brown at the edges.
Stir in turmeric and tomatoes and cook for 20 minutes until tomatoes break down.
Scoop out cooked aubergine flesh and add it to the pan with the tomatoes and garlic.
Mash the mixture and cook through over medium-high heat for a few minutes.
Add tomato purée, sugar, and salt, then cook for 8 minutes while stirring occasionally.
Pour beaten eggs into small holes in the mixture and cook until opaque without stirring.
Stir the cooked eggs in, remove from heat, cool for 20 minutes, and garnish with walnuts.