The creative commons licenses state explicitly that they should not be used for software. What alternatives exists for CC BY-NC-SA and CC BY-NC-ND suitable for software that is published on the internet?

I am looking for two licenses. Both software licenses should have the following attributes:

  • Credit must be given to the creator.
  • The code cannot be used for commercial purposes (so it is not an open source license).
  • The code can be used by researchers and for educational purposes.
  • After licensing a copy of the code, later the creator of the work can license other copies of the work under different licenses. So, the creator of the work can use the code commercially or grant other people the right to use copies of the code in ways that would be less restrictive than the license here in question. (I interpret https://law.stackexchange.com/a/36565/36090 such that the copyright holder can do that no matter which license the "first" license is, but I am not sure.)
  • Whether the license is restricting contribution to the code or not is not important.

The above attributes should be shared by both licenses. But one license should have the attribute

  • (1) No derivatives or adaptations of the work are permitted.

and the other

  • (2) Adaptations must be shared under the same terms.

EDIT / ANSWER: In case someone else stumbles over this question. https://commonsclause.com might be what you are looking for. Of course you need to check yourself if that is the case.