In a large skillet over medium heat, gently cook the onion in the oil, stirring regularly, until slightly golden and very soft, about 30 minutes. Season with salt. Set the sofrito aside in a bowl. This step can be done a few hours in advance or even the day before serving the fish.
With the rack in the middle position, preheat the oven to 350°F (180°C). Line a baking sheet with a silicone mat or parchment paper.
In a small pot over medium heat, melt the butter. Remove from the heat. Add the ground spice mix and salt.
Place the fish fillets on the baking sheet and brush with the spiced butter on both sides. Set the remaining butter aside until ready to serve. Roast the fish for 4 to 6 minutes, depending on the thickness of the fillets.
Meanwhile, in a mortar and pestle, or in a personal blender, grind the dukkah to a fine powder. Add the pistachios and grind until only small, crunchy pieces remain.
Using a large spatula, transfer the fish to individual plates or to a large serving dish. Drizzle with the remaining spiced butter and garnish with the onion sofrito (if cold, reheat before serving). Sprinkle with the dukkah-pistachios mixture and serve with lemon wedges.