I mean if I were Iranian, I'd probably be in favor of my country getting the bomb, given what happened to Iraq, in spite of not having a program. Actually having one would probably protect the Iranians from eventual invasion and occupation, something that the North Korean government learned back in 2006
As I understand it, the Israelis are correct in saying that they are only a few weeks away from developing the bomb; the Iranians have just never chosen to exercise that option since actually making a nuclear weapon is their only piece of leverage. Actually going through the final step to develop the bomb would mean greater ostracism from the international community and unrestrained Israeli action.
So, in effect, the deal gets the West to lift counterproductive sanctions, in exchange for Iranians refusing to exercise an option that they would never exercise anyway. Kabuki theater at its finest.