Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am looking for an open source license for a library I want to publish. Ideally, one should be allowed to use this library in free or commercial applications without paying me a fee, but if any derivative work from the library is created (any improvement of the library for example), it should be made available to everyone under that same license.

In other words, I want to put the following ethics: "You benefit from this piece of work for free, and if you improve it, I can benefit from your improvement for free too". It's a type copyleft license I am looking for.

The MIT license looks like a possible solution, but it is unclear to me whether derivative works of the code covered by this license MUST be made available PUBLICLY to everyone. Can anyone clarify/confirm this? If there is another more appropriate open source license covering my needs, I am interested too. Thanks.

share|improve this question
    
A little more advanced discussion is here: programmers.stackexchange.com/questions/12394/… –  Dipan Mehta Dec 30 '11 at 20:35
add comment

2 Answers

up vote 7 down vote accepted

The MIT licence doesn't require derivative works to be open sourced. You are looking for the GPL.

The GPL grants the recipients of a computer program the rights of the Free Software Definition and uses copyleft to ensure the freedoms are preserved whenever the work is distributed, even when the work is changed or added to. The GPL is a copyleft license, which means that derived works can only be distributed under the same license terms...

share|improve this answer
1  
The GPL forces user to publish derivative work under GPL which is pushing too much restriction. I only want modifications of my library to be made available. Should I use LGPL? –  JVerstry Dec 30 '11 at 17:32
6  
In that case, yep - the LGPL is more appropriate. –  Ant Dec 30 '11 at 17:34
    
Note that the (L)GPL trigger only on redistribution. An end-user that creates a derivative work for private use only is not bound by (L)GPL obligations. I.e. strictly speaking this is not an answer to the question as phrased. –  MSalters Jan 2 '12 at 10:53
5  
@MSalters: I think it would be almost impossible to know that someone had derived something from your code unless they published it in some form, making that issue somewhat moot. –  Ant Jan 5 '12 at 1:03
add comment

I think, the Mozilla Public License (MPL, http://www.mozilla.org/MPL/2.0/) is the license you are looking for.

The MIT license is inbetween of GPL and MIT.

MIT allows the user to do everything with it, including modification, selling and not giving back the modified code to the community.

GPL forces the user to give away all the code to the community, even if your library is only 1% of the whole product.

LGPL forces the user to give away the modification of the LGPL-part of the code.

MPL is similar to LGPL: It also forces the user to make the modified source available. "Modified source" includes only the part of the MPL-covered code. That means, the user may bulid a new product out of your library. If he does modification of the MPL-part, he has to publish it. The new things by him do not need to be published.

I feel the MPL more fitting, as LGPL explicitly talks about "libraries" and MPL just talks about "Covered Software" (which is a broader scope)

share|improve this answer
    
Can you please explain why you feel the MPL fits the criteria that the OP is looking for? –  maple_shaft Apr 24 '12 at 12:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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