Treaties are international law (dictionary definition: "a body of rules established by custom or treaty"). What did you think international law consisted of, if not treaties?
One key difference is Iran's stated agenda of extermination; where Pakistan and India essentially seek nuclear weapons as part of their standoff over Kashmir, Iran seeks to destroy another country utterly - by some accounts, even at the expense of its own existence. If they sought peaceful coexistence, their weapons program would be less of an issue ... but then, if they sought peaceful existence rather than extermination of others, they wouldn't be pursuing these weapons in the first place.