If you don't want the house, you load up the inspection report/demands that the seller fix with every last item you can think of. They either do them all or the home inspection contingency doesn't lift and you walk.
That said, asking for a new roof just because the life of the current one is only 5 years probably isn't going to fly. So, you ask for one, the seller says "no" and you walk.
If you really WANT the house (and you must have since you overpaid for it) you find some middle ground.