Meant to add:
Either way, it's win/win for the Mullahs. If no one stops them, they have their bomb. If Israel/USA attack, they can crack down domestically and use that as the "I told you so! See why we need a nuke!" moment.
That looks like their game plan. They may have already calculated the cost of an Isreali strike is worth it for what they would gain in 'street cred' within the Islamic world.