We do not have enough information from you, to determine where in the process of buying and sales contract you are. Did you buy with the assistance of a Realtor? Then that Realtor should be making recommendations to you how to go about it. Did you have an inspection after signing the sales contract and during that inspection you found out that you need a new roof?
You see it all depends what your sales contract terms say, if you have any doubts contact a real estate attorney who will review the terms of your contract with you.... But without knowing, what you have done, what the terms are and where in the process you currently are, we cannot make any suggestions or recommendations other than discussing the issue with your Realtor if you worked with one, or better yet contact an experienced Real Estate attorney....
Make sure that legally you are protected whatever steps and decisions you are making next!
Edith YourRealtor4Life and Chicago / Northshore Connection
Working always in the very BEST interest of her clients