I have created an open source library ( https://github.com/pitschr/knx-link ) that is designed to be used by other open source projects; not by end users. Currently it is licensed as GPLv3.

My main goal is that every project that uses my library must be open sourced. For me personally it doesn’t matter if the other project that uses my library is licensed on e.g. Apache-2.0 or MIT as long the project used by the end-user is open sourced on e.g. GitHub.

Based on different licenses I see that:

  • LGPLv3 would not be the right choice as it allows to be linked by a proprietary software
  • GPLv3 seems be too strict for me, as enforces that other software needs to be licensed as GPLv3 as well. Furthermore, GPLv3 doesn’t allow to be used by a project which is licensed under Apache-2.0/MIT
  • Apache-2.0 and MIT licenses seems not be the option for me as they can be used by proprietary software directly

I could not find the right license for my purpose. Again, it is totally fine to use my library as long the end-user project/software itself is open source without enforcing that it needs to be licensed under GPLv3 as well? My main goal is to support the open source community only!

Am I alone with the idea? What is the best way to achieve? Which license would be most suitable for me?

Thank you, Christoph (who is bit confused)

  • Could you explain what you see as the the difference between "a project which uses your library" and "a consumer project"? Jan 2 at 19:37
  • @PhilipKendall For me it is no difference. I updated my text to make it more clearer. Thanks.
    – pitschr
    Jan 2 at 20:50
  • 1
    The trouble with that is the "GPL condom" problem: I create a MIT library which does nothing other than proxy calls through to your library. I release the (minimal) code to my library. I can now use my MIT licensed library in any code I feel like without ever releasing the code to your library. Jan 2 at 21:04
  • 5
    You want your code to be usable in projects under permissive licenses like Apache 2 and MIT. Those projects want to be usable in proprietary projects. Do you want your project to exist within an MIT-licensed project without stopping that MIT project from being included in a proprietary project? If you do not object to that, you want a permissive license. If you do object, you want your license to impose requirements on downstream projects that force source disclosure (i.e., you want a copyleft license like the GPL).
    – apsillers
    Jan 2 at 21:38

There's two fundamentally different takes on open source licenses:

a) the permissive ones like MIT, Apache etc which - roughly speaking - don't care what happens to their sources as long as the credits are maintained and communicated.

b) And there's the more strictly open source licenses, the copy-left licenses, which want to make sure that any derivative remains also open source, most notably the GPL license.

The license is usually chosen by the (initial) authors for a reason that s/he wants the first or the latter.

As such a license as you seek might be crafted, but serves little use: A permissively-licensed project would not want to make use of a license which can only be used in open-source projects; its license was chosen particularily such that proprietary use is possible.

A project already with a copy-left license does not need such license either - it could as well use the GPL which ensures just that: be open source and stay open source.

As such, it might even be argued that a license which may be used only in an open source project already exists: the GPL. Most open source licenses are compatible with the GPL in the sense that they may be used in a GPL-licensed project (by simply changing the license to GPL for the derived / combined software - even when notable exceptions exist like the incompatibility with Apache or MPL).


Let's say that someone uses your project (licensed under your custom license) in an MIT licensed application. Since the MIT license explicitly allows the software to be distributed closed source, your custom license would be ineffective and would not make sense.

If you do not want your library to be used in proprietary software, then the best choice would be the GNU GPL.

There are licenses compatible with the GNU GPL. GNU GPL-licensed software can contain code under any compatible license.

  • 1
    +1 from me, as this puts its finger on the key problem with OP's desire for something less prescriptive than GPL: Bob can take Alice's code under this theoretical new licence, make a de minimis copyright change, and republish it all under a weak copyleft licence, eg MIT. Carol can then take Bob's package and sell it to Dave under a proprietary licence.
    – MadHatter
    Jan 8 at 7:53

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.