Countable ingredient pluralization for English cookbooks
In my experience (I work as a cookbook editor), the ingredient itself is singular if only one of them is required to fill the quantity. For example, only one watermelon is required to fill two cups, so you'd write "2 cups watermelon" (as in your example). On the other hand, you'd need more than one watermelon to fill two barrels (unless the barrels are super small, I guess), so you'd write "2 barrels watermelons" (also as in your example).
That's why you say "2 cups nuts"--you need more than one nut.