You don't seem to understand the severity of diplomatic immunity. You can declare them persona-non-grata. That's it. You can't storm an embassy (Which is considered national soil of whatever country that occupies it) I don't give a shit if they murdered somebody (like in the kashoggi case)
Everybody spies on everybody, we don't go committing acts of war. I'll say it again, Iran is lucky to have not gotten nuked.
This is like someone would say that Vietnam is lucky to have not gotten nuked. Declaring war or using a nuke on a country after they've done what you want them to do is rarely considered a way to promote proper behavior.
Because "real" governments don't just declare war because another country made them mad.
And Iran released the hostages in exchange for unfreezing some Iran's assets in the US. Which was made necessary by the start of the Iran-Iraq war in which the United States sold WMDs to Iraq. Why declare war when you can get two powers you don't care for to slug each other for years at a fraction the price?
The United States did not nuke Iran after the hostage crisis because it would have been a disproportionate and unacceptable response to the situation.
The hostage crisis, while a significant and concerning, humiliating even, did not rise to the level of an existential threat to the United States. The use of nuclear weapons would have had catastrophic consequences not just for Iran but for the entire region and potentially the world. It would have violated international law and caused a severe backlash from the international community, including US allies.
Diplomatic and non-military solutions were pursued instead, including with Khomeini.
In 1980 Carter did authorize a secret attack which was designed to penetrate the country of Iran’s borders and effect a daring rescue the American hostages, using untried technologies and joint coordination across the armed services. Any Iranian casualties that resulted from that planned action would be a substantial punishment for molesting American Citizens, with the benefit of not having any remaining hostages in the country that could be victims of reprisals.
They authorized an attack directly on Iranian soil with AC-130 aircrafts and others, their intent was to kill Iranian civilians in mass and bragging about it, they did actually launched an ATGM at a food truck killing a civilian during the operation. Unfortunately, bad weather killed the squad. Also US Special Operations were still in their infancy. Bringing an AC-130 gunship and helicopters near Tehran, unloading 30mm rounds on civilians as a punishment and rescuing the Americans like in Hollywood films, like Iran was ISIS.
People who cavalierly talk about how the US would just launch a strike to take out Iranian nuclear capability, they are ignorant. Getting to Iran with a large number of personnel and then evacuating even more while staying alive really difficult. It’s not near a border. Iran has firepower.
Declaring war on Iran after the hostage crisis was not considered a viable option at the time. Include to that Carter was focused on realpolitik
Diplomatic Options: The United States explored diplomatic options to resolve the crisis, including negotiations, sanctions and threats. These efforts were eventually successful in securing the release of the hostages, and war was not necessary at the end.
Domestic Concerns: The American public was war weary after the Vietnam War and did not have the appetite for another conflict which would require American conscripts. The cost of war was a major concern, as the United States was still recovering from a recession and more than 50000 American soldiers killed and executed in Vietnam.
International Opposition: Many countries were opposed to military action against Iran, including allies of the United States. This would have made it difficult to build a coalition for a war effort.
Risk of Escalation: The United States was concerned about the potential for a wider conflict in the Middle East if it went to war with Iran. This could have had catastrophic consequences for the region and the world.
Iran is not an isolationist country for ideological reasons. Iran has had a complex and sometimes tense relationship with the international community, it has not pursued isolationism as a deliberate policy.
Iran's foreign policy is driven by a combination of factors, Iran has also faced a range of economic and political sanctions from the international community, which have limited its ability to engage with the world on its own terms. Additionally, Iran has had strained relations with some countries, such as the United States, due to historical and political factors.
Iran foreign policy is more complex than saying it is not willing to cooperate with anyone for ideological or religious reasons. This is something we see in western medias, that Iran is unwilling to do anything, that the "only solution is to nuke Iran".
For Turkey, Pakistan and arms exports/imports, the volume of military arms deals between Turkey and Pakistan is greater than the sum of Iran's total arms imports and exports combined, but it is not meaningful in terms of broader military capabilities or strategic considerations.
Iran has faced significant economic and political sanctions from the international community, which have limited its ability to engage in arms deals and may have impacted its overall military capabilities. Iran has developed its own domestic arms industry to help address some of these limitations, and has been successful in producing a range of weapons systems, including ballistic missiles, drones, and naval vessels.
The volume of arms deals between Turkey and Pakistan may be greater than Iran's arms imports and exports combined on any openly available statistics, But it like saying that a cat and a horse are better than a kangaroo because the cats and dogs walks on four legs and the kangaroo on two legs.