lib.licenses.gpl3 attribute refers to GPL 3.0 only. Unfortunately, it is not clear from the attribute name so people will often use that without realizing
lib.licenses.gpl3Plus might be more precise. It does not help that GitHub displays the license discovered in the attached ?GPL copy even when projects often include extra terms that allow user to choose later versions of GPL.
To reduce the confusion, https://github.com/NixOS/nixpkgs/pull/92348 deprecated the following license attributes:
agpl3in favour of
fdl11in favour of
fdl12in favour of
fdl13in favour of
gpl1in favour of
gpl2in favour of
gpl3in favour of
lgpl2in favour of
lgpl21in favour of
lgpl3in favour of
This change is in line with the GNU recommendations.
We ask that new package expressions do not use the deprecated
lib.licenses.?gpl? attributes in
meta.license. Instead they should use either
We also ask authors of pull request changing expressions using
lib.licenses.?gpl? to determine if the project allows choosing later versions of the license and change the
Finally, we ask reviewers to double check these changes and point pull request authors to this announcement if they did not read it.
Projects might mention license terms in the
README file or on their homepage.
If that is not the case, check few source files. They might contain a blurb similar to the following in the comment at the top of a file:
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
You can also try to grep (or search on GitHub) the repository for
Do not rely on the contents of
COPYING file or the license shown by the GitHub/GitLab interface (which is determined from the
COPYING file) – the file only contains the text of GNU ?GPL itself as mandated by the license. The extra terms allowing to use later versions of the license would be stored in the source code/documentation.
If no statement about license terms is found, you should ask the project maintainers to clarify.