Preheat the oven to 400 degrees F.
Cut a 3/4-inch wide strip off each side of the pastry and reserve. Roll out the pastry sheet on a lightly floured work surface to a 10-inch square and transfer to a sheet pan or cookie sheet. Brush the edges of the square with the egg. Working with 1 strip at a time, stand the strips along the edges of the pastry square and crimp where they meet. You want to create a shallow box, where the pastry square is the base and the 4 strips are the walls. Overlap the strips at the corners, stretching them, if necessary, to complete the walls of the box. Brush the border with the egg. Pierce the center of the pastry all over with fork. Bake until the pastry is golden brown, about 20 minutes. Transfer to a rack and cool completely.
Using an electric mixer, beat the cream to soft peaks. With the mixer still running, gradually add the sugar and continue to beat to stiff peaks. Add the liqueur and beat until just well blended; be careful not to overmix or the whipped cream will turn into a buttery consistency and start to separate. Using a large spatula, fold in the nuts. Spoon the cream mixture into the prepared pastry crust. Arrange the berries over the cream. Sift the cocoa powder over and serve.
Note: You can use any fruit that's in season (orange segments, berries, plums, bananas, grapes). Blueberries make a good substitute for the raspberries, and sliced peaches or nectarines are delicious as well.