You can't do it with license.
It causes more harm than it prevents.
See how this played out with the JSON License
https://lwn.net/Articles/707510/
We can assume: noone evil took heed -- because they are evil. The good on the other hand stood by their principles that even the evil should have free software; and so didn't use it. Thus causing suffering until it was reimplemented.