New Zealand has an interesting offence on the books:

No person may—
(a) carry out any nuclear weapon test explosion or any other nuclear explosion; or
(b) cause, encourage, or in any way participate in, the carrying out of any nuclear weapon test explosion or any other nuclear explosion.

The penalty for carrying out a nuclear explosion? No more than ten years in jail or a $1 million fine.

The UK has a similar offence but the maximum penalty is life imprisonment. In Ireland the penalty is either "a fine" or "imprisonment for life or such lesser term as the court may determine".

The Canadian law that makes nuclear explosions an offence hasn't come into force yet but when it does, the penalty will be up to life in prison. The remarkable similarity of the offences in these four jurisdictions is due to an international treaty that bans nuclear testing. Given that state-level resources are required to build a nuclear bomb this offence seems a bit unnecessary but the spirit of the treaty is certainly a good one.