Not ripe, perhaps, but you need it in your diet (7)
I believe the answer is:
protein
'you need it in your diet' is the definition.
I can't tell whether this defines the answer.
'not ripe perhaps' is the wordplay.
'perhaps' is an anagram indicator.
'not'+'ripe'='notripe'
'notripe' with letters rearranged gives 'PROTEIN'.
'but' acts as a link.
Can you help me to learn more?
(Other definitions for protein that I've seen before include "Key part of healthy diet" , "Organic compound, essential constituent of living cells" , "Dietary requirement" , "Combination of amino acids in living matter" , "A body chemical; pointer (anag.)" .)