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.
I still don’t understand how someone looked at that clause and did anything but giggle. I am always genuinely surprised when I encounter adults who think evil is well-defined enough for these purposes. Genuinely, I think this is a serious gap in my ability to empathize with other engineers and I am not sure what to do about it.
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.