1{ lib }:
2let
3
4 spdx = lic: lic // {
5 url = "http://spdx.org/licenses/${lic.spdxId}.html";
6 };
7
8in
9
10lib.mapAttrs (n: v: v // { shortName = n; }) rec {
11 /* License identifiers from spdx.org where possible.
12 * If you cannot find your license here, then look for a similar license or
13 * add it to this list. The URL mentioned above is a good source for inspiration.
14 */
15
16 afl21 = spdx {
17 spdxId = "AFL-2.1";
18 fullName = "Academic Free License v2.1";
19 };
20
21 afl3 = spdx {
22 spdxId = "AFL-3.0";
23 fullName = "Academic Free License v3.0";
24 };
25
26 agpl3 = spdx {
27 spdxId = "AGPL-3.0";
28 fullName = "GNU Affero General Public License v3.0";
29 };
30
31 agpl3Plus = {
32 fullName = "GNU Affero General Public License v3.0 or later";
33 inherit (agpl3) url;
34 };
35
36 amazonsl = {
37 fullName = "Amazon Software License";
38 url = http://aws.amazon.com/asl/;
39 free = false;
40 };
41
42 amd = {
43 fullName = "AMD License Agreement";
44 url = http://developer.amd.com/amd-license-agreement/;
45 };
46
47 apsl20 = spdx {
48 spdxId = "APSL-2.0";
49 fullName = "Apple Public Source License 2.0";
50 };
51
52 arphicpl = {
53 fullName = "Arphic Public License";
54 url = https://www.freedesktop.org/wiki/Arphic_Public_License/;
55 };
56
57 artistic1 = spdx {
58 spdxId = "Artistic-1.0";
59 fullName = "Artistic License 1.0";
60 };
61
62 artistic2 = spdx {
63 spdxId = "Artistic-2.0";
64 fullName = "Artistic License 2.0";
65 };
66
67 asl20 = spdx {
68 spdxId = "Apache-2.0";
69 fullName = "Apache License 2.0";
70 };
71
72 boost = spdx {
73 spdxId = "BSL-1.0";
74 fullName = "Boost Software License 1.0";
75 };
76
77 beerware = spdx {
78 spdxId = "Beerware";
79 fullName = ''Beerware License'';
80 };
81
82 bsd0 = spdx {
83 spdxId = "0BSD";
84 fullName = "BSD Zero Clause License";
85 };
86
87 bsd2 = spdx {
88 spdxId = "BSD-2-Clause";
89 fullName = ''BSD 2-clause "Simplified" License'';
90 };
91
92 bsd3 = spdx {
93 spdxId = "BSD-3-Clause";
94 fullName = ''BSD 3-clause "New" or "Revised" License'';
95 };
96
97 bsdOriginal = spdx {
98 spdxId = "BSD-4-Clause";
99 fullName = ''BSD 4-clause "Original" or "Old" License'';
100 };
101
102 bsl10 = {
103 fullName = "Business Source License 1.0";
104 url = https://mariadb.com/bsl10;
105 };
106
107 bsl11 = {
108 fullName = "Business Source License 1.1";
109 url = https://mariadb.com/bsl11;
110 };
111
112 clArtistic = spdx {
113 spdxId = "ClArtistic";
114 fullName = "Clarified Artistic License";
115 };
116
117 cc0 = spdx {
118 spdxId = "CC0-1.0";
119 fullName = "Creative Commons Zero v1.0 Universal";
120 };
121
122 cc-by-nc-sa-20 = spdx {
123 spdxId = "CC-BY-NC-SA-2.0";
124 fullName = "Creative Commons Attribution Non Commercial Share Alike 2.0";
125 free = false;
126 };
127
128 cc-by-nc-sa-25 = spdx {
129 spdxId = "CC-BY-NC-SA-2.5";
130 fullName = "Creative Commons Attribution Non Commercial Share Alike 2.5";
131 free = false;
132 };
133
134 cc-by-nc-sa-30 = spdx {
135 spdxId = "CC-BY-NC-SA-3.0";
136 fullName = "Creative Commons Attribution Non Commercial Share Alike 3.0";
137 free = false;
138 };
139
140 cc-by-nc-sa-40 = spdx {
141 spdxId = "CC-BY-NC-SA-4.0";
142 fullName = "Creative Commons Attribution Non Commercial Share Alike 4.0";
143 free = false;
144 };
145
146 cc-by-nc-40 = spdx {
147 spdxId = "CC-BY-NC-4.0";
148 fullName = "Creative Commons Attribution Non Commercial 4.0 International";
149 free = false;
150 };
151
152 cc-by-nd-30 = spdx {
153 spdxId = "CC-BY-ND-3.0";
154 fullName = "Creative Commons Attribution-No Derivative Works v3.00";
155 free = false;
156 };
157
158 cc-by-sa-25 = spdx {
159 spdxId = "CC-BY-SA-2.5";
160 fullName = "Creative Commons Attribution Share Alike 2.5";
161 };
162
163 cc-by-30 = spdx {
164 spdxId = "CC-BY-3.0";
165 fullName = "Creative Commons Attribution 3.0";
166 };
167
168 cc-by-sa-30 = spdx {
169 spdxId = "CC-BY-SA-3.0";
170 fullName = "Creative Commons Attribution Share Alike 3.0";
171 };
172
173 cc-by-40 = spdx {
174 spdxId = "CC-BY-4.0";
175 fullName = "Creative Commons Attribution 4.0";
176 };
177
178 cc-by-sa-40 = spdx {
179 spdxId = "CC-BY-SA-4.0";
180 fullName = "Creative Commons Attribution Share Alike 4.0";
181 };
182
183 cddl = spdx {
184 spdxId = "CDDL-1.0";
185 fullName = "Common Development and Distribution License 1.0";
186 };
187
188 cecill20 = spdx {
189 spdxId = "CECILL-2.0";
190 fullName = "CeCILL Free Software License Agreement v2.0";
191 };
192
193 cecill-b = spdx {
194 spdxId = "CECILL-B";
195 fullName = "CeCILL-B Free Software License Agreement";
196 };
197
198 cecill-c = spdx {
199 spdxId = "CECILL-C";
200 fullName = "CeCILL-C Free Software License Agreement";
201 };
202
203 cpal10 = spdx {
204 spdxId = "CPAL-1.0";
205 fullName = "Common Public Attribution License 1.0";
206 };
207
208 cpl10 = spdx {
209 spdxId = "CPL-1.0";
210 fullName = "Common Public License 1.0";
211 };
212
213 curl = {
214 fullName = "MIT/X11 derivate";
215 url = "https://curl.haxx.se/docs/copyright.html";
216 };
217
218 doc = spdx {
219 spdxId = "DOC";
220 fullName = "DOC License";
221 };
222
223 eapl = {
224 fullName = "EPSON AVASYS PUBLIC LICENSE";
225 url = http://avasys.jp/hp/menu000000700/hpg000000603.htm;
226 free = false;
227 };
228
229 efl10 = spdx {
230 spdxId = "EFL-1.0";
231 fullName = "Eiffel Forum License v1.0";
232 };
233
234 efl20 = spdx {
235 spdxId = "EFL-2.0";
236 fullName = "Eiffel Forum License v2.0";
237 };
238
239 elastic = {
240 fullName = "ELASTIC LICENSE";
241 url = https://github.com/elastic/elasticsearch/blob/master/licenses/ELASTIC-LICENSE.txt;
242 free = false;
243 };
244
245 epl10 = spdx {
246 spdxId = "EPL-1.0";
247 fullName = "Eclipse Public License 1.0";
248 };
249
250 epl20 = spdx {
251 spdxId = "EPL-2.0";
252 fullName = "Eclipse Public License 2.0";
253 };
254
255 epson = {
256 fullName = "Seiko Epson Corporation Software License Agreement for Linux";
257 url = https://download.ebz.epson.net/dsc/du/02/eula/global/LINUX_EN.html;
258 free = false;
259 };
260
261 eupl11 = spdx {
262 spdxId = "EUPL-1.1";
263 fullName = "European Union Public License 1.1";
264 };
265
266 fdl12 = spdx {
267 spdxId = "GFDL-1.2";
268 fullName = "GNU Free Documentation License v1.2";
269 };
270
271 fdl13 = spdx {
272 spdxId = "GFDL-1.3";
273 fullName = "GNU Free Documentation License v1.3";
274 };
275
276 ffsl = {
277 fullName = "Floodgap Free Software License";
278 url = http://www.floodgap.com/software/ffsl/license.html;
279 free = false;
280 };
281
282 free = {
283 fullName = "Unspecified free software license";
284 };
285
286 g4sl = {
287 fullName = "Geant4 Software License";
288 url = https://geant4.web.cern.ch/geant4/license/LICENSE.html;
289 };
290
291 geogebra = {
292 fullName = "GeoGebra Non-Commercial License Agreement";
293 url = https://www.geogebra.org/license;
294 free = false;
295 };
296
297 gpl1 = spdx {
298 spdxId = "GPL-1.0";
299 fullName = "GNU General Public License v1.0 only";
300 };
301
302 gpl1Plus = spdx {
303 spdxId = "GPL-1.0+";
304 fullName = "GNU General Public License v1.0 or later";
305 };
306
307 gpl2 = spdx {
308 spdxId = "GPL-2.0";
309 fullName = "GNU General Public License v2.0 only";
310 };
311
312 gpl2ClasspathPlus = {
313 fullName = "GNU General Public License v2.0 or later (with Classpath exception)";
314 url = https://fedoraproject.org/wiki/Licensing/GPL_Classpath_Exception;
315 };
316
317 gpl2Oss = {
318 fullName = "GNU General Public License version 2 only (with OSI approved licenses linking exception)";
319 url = https://www.mysql.com/about/legal/licensing/foss-exception;
320 };
321
322 gpl2Plus = spdx {
323 spdxId = "GPL-2.0+";
324 fullName = "GNU General Public License v2.0 or later";
325 };
326
327 gpl3 = spdx {
328 spdxId = "GPL-3.0";
329 fullName = "GNU General Public License v3.0 only";
330 };
331
332 gpl3Plus = spdx {
333 spdxId = "GPL-3.0+";
334 fullName = "GNU General Public License v3.0 or later";
335 };
336
337 gpl3ClasspathPlus = {
338 fullName = "GNU General Public License v3.0 or later (with Classpath exception)";
339 url = https://fedoraproject.org/wiki/Licensing/GPL_Classpath_Exception;
340 };
341
342 hpnd = spdx {
343 spdxId = "HPND";
344 fullName = "Historic Permission Notice and Disclaimer";
345 };
346
347 # Intel's license, seems free
348 iasl = {
349 fullName = "iASL";
350 url = http://www.calculate-linux.org/packages/licenses/iASL;
351 };
352
353 ijg = spdx {
354 spdxId = "IJG";
355 fullName = "Independent JPEG Group License";
356 };
357
358 inria-compcert = {
359 fullName = "INRIA Non-Commercial License Agreement for the CompCert verified compiler";
360 url = "http://compcert.inria.fr/doc/LICENSE";
361 free = false;
362 };
363
364 inria-icesl = {
365 fullName = "INRIA Non-Commercial License Agreement for IceSL";
366 url = "http://shapeforge.loria.fr/icesl/EULA_IceSL_binary.pdf";
367 free = false;
368 };
369
370 ipa = spdx {
371 spdxId = "IPA";
372 fullName = "IPA Font License";
373 };
374
375 ipl10 = spdx {
376 spdxId = "IPL-1.0";
377 fullName = "IBM Public License v1.0";
378 };
379
380 isc = spdx {
381 spdxId = "ISC";
382 fullName = "ISC License";
383 };
384
385 lgpl2 = spdx {
386 spdxId = "LGPL-2.0";
387 fullName = "GNU Library General Public License v2 only";
388 };
389
390 lgpl2Plus = spdx {
391 spdxId = "LGPL-2.0+";
392 fullName = "GNU Library General Public License v2 or later";
393 };
394
395 lgpl21 = spdx {
396 spdxId = "LGPL-2.1";
397 fullName = "GNU Library General Public License v2.1 only";
398 };
399
400 lgpl21Plus = spdx {
401 spdxId = "LGPL-2.1+";
402 fullName = "GNU Library General Public License v2.1 or later";
403 };
404
405 lgpl3 = spdx {
406 spdxId = "LGPL-3.0";
407 fullName = "GNU Lesser General Public License v3.0 only";
408 };
409
410 lgpl3Plus = spdx {
411 spdxId = "LGPL-3.0+";
412 fullName = "GNU Lesser General Public License v3.0 or later";
413 };
414
415 libpng = spdx {
416 spdxId = "Libpng";
417 fullName = "libpng License";
418 };
419
420 libtiff = spdx {
421 spdxId = "libtiff";
422 fullName = "libtiff License";
423 };
424
425 llgpl21 = {
426 fullName = "Lisp LGPL; GNU Lesser General Public License version 2.1 with Franz Inc. preamble for clarification of LGPL terms in context of Lisp";
427 url = http://opensource.franz.com/preamble.html;
428 };
429
430 lppl12 = spdx {
431 spdxId = "LPPL-1.2";
432 fullName = "LaTeX Project Public License v1.2";
433 };
434
435 lppl13c = spdx {
436 spdxId = "LPPL-1.3c";
437 fullName = "LaTeX Project Public License v1.3c";
438 };
439
440 lpl-102 = spdx {
441 spdxId = "LPL-1.02";
442 fullName = "Lucent Public License v1.02";
443 };
444
445 miros = {
446 fullName = "MirOS License";
447 url = https://opensource.org/licenses/MirOS;
448 };
449
450 # spdx.org does not (yet) differentiate between the X11 and Expat versions
451 # for details see http://en.wikipedia.org/wiki/MIT_License#Various_versions
452 mit = spdx {
453 spdxId = "MIT";
454 fullName = "MIT License";
455 };
456
457 mpl10 = spdx {
458 spdxId = "MPL-1.0";
459 fullName = "Mozilla Public License 1.0";
460 };
461
462 mpl11 = spdx {
463 spdxId = "MPL-1.1";
464 fullName = "Mozilla Public License 1.1";
465 };
466
467 mpl20 = spdx {
468 spdxId = "MPL-2.0";
469 fullName = "Mozilla Public License 2.0";
470 };
471
472 mspl = spdx {
473 spdxId = "MS-PL";
474 fullName = "Microsoft Public License";
475 };
476
477 msrla = {
478 fullName = "Microsoft Research License Agreement";
479 url = "http://research.microsoft.com/en-us/projects/pex/msr-la.txt";
480 free = false;
481 };
482
483 ncsa = spdx {
484 spdxId = "NCSA";
485 fullName = "University of Illinois/NCSA Open Source License";
486 };
487
488 notion_lgpl = {
489 url = "https://raw.githubusercontent.com/raboof/notion/master/LICENSE";
490 fullName = "Notion modified LGPL";
491 };
492
493 nposl3 = spdx {
494 spdxId = "NPOSL-3.0";
495 fullName = "Non-Profit Open Software License 3.0";
496 };
497
498 ofl = spdx {
499 spdxId = "OFL-1.1";
500 fullName = "SIL Open Font License 1.1";
501 };
502
503 openldap = spdx {
504 spdxId = "OLDAP-2.8";
505 fullName = "Open LDAP Public License v2.8";
506 };
507
508 openssl = spdx {
509 spdxId = "OpenSSL";
510 fullName = "OpenSSL License";
511 };
512
513 osl21 = spdx {
514 spdxId = "OSL-2.1";
515 fullName = "Open Software License 2.1";
516 };
517
518 osl3 = spdx {
519 spdxId = "OSL-3.0";
520 fullName = "Open Software License 3.0";
521 };
522
523 php301 = spdx {
524 spdxId = "PHP-3.01";
525 fullName = "PHP License v3.01";
526 };
527
528 postgresql = spdx {
529 spdxId = "PostgreSQL";
530 fullName = "PostgreSQL License";
531 };
532
533 postman = {
534 fullName = "Postman EULA";
535 url = https://www.getpostman.com/licenses/postman_base_app;
536 free = false;
537 };
538
539 psfl = spdx {
540 spdxId = "Python-2.0";
541 fullName = "Python Software Foundation License version 2";
542 #url = http://docs.python.org/license.html;
543 };
544
545 publicDomain = {
546 fullName = "Public Domain";
547 };
548
549 qpl = spdx {
550 spdxId = "QPL-1.0";
551 fullName = "Q Public License 1.0";
552 };
553
554 qwt = {
555 fullName = "Qwt License, Version 1.0";
556 url = http://qwt.sourceforge.net/qwtlicense.html;
557 };
558
559 ruby = spdx {
560 spdxId = "Ruby";
561 fullName = "Ruby License";
562 };
563
564 sgi-b-20 = spdx {
565 spdxId = "SGI-B-2.0";
566 fullName = "SGI Free Software License B v2.0";
567 };
568
569 sleepycat = spdx {
570 spdxId = "Sleepycat";
571 fullName = "Sleepycat License";
572 };
573
574 smail = {
575 shortName = "smail";
576 fullName = "SMAIL General Public License";
577 url = http://metadata.ftp-master.debian.org/changelogs/main/d/debianutils/debianutils_4.8.1_copyright;
578 };
579
580 tcltk = spdx {
581 spdxId = "TCL";
582 fullName = "TCL/TK License";
583 };
584
585 ufl = {
586 fullName = "Ubuntu Font License 1.0";
587 url = http://font.ubuntu.com/ufl/ubuntu-font-licence-1.0.txt;
588 };
589
590 unfree = {
591 fullName = "Unfree";
592 free = false;
593 };
594
595 unfreeRedistributable = {
596 fullName = "Unfree redistributable";
597 free = false;
598 };
599
600 unfreeRedistributableFirmware = {
601 fullName = "Unfree redistributable firmware";
602 # Note: we currently consider these "free" for inclusion in the
603 # channel and NixOS images.
604 };
605
606 unlicense = spdx {
607 spdxId = "Unlicense";
608 fullName = "The Unlicense";
609 };
610
611 upl = {
612 fullName = "Universal Permissive License";
613 url = "https://oss.oracle.com/licenses/upl/";
614 };
615
616 vim = spdx {
617 spdxId = "Vim";
618 fullName = "Vim License";
619 };
620
621 virtualbox-puel = {
622 fullName = "Oracle VM VirtualBox Extension Pack Personal Use and Evaluation License (PUEL)";
623 url = "https://www.virtualbox.org/wiki/VirtualBox_PUEL";
624 free = false;
625 };
626
627 vsl10 = spdx {
628 spdxId = "VSL-1.0";
629 fullName = "Vovida Software License v1.0";
630 };
631
632 watcom = spdx {
633 spdxId = "Watcom-1.0";
634 fullName = "Sybase Open Watcom Public License 1.0";
635 };
636
637 w3c = spdx {
638 spdxId = "W3C";
639 fullName = "W3C Software Notice and License";
640 };
641
642 wadalab = {
643 fullName = "Wadalab Font License";
644 url = https://fedoraproject.org/wiki/Licensing:Wadalab?rd=Licensing/Wadalab;
645 };
646
647 wtfpl = spdx {
648 spdxId = "WTFPL";
649 fullName = "Do What The F*ck You Want To Public License";
650 };
651
652 wxWindows = spdx {
653 spdxId = "WXwindows";
654 fullName = "wxWindows Library Licence, Version 3.1";
655 };
656
657 xfig = {
658 fullName = "xfig";
659 url = "http://mcj.sourceforge.net/authors.html#xfig";
660 };
661
662 zlib = spdx {
663 spdxId = "Zlib";
664 fullName = "zlib License";
665 };
666
667 zpl20 = spdx {
668 spdxId = "ZPL-2.0";
669 fullName = "Zope Public License 2.0";
670 };
671
672 zpl21 = spdx {
673 spdxId = "ZPL-2.1";
674 fullName = "Zope Public License 2.1";
675 };
676}