git.iko.soy/typeable/nixpkgs
on master help sign in
licenses: Make single-version-only GPL explicit

I commonly see people use the former when they should use the latter. Would be also in line with the SPDX change https://www.gnu.org/licenses/identify-licenses-clearly.html

commit13b5ae55cdab62aac087d4a2885634983eb79b06 authorJan Tojnar <jtojnar@gmail.com> dateSun 5 Jul 2020, 17:51 (6 years ago) parentfbf553e
3 files changed+27−15
doc/stdenv/meta.xml+3−3 doc/using/configuration.xml+2−2 lib/licenses.nix+22−10
doc/stdenv/meta.xml+3−3
@@ -155,17 +155,17 @@ hello-2.3 A program that produces a familiar, friendly greeting
155155 <itemizedlist>
156156 <listitem>
157157 <para>
158− Single license referenced by attribute (preferred) <literal>stdenv.lib.licenses.gpl3</literal>.
158+ Single license referenced by attribute (preferred) <literal>stdenv.lib.licenses.gpl3Only</literal>.
159159 </para>
160160 </listitem>
161161 <listitem>
162162 <para>
163− Single license referenced by its attribute shortName (frowned upon) <literal>"gpl3"</literal>.
163+ Single license referenced by its attribute shortName (frowned upon) <literal>"gpl3Only"</literal>.
164164 </para>
165165 </listitem>
166166 <listitem>
167167 <para>
168− Single license referenced by its attribute spdxId (frowned upon) <literal>"GPL-3.0"</literal>.
168+ Single license referenced by its attribute spdxId (frowned upon) <literal>"GPL-3.0-only"</literal>.
169169 </para>
170170 </listitem>
171171 <listitem>
doc/using/configuration.xml+2−2
@@ -162,10 +162,10 @@
162162</programlisting>
163163 </para>
164164 <para>
165− The following example configuration blacklists the <literal>gpl3</literal> and <literal>agpl3</literal> licenses:
165+ The following example configuration blacklists the <literal>gpl3Only</literal> and <literal>agpl3Only</literal> licenses:
166166<programlisting>
167167{
168− blacklistedLicenses = with stdenv.lib.licenses; [ agpl3 gpl3 ];
168+ blacklistedLicenses = with stdenv.lib.licenses; [ agpl3Only gpl3Only ];
169169}
170170</programlisting>
171171 </para>
lib/licenses.nix+22−10
@@ -28,7 +28,7 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
2828 fullName = "Academic Free License v3.0";
2929 };
3030
31− agpl3 = spdx {
31+ agpl3Only = spdx {
3232 spdxId = "AGPL-3.0-only";
3333 fullName = "GNU Affero General Public License v3.0 only";
3434 };
@@ -281,12 +281,12 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
281281 fullName = "European Union Public License 1.2";
282282 };
283283
284− fdl11 = spdx {
284+ fdl11Only = spdx {
285285 spdxId = "GFDL-1.1-only";
286286 fullName = "GNU Free Documentation License v1.1 only";
287287 };
288288
289− fdl12 = spdx {
289+ fdl12Only = spdx {
290290 spdxId = "GFDL-1.2-only";
291291 fullName = "GNU Free Documentation License v1.2 only";
292292 };
@@ -296,7 +296,7 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
296296 fullName = "GNU Free Documentation License v1.2 or later";
297297 };
298298
299− fdl13 = spdx {
299+ fdl13Only = spdx {
300300 spdxId = "GFDL-1.3-only";
301301 fullName = "GNU Free Documentation License v1.3 only";
302302 };
@@ -327,7 +327,7 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
327327 free = false;
328328 };
329329
330− gpl1 = spdx {
330+ gpl1Only = spdx {
331331 spdxId = "GPL-1.0-only";
332332 fullName = "GNU General Public License v1.0 only";
333333 };
@@ -337,7 +337,7 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
337337 fullName = "GNU General Public License v1.0 or later";
338338 };
339339
340− gpl2 = spdx {
340+ gpl2Only = spdx {
341341 spdxId = "GPL-2.0-only";
342342 fullName = "GNU General Public License v2.0 only";
343343 };
@@ -362,7 +362,7 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
362362 fullName = "GNU General Public License v2.0 or later";
363363 };
364364
365− gpl3 = spdx {
365+ gpl3Only = spdx {
366366 spdxId = "GPL-3.0-only";
367367 fullName = "GNU General Public License v3.0 only";
368368 };
@@ -437,7 +437,7 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
437437 fullName = "JasPer License";
438438 };
439439
440− lgpl2 = spdx {
440+ lgpl2Only = spdx {
441441 spdxId = "LGPL-2.0-only";
442442 fullName = "GNU Library General Public License v2 only";
443443 };
@@ -447,7 +447,7 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
447447 fullName = "GNU Library General Public License v2 or later";
448448 };
449449
450− lgpl21 = spdx {
450+ lgpl21Only = spdx {
451451 spdxId = "LGPL-2.1-only";
452452 fullName = "GNU Lesser General Public License v2.1 only";
453453 };
@@ -457,7 +457,7 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
457457 fullName = "GNU Lesser General Public License v2.1 or later";
458458 };
459459
460− lgpl3 = spdx {
460+ lgpl3Only = spdx {
461461 spdxId = "LGPL-3.0-only";
462462 fullName = "GNU Lesser General Public License v3.0 only";
463463 };
@@ -782,4 +782,16 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
782782 spdxId = "ZPL-2.1";
783783 fullName = "Zope Public License 2.1";
784784 };
785+} // {
786+ # TODO: remove legacy aliases
787+ agpl3 = lib.licenses.agpl3Only;
788+ fdl11 = lib.licenses.fdl11Only;
789+ fdl12 = lib.licenses.fdl12Only;
790+ fdl13 = lib.licenses.fdl13Only;
791+ gpl1 = lib.licenses.gpl1Only;
792+ gpl2 = lib.licenses.gpl2Only;
793+ gpl3 = lib.licenses.gpl3Only;
794+ lgpl2 = lib.licenses.lgpl2Only;
795+ lgpl21 = lib.licenses.lgpl21Only;
796+ lgpl3 = lib.licenses.lgpl3Only;
785797}