Line a baking sheet with a foil.
Combine sugar and 2 tablespoons water in a small saucepan on medium-low heat. Stir until sugar dissolves. Bring mixture to a boil and cook, occasionally swirling pan and brushing down sides until the color is dark amber (about 5 minutes).
Remove saucepan from heat. Immediately add butter; whisk until melted. Add in pistachios and hazelnuts; stir until well coated. Transfer mixture to baking sheet, spreading out to separate the nuts. Let cool. Break up any large clumps of nuts.
Stir chocolate in a medium bowl set over a saucepan of simmering water until melted. Remove from heat, add in goji berries, and stir quickly to combine. Spread chocolate-berry mixture on same baking sheet, keeping all the nuts in one layer. Sprinkle the top with cacao nibs. Chill until chocolate is set, about 3 hours.
Break bark into pieces and store between layers of parchment or waxed paper.