Merge #3408: licenses: prefer spdx.org, improve docs

The patch to allow using license shortnames as attributes
was not included (yet).

Conflicts (auto-solved):
	pkgs/development/libraries/libtiff/default.nix
This commit is contained in:
Vladimír Čunát 2014-08-12 19:07:05 +02:00
commit 665b2c8247
5 changed files with 165 additions and 191 deletions

View File

@ -121,10 +121,11 @@ interpretation:</para>
<varlistentry> <varlistentry>
<term><varname>license</varname></term> <term><varname>license</varname></term>
<listitem><para>The license for the package. One from attribute set defined in <listitem><para>The license for the package. One from attribute set defined in
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/lib/licenses.nix"> <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix">
<filename>nixpkgs/lib/licenses.nix</filename></link>. <filename>nixpkgs/lib/licenses.nix</filename></link>.
Example: Example:
<literal>stdenv.lib.licenses.gpl3</literal>.</para></listitem> <literal>stdenv.lib.licenses.gpl3</literal>.</para></listitem>
See details in <xref linkend='sec-meta-license'/>,
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -133,7 +134,7 @@ interpretation:</para>
maintainers of this Nix expression. If maintainers of this Nix expression. If
you would like to be a maintainer of a package, you may want to add you would like to be a maintainer of a package, you may want to add
yourself to <link yourself to <link
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/lib/maintainers.nix"><filename>nixpkgs/lib/maintainers.nix</filename></link> xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/maintainers.nix"><filename>nixpkgs/lib/maintainers.nix</filename></link>
and write something like <literal>[ stdenv.lib.maintainers.alice and write something like <literal>[ stdenv.lib.maintainers.alice
stdenv.lib.maintainers.bob ]</literal>.</para></listitem> stdenv.lib.maintainers.bob ]</literal>.</para></listitem>
</varlistentry> </varlistentry>
@ -160,7 +161,7 @@ meta.platforms = stdenv.lib.platforms.linux;
</programlisting> </programlisting>
Attribute Set <varname>stdenv.lib.platforms</varname> in Attribute Set <varname>stdenv.lib.platforms</varname> in
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/lib/platforms.nix"> <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/platforms.nix">
<filename>nixpkgs/lib/platforms.nix</filename></link> defines various common <filename>nixpkgs/lib/platforms.nix</filename></link> defines various common
lists of platforms types. lists of platforms types.
</para></listitem> </para></listitem>
@ -202,9 +203,15 @@ meta.hydraPlatforms = [];
<section xml:id="sec-meta-license"><title>Licenses</title> <section xml:id="sec-meta-license"><title>Licenses</title>
<para>The <varname>meta.license</varname> attribute could be one of the <para>The <varname>meta.license</varname> attribute should preferrably contain
following: a value from <varname>stdenv.lib.licenses</varname> defined in
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix">
<filename>nixpkgs/lib/licenses.nix</filename></link>,
or in-place license description of the same format if the license is
unlikely to be useful in another expression.
A few generic options are available, although it's typically better
to indicate the specific license:
<variablelist> <variablelist>
<varlistentry> <varlistentry>

View File

@ -1,25 +1,24 @@
{ let
/* License identifiers loosely based on: http://fedoraproject.org/wiki/Licensing spdx = lic: lic // {
url = "http://spdx.org/licenses/${lic.shortName}";
};
in
rec {
/* License identifiers from spdx.org where possible.
* If you cannot find your license here, then look for a similar license or * If you cannot find your license here, then look for a similar license or
* add it to this list. The URL mentioned above is a good source for inspiration. * add it to this list. The URL mentioned above is a good source for inspiration.
*/ */
artistic2 = { agpl3 = spdx {
shortName = "Artistic 2.0"; shortName = "AGPL-3.0";
fullName = "Artistic 2.0"; fullName = "GNU Affero General Public License v3.0";
url = "http://opensource.org/licenses/artistic-license-2.0.php";
};
agpl3 = {
shortName = "AGPLv3";
fullName = "GNU Affero General Public License version 3 only";
url = https://www.gnu.org/licenses/agpl.html;
}; };
agpl3Plus = { agpl3Plus = {
shortName = "AGPLv3+"; shortName = "AGPL-3.0+";
fullName = "GNU Affero General Public License version 3 or later"; fullName = "GNU Affero General Public License v3.0 or later";
url = https://www.gnu.org/licenses/agpl.html; inherit (agpl3) url;
}; };
amd = { amd = {
@ -28,126 +27,149 @@
url = http://developer.amd.com/amd-license-agreement/; url = http://developer.amd.com/amd-license-agreement/;
};# };#
apsl20 = { apsl20 = spdx {
shortName = "APSL 2.0"; shortName = "APSL-2.0";
fullName = "Apple Public Source License 2.0"; fullName = "Apple Public Source License 2.0";
url = http://opensource.org/licenses/APSL-2.0;
}; };
asl20 = { artistic2 = spdx {
shortName = "ASL2.0"; shortName = "Artistic-2.0";
fullName = "Apache Software License 2.0"; fullName = "Artistic License 2.0";
url = http://www.apache.org/licenses/LICENSE-2.0;
}; };
boost = { asl20 = spdx {
shortName = "boost"; shortName = "Apache-2.0";
fullName = "Boost Software License"; fullName = "Apache License 2.0";
url = http://www.boost.org/LICENSE_1_0.txt;
}; };
bsd2 = { boost = spdx {
shortName = "BSD-2"; shortName = "BSL-1.0";
fullName = "BSD license (2 clause)"; fullName = "Boost Software License 1.0";
url = http://opensource.org/licenses/BSD-2-Clause;
}; };
bsd3 = { bsd2 = spdx {
shortName = "BSD-3"; shortName = "BSD-2-Clause";
fullName = "BSD license (3 clause)"; fullName = ''BSD 2-clause "Simplified" License'';
url = http://opensource.org/licenses/BSD-3-Clause;
}; };
bsdOriginal = { bsd3 = spdx {
shortName = "BSD-original"; shortName = "BSD-3-Clause";
fullName = "Original BSD license with advertising clause"; fullName = ''BSD 3-clause "New" or "Revised" License'';
url = https://fedoraproject.org/wiki/Licensing/BSD;
}; };
cc-by-30 = { bsdOriginal = spdx {
shortName = "CC BY 3.0"; shortName = "BSD-4-Clause";
fullName = ''BSD 4-clause "Original" or "Old" License'';
};
cc-by-30 = spdx {
shortName = "CC-BY-3.0";
fullName = "Creative Commons Attribution 3.0"; fullName = "Creative Commons Attribution 3.0";
url = http://creativecommons.org/licenses/by/3.0;
}; };
cddl = { cddl = spdx {
shortName = "CDDL"; shortName = "CDDL-1.0";
fullName = "Common Development Distribution License "; fullName = "Common Development and Distribution License 1.0";
url = http://www.opensolaris.org/os/licensing/cddllicense.txt;
}; };
cpl10 = { cecill-c = spdx {
shortName = "CPL 1.0"; shortName = "CECILL-C";
fullName = "Common Public License version 1.0"; fullName = "CeCILL-C Free Software License Agreement";
url = http://www.eclipse.org/legal/cpl-v10.html;
}; };
epl10 = { cpl10 = spdx {
shortName = "EPL 1.0"; shortName = "CPL-1.0";
fullName = "Eclipse Public License version 1.0"; fullName = "Common Public License 1.0";
url = http://www.eclipse.org/legal/epl-v10.html; };
epl10 = spdx {
shortName = "EPL-1.0";
fullName = "Eclipse Public License 1.0";
}; };
free = "free"; free = "free";
gpl2 = { gpl2 = spdx {
shortName = "GPLv2"; shortName = "GPL-2.0";
fullName = "GNU General Public License version 2"; fullName = "GNU General Public License v2.0 only";
url = http://www.gnu.org/licenses/old-licenses/gpl-2.0.html;
}; };
gpl2Oss = { gpl2Oss = {
shortName = "GPLv2+OSS"; shortName = "GPL-2.0-with-OSS";
fullName = "GNU General Public License version 2 only (with OSI approved licenses linking exception)"; fullName = "GNU General Public License version 2 only (with OSI approved licenses linking exception)";
url = http://www.mysql.com/about/legal/licensing/foss-exception; url = http://www.mysql.com/about/legal/licensing/foss-exception;
}; };
gpl2Plus = { gpl2Plus = spdx {
shortName = "GPLv2+"; shortName = "GPL-2.0+";
fullName = "GNU General Public License version 2 or later"; fullName = "GNU General Public License v2.0 or later";
url = http://www.gnu.org/licenses/old-licenses/gpl-2.0.html;
}; };
gpl3 = { gpl3 = spdx {
shortName = "GPLv3"; shortName = "GPL-3.0";
fullName = "GNU General Public License version 3 only"; fullName = "GNU General Public License v3.0 only";
url = http://www.fsf.org/licensing/licenses/gpl.html;
}; };
gpl3Plus = { gpl3Plus = spdx {
shortName = "GPLv3+"; shortName = "GPL-3.0+";
fullName = "GNU General Public License version 3 or later"; fullName = "GNU General Public License v3.0 or later";
url = http://www.fsf.org/licensing/licenses/gpl.html;
}; };
gpl3ClasspathPlus = { gpl3ClasspathPlus = {
shortName = "GPLv3+classpath+"; shortName = "GPL-3.0+-with-classpath-exception";
fullName = "GNU General Public License version 3 or later (with Classpath exception)"; fullName = "GNU General Public License v3.0 or later (with Classpath exception)";
url = https://fedoraproject.org/wiki/Licensing/GPL_Classpath_Exception; url = https://fedoraproject.org/wiki/Licensing/GPL_Classpath_Exception;
}; };
isc = { inria = {
shortName = "INRIA-NCLA";
fullName = "INRIA Non-Commercial License Agreement";
url = "http://compcert.inria.fr/doc/LICENSE";
};
ipa = spdx {
shortName = "IPA";
fullName = "IPA Font License";
};
ipl10 = spdx {
shortName = "IPL-1.0";
fullName = "IBM Public License v1.0";
};
isc = spdx {
shortName = "ISC"; shortName = "ISC";
fullName = "Internet Systems Consortium License"; fullName = "ISC License";
url = http://www.opensource.org/licenses/ISC;
}; };
ipa = { lgpl2 = spdx {
shortName = "IPA 1.0"; shortName = "LGPL-2.0";
fullName = "IPA Font License v1.0"; fullName = "GNU Library General Public License v2 only";
url = http://ipafont.ipa.go.jp/ipafont/;
}; };
ipl10 = { lgpl2Plus = spdx {
shortName = "IPL 1.0"; shortName = "LGPL-2.0+";
fullName = "IBM Public License Version 1.0"; fullName = "GNU Library General Public License v2 or later";
url = http://www.ibm.com/developerworks/opensource/library/os-i18n2/os-ipl.html;
}; };
ijg = { lgpl21 = spdx {
shortName = "IJG"; shortName = "LGPL-2.1";
fullName = "Independent JPEG Group License"; fullName = "GNU Library General Public License v2.1 only";
url = https://fedoraproject.org/wiki/Licensing/IJG; };
lgpl21Plus = spdx {
shortName = "LGPL-2.1+";
fullName = "GNU Library General Public License v2.1 or later";
};
lgpl3 = spdx {
shortName = "LGPL-3.0";
fullName = "GNU Lesser General Public License v3.0 only";
};
lgpl3Plus = spdx {
shortName = "LGPL-3.0+";
fullName = "GNU Lesser General Public License v3.0 or later";
}; };
libtiff = { libtiff = {
@ -156,76 +178,47 @@
url = https://fedoraproject.org/wiki/Licensing/libtiff; url = https://fedoraproject.org/wiki/Licensing/libtiff;
}; };
lgpl2 = {
shortName = "LGPLv2";
fullName = "GNU Library General Public License version 2";
url = http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html;
};
lgpl2Plus = {
shortName = "LGPLv2+";
fullName = "GNU Library General Public License version 2 or later";
url = http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html;
};
lgpl21 = {
shortName = "LGPLv2.1";
fullName = "GNU Lesser General Public License version 2.1";
url = http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html;
};
lgpl21Plus = {
shortName = "LGPLv2.1+";
fullName = "GNU Lesser General Public License version 2.1 or later";
url = http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html;
};
llgpl21 = { llgpl21 = {
shortName = "LLGPLv2.1"; shortName = "LLGPL-2.1";
fullName = "Lisp LGPL; GNU Lesser General Public License version 2.1 with Franz Inc. preamble for clarification of LGPL terms in context of Lisp"; fullName = "Lisp LGPL; GNU Lesser General Public License version 2.1 with Franz Inc. preamble for clarification of LGPL terms in context of Lisp";
url = http://opensource.franz.com/preamble.html; url = http://opensource.franz.com/preamble.html;
}; };
lgpl3 = { mit = spdx {
shortName = "LGPLv3";
fullName = "GNU Lesser General Public License version 3 only";
url = http://www.fsf.org/licensing/licenses/lgpl.html;
};
lgpl3Plus = {
shortName = "LGPLv3+";
fullName = "GNU Lesser General Public License version 3 or later";
url = http://www.fsf.org/licensing/licenses/lgpl.html;
};
mit = {
shortName = "MIT"; shortName = "MIT";
fullName = "MIT/X11 license"; fullName = "MIT License";
url = http://www.opensource.org/licenses/mit-license.php;
}; };
mpl11 = { mpl11 = spdx {
shortName = "MPL1.1"; shortName = "MPL-1.1";
fullName = "Mozilla Public License version 1.1"; fullName = "Mozilla Public License 1.1";
url = http://www.mozilla.org/MPL/MPL-1.1.html;
}; };
mpl20 = { mpl20 = spdx {
shortName = "MPL2.0"; shortName = "MPL-2.0";
fullName = "Mozilla Public License version 2.0"; fullName = "Mozilla Public License 2.0";
url = https://www.mozilla.org/MPL/2.0;
}; };
ofl = { msrla = {
shortName = "OFL"; shortName = "MSR-LA";
fullName = "SIL Open Font License"; fullName = "Microsoft Research License Agreement";
url = "http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL_web"; url = "http://research.microsoft.com/en-us/projects/pex/msr-la.txt";
}; };
openssl = { ofl = spdx {
shortName = "openssl"; shortName = "OFL-1.1";
fullName = "OpenSSL license"; fullName = "SIL Open Font License 1.1";
url = http://www.openssl.org/source/license.html; };
openssl = spdx {
shortName = "OpenSSL";
fullName = "OpenSSL License";
};
psfl = spdx {
shortName = "Python-2.0";
fullName = "Python Software Foundation License version 2";
#url = http://docs.python.org/license.html;
}; };
publicDomain = { publicDomain = {
@ -233,10 +226,9 @@
fullname = "Public Domain"; fullname = "Public Domain";
}; };
psfl = { sleepycat = spdx {
shortName = "PSFL"; shortName = "Sleepycat";
fullName = "Python Software Foundation License"; fullName = "Sleepycat License";
url = http://docs.python.org/license.html;
}; };
tcltk = { tcltk = {
@ -257,45 +249,20 @@
url = https://fedoraproject.org/wiki/Licensing:Wadalab?rd=Licensing/Wadalab; url = https://fedoraproject.org/wiki/Licensing:Wadalab?rd=Licensing/Wadalab;
}; };
zlib = { zlib = spdx {
shortName = "zlib"; shortName = "Zlib";
fullName = "zlib license"; fullName = "zlib License";
url = http://www.gzip.org/zlib/zlib_license.html;
}; };
zpt20 = { zpt20 = spdx { # FIXME: why zpt* instead of zpl*
shortName = "ZPT2.0"; shortName = "ZPL-2.0";
fullName = "Zope Public License 2.0"; fullName = "Zope Public License 2.0";
url = "http://old.zope.org/Resources/License/ZPL-2.0";
}; };
zpt21 = { zpt21 = spdx {
shortName = "ZPT2.1"; shortName = "ZPL-2.1";
fullName = "Zope Public License 2.1"; fullName = "Zope Public License 2.1";
url = "http://old.zope.org/Resources/License/ZPL-2.1";
}; };
sleepycat = {
shortName = "Sleepycat";
fullName = "Sleepycat Public License";
url = "https://en.wikipedia.org/wiki/Sleepycat_License";
};
cecill-c = {
shortName = "CeCILL-C";
fullName = "CEA CNRS INRIA Logiciel Libre";
url = "http://www.cecill.info/licences.en.html";
};
msrla = {
shortName = "MSR-LA";
fullName = "Microsoft Research License Agreement";
url = "http://research.microsoft.com/en-us/projects/pex/msr-la.txt";
};
inria = {
shortName = "INRIA-NCLA";
fullName = "INRIA Non-Commercial License Agreement";
url = "http://compcert.inria.fr/doc/LICENSE";
};
} }

View File

@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
meta = { meta = {
homepage = http://www.x.org/; homepage = http://www.x.org/;
description = "Allows testing the fonts available in an X server"; description = "Allows testing the fonts available in an X server";
licesnse = "free"; license = "free";
maintainers = with stdenv.lib.maintainers; [viric]; maintainers = with stdenv.lib.maintainers; [viric];
platforms = with stdenv.lib.platforms; linux; platforms = with stdenv.lib.platforms; linux;
}; };

View File

@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
meta = { meta = {
homepage = http://www.x.org/; homepage = http://www.x.org/;
description = "Lists the fonts available in the X server"; description = "Lists the fonts available in the X server";
licesnse = "free"; license = "free";
maintainers = with stdenv.lib.maintainers; [viric]; maintainers = with stdenv.lib.maintainers; [viric];
platforms = with stdenv.lib.platforms; linux; platforms = with stdenv.lib.platforms; linux;
}; };

View File

@ -40,10 +40,10 @@ stdenv.mkDerivation rec {
doCheck = true; doCheck = true;
meta = { meta = with stdenv.lib; {
description = "Library and utilities for working with the TIFF image file format"; description = "Library and utilities for working with the TIFF image file format";
homepage = http://www.remotesensing.org/libtiff/; homepage = http://www.remotesensing.org/libtiff/;
license = "bsd"; license = licenses.libtiff;
platforms = stdenv.lib.platforms.unix; platforms = platforms.unix;
}; };
} }