If Iran is indeed building nukes, it is to assure its long term sovereignty. The Western media selectively takes what its leaders say about Israel and apply the pretext that the nukes will be automatically used for war, but I seriously doubt this.
Its government is engaged in the 5 Year Plan which involves huge infrastructure projects within the country. There aren't signs of a huge military investment on a scale that would indicate a nation out for blood. Why invest so much into the domestic realm if the eventual goal is to just attack another country? Too many people envision Iran as just some place in the desert.
All of this rambling about the threat of nuclear holocaust is based largely in fear and ignorance. Few seem to know a damn thing about Iran other than what they watch on the news. It's a country growing rapidly and wanting clean energy could simply be part of that.
If Iran is indeed seeking nuclear deterrence, then what do you expect? All the nations around it are slowly falling under a U.S. umbrella of power. It needs to protect itself from invasion.