7

Does anything like that exist?

So, let's say: if someone want to use my code in his MIT project, he can use is under MIT license. If he wants to use it in his GPL project, the code will be licensed to him under GPL. If his project is licensed under multiple OSI-approved licenses, the code will be multi-licensed to him. He is just forbidden to mix it with a proprietary code. He cannot re-license his codebase to a proprietary or any non OSI-approved license as long as my code is there. Is there some license that behaves like that?

  1. Why not MIT? Because it can be included in proprietary code.
  2. Why not GPL? Because it turns everything into GPL, and I want something quite opposite: turning my code into everything OSI-approved that it's being used in :) .
5
  • Yeah, it's kind of a copyleft idea made for the widest interoperability with other licenses. Like: you have open license? Great! You can use my code with the same license. But you will no longer be able to relicense your code to a non-open source one. So it's kind of like GPL in some regards, but much wider. It's not tying user to a single license, but to the set of licenses. Jul 24 at 15:58
  • The issue is that multi-licensing doesn't meet described spec. Because I don't want to offer MIT license as a free choice. I want to offer it only if it's going to be used in an already MIT licensed codebase. That's the difference. It's important because if I would just give MIT as an option in a multi-lincense, it would mean that code could be used in proprietary codebase, just like MIT license states, which is not what I want. Let's call this idea an "eye for an eye" license :) . Jul 24 at 16:32
  • 10
    Ok, I just noticed fatal flaw in my reasoning. If I would license code to someone who has MIT codebase, I would turn my code MIT, and that would nullify all copyleft measures I had in the first place. I see what you mean now. :D Funny how I missed such a simple thing about this idea. Jul 24 at 16:42
  • 2
    @ŁukaszZaroda and if you change MIT so that the copyleft has to remain in place, then you get GPL!
    – user253751
    Jul 25 at 14:21

2 Answers 2

19

What you are suggesting is essentially impossible; fundamentally, there are two types of open source license: permissive and copyleft. Permissive licenses, like the MIT License, deliberately allow people to re-use the material in non-open source projects. Copyleft licenses do not allow this and ensure the material remains "open forever".

You cannot via some trickery convert a permissive license like the MIT License into a copyleft one. If you want copyleft behaviour, just use a copyleft license (or multi-license under a set of copyleft licenses).

-2

Not quite what you want, but has a similar effect.

Public domain

Use dedication to public domain if it's possible in your jurisdiction, or simply use either Unlicense or CC0.

Your code will be usable in any open source project, as you wish.

Your code will be also usable in any closed source project, or anywhere at all and you cannot control it anymore. This contradicts your requirements.

1
  • 1
    This seems to be explicitly the complete opposite of what the poster is asking for. Jul 26 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.