I agree that one must be quite illogical and committed to some grander creed to issue a prohibition on nuclear weapons while Israel and USA are doing everything in their very much nuclear power to destroy you.
https://en.wikipedia.org/wiki/Ali_Khamenei%27s_fatwa_against...
It's definitely illogical to enrich materials to nuclear grade and invest immense amounts in bunkers with centrifuges while saying you don't mean to have nuclear weapons.