There are many kinds of defects that could make a rental unit unlivable. The implied warranty of habitability requires landlords to maintain their rental units in a condition fit for the "occupation of human beings ". In addition, the rental unit must substantially comply with building and housing code standards that materially affect tenant's health and safety.
A dwelling may be considered uninhabitable (unlivable) for several reasons, one of which is if it substantially lacks effective waterproofing and weather protection of roof and exterior walls.
There are several remedies available to a tenant such as "repair and deduct", "abandonment" of the premises, or rent withholding. In the case of the latter, a tenant is allowed to withhold (stop paying) some or all of the rent if the landlord does not fix serious defects that violate the implied warranty of habitability. However, in order for the tenant to withhold rent, the defects must be substantial; that is they must be serious ones that threaten the tenant's health or safety.
You might be able to fight this eviction. Much will depend on the evidence that you can present (photos, witnesses, etc); whether or not you gave the landlord sufficient notice of this problem; how long it took them to make the repair and the adequacy of the repair.
For a fuller explaination of all of this, I am providing a link to a site that I think you will find to be of help: http://www.dca.ca.gov/publications/landlordbook/repairs.shtml