In a heavy-bottomed pot, heat the oil over medium heat, then add the onion and cook to soften. Grate the ginger and chop the garlic. Turn down the heat to low, then stir in the ginger and garlic into the onion and cook for another minute or so.
Add the dry spices and salt, and cook for a further 30 seconds. Add the chopped tomatoes and the stock, then cook for 10 minutes, uncovered, stirring regularly to break down the tomatoes with the back of the spoon.
Once the tomatoes have cooked down and reduced a little to make a sauce, add the eggplant cubes, cashews, and chickpeas. Stir well to coat them with the tomatoes, then cover and cook again, still over low heat, for another 10–12 minutes until soft. You may need to add some water if it looks a little too thick. Stir occasionally to stop it sticking to the bottom.
Finally, add the cilantro and spinach leaves, and cook for a couple of minutes, until they have wilted. Taste and check for seasoning.
Serve the curry topped with cilantro and a squeeze of lime juice.