Roast the eggplants: Preheat the oven to 400°F (200°C). Prick the eggplants with a fork and roast for 35-50 minutes until very soft. Let them cool, peel, mash, and drain any excess liquid.
Cook the onion and garlic: Heat 2 tablespoons of oil in a skillet over medium heat. Add the sliced onion and cook until golden brown. Add the minced garlic and turmeric, then cook for 1 minute.
Add the eggplant: Stir the mashed eggplant into the onion mixture. Season with black pepper and salt, then cook over low heat for 5-10 minutes.
Mix in the yogurt: Remove the skillet from the heat and let the eggplant cool until warm. Stir in the Greek yogurt and optional lemon juice until creamy and well combined.
Prepare the mint: Heat the remaining oil in a small pan over low heat. Add the dried mint and stir for a few seconds until fragrant. Do not let it burn.
Garnish and serve: Transfer the dip to a serving plate. Top with chopped walnuts, golden fried onions, and the mint oil. Serve chilled or slightly cool with warm pita or Persian flatbread.