Knead a smooth dough from the first 5 ingredients and place in the refrigerator for about 30 minutes.
In the meantime, reduce the jam until thick and let it cool while stirring.
Halve the dough and roll out into rectangles on floured baking paper. Spread half of the jam on each and roll it up from the long side (works well if you roll it with the help of the baking paper). Roll in the pistachios and / or almonds and wrap in cling film in the freezer for about 1 hour.
Preheat the oven to 175 degrees circulating air. Cut the rolls into approx. 1 cm thick slices and bake on baking sheets lined with baking paper for approx. 12 minutes.