-
The DPRK is built around self-sufficiency as a founding principle, and as such can do whatever they want. Iran is more self-sufficient then most, but still can't tank sanctions the same way.
-
The DPRK has a defensive alliance with China which of course makes the west more hesitant to bomb them while Iran for the most part is alone.
-
As a poster here from Iran has said, there might be a dangerously high number of liberals in Iran's government who want to be accepted by the west rather then stand up against them.
Ask Lemmygrad
A place to ask questions of Lemmygrad's best and brightest
All evidence points to the fact that Iran doesn't (didn't?) want nukes
Also the DPRK has a reliable ally in China while Iran is somewhat politically isolated
Assuming you mean the DPRK. It is a socialist state with the full support of its population. Iran is a capitalist state with mostly lukewarm support of its population.
Cuz you can't see in the dark.
In addition to what others have said, and maybe help explain the why, I don't think Iran really knows how to stand as alone and self-sufficient as the DPRK yet, which has been ostracized and sanctioned since it's founding.
On the other hand, Iran has always been a power player in the region and heavily involved in international politics. They traded with Russia and the British for a long time, and I think China as well. Then they developed a relationship with the US, who ended up helping establish the Shah, a Western puppet who sold off a bunch of his own country and was terrible in many ways, but did lead to even better Western relationships and a place in the neoliberal world order.
Their current isolation didn't really happen until after the Islamic Revolution, when the US started getting a little tired of the Shah too, and then Bush's axis of evil speech. All the huge sanctions are a relatively recent development, so not sure they've quite learned how to live when you're isolated like the DPRK has. Imo they should be making much better friends with Russia and China than the weak purely economic BRICS agreement.
Their revolution was also more religious, not class-based like a communist one would be, which I'm sure preserved a lot of the contradictions other people are mentioning, like reformist liberals or bourgeois who would love to be back in the Western sphere still having a lot of power, so they make deals like the nuclear treaty, even though any communist would know that even if the US didn't break it with Trump, they would have some other reason to either attack or sanction eventually. That's how imperialism works because that's how capitalism works. It doesn't mean don't make those treaties and diplomacy, but do it to give yourself more time to defend yourself militarily and build self-sufficiency, not with the expectation the West will let you join their club forever.