diff --git a/doc/meta.xml b/doc/meta.xml index 272e812a03b..eb644b3b0ee 100644 --- a/doc/meta.xml +++ b/doc/meta.xml @@ -121,10 +121,11 @@ interpretation: license The license for the package. One from attribute set defined in - + nixpkgs/lib/licenses.nix. Example: stdenv.lib.licenses.gpl3. + See details in , @@ -133,7 +134,7 @@ interpretation: maintainers of this Nix expression. If you would like to be a maintainer of a package, you may want to add yourself to nixpkgs/lib/maintainers.nix + xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/maintainers.nix">nixpkgs/lib/maintainers.nix and write something like [ stdenv.lib.maintainers.alice stdenv.lib.maintainers.bob ]. @@ -159,8 +160,8 @@ interpretation: meta.platforms = stdenv.lib.platforms.linux; - Attribute Set stdenv.lib.platforms in - + Attribute Set stdenv.lib.platforms in + nixpkgs/lib/platforms.nix defines various common lists of platforms types. @@ -202,9 +203,15 @@ meta.hydraPlatforms = [];
Licenses -The meta.license attribute could be one of the -following: +The meta.license attribute should preferrably contain +a value from stdenv.lib.licenses defined in + +nixpkgs/lib/licenses.nix, +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: diff --git a/lib/licenses.nix b/lib/licenses.nix index ed6a54db550..29144264ddd 100644 --- a/lib/licenses.nix +++ b/lib/licenses.nix @@ -1,25 +1,24 @@ -{ - /* License identifiers loosely based on: http://fedoraproject.org/wiki/Licensing +let + 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 * add it to this list. The URL mentioned above is a good source for inspiration. */ - artistic2 = { - shortName = "Artistic 2.0"; - fullName = "Artistic 2.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; + agpl3 = spdx { + shortName = "AGPL-3.0"; + fullName = "GNU Affero General Public License v3.0"; }; agpl3Plus = { - shortName = "AGPLv3+"; - fullName = "GNU Affero General Public License version 3 or later"; - url = https://www.gnu.org/licenses/agpl.html; + shortName = "AGPL-3.0+"; + fullName = "GNU Affero General Public License v3.0 or later"; + inherit (agpl3) url; }; amd = { @@ -28,126 +27,149 @@ url = http://developer.amd.com/amd-license-agreement/; };# - apsl20 = { - shortName = "APSL 2.0"; + apsl20 = spdx { + shortName = "APSL-2.0"; fullName = "Apple Public Source License 2.0"; - url = http://opensource.org/licenses/APSL-2.0; }; - asl20 = { - shortName = "ASL2.0"; - fullName = "Apache Software License 2.0"; - url = http://www.apache.org/licenses/LICENSE-2.0; + artistic2 = spdx { + shortName = "Artistic-2.0"; + fullName = "Artistic License 2.0"; }; - boost = { - shortName = "boost"; - fullName = "Boost Software License"; - url = http://www.boost.org/LICENSE_1_0.txt; + asl20 = spdx { + shortName = "Apache-2.0"; + fullName = "Apache License 2.0"; }; - bsd2 = { - shortName = "BSD-2"; - fullName = "BSD license (2 clause)"; - url = http://opensource.org/licenses/BSD-2-Clause; + boost = spdx { + shortName = "BSL-1.0"; + fullName = "Boost Software License 1.0"; }; - bsd3 = { - shortName = "BSD-3"; - fullName = "BSD license (3 clause)"; - url = http://opensource.org/licenses/BSD-3-Clause; + bsd2 = spdx { + shortName = "BSD-2-Clause"; + fullName = ''BSD 2-clause "Simplified" License''; }; - bsdOriginal = { - shortName = "BSD-original"; - fullName = "Original BSD license with advertising clause"; - url = https://fedoraproject.org/wiki/Licensing/BSD; + bsd3 = spdx { + shortName = "BSD-3-Clause"; + fullName = ''BSD 3-clause "New" or "Revised" License''; }; - cc-by-30 = { - shortName = "CC BY 3.0"; + bsdOriginal = spdx { + 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"; - url = http://creativecommons.org/licenses/by/3.0; }; - cddl = { - shortName = "CDDL"; - fullName = "Common Development Distribution License "; - url = http://www.opensolaris.org/os/licensing/cddllicense.txt; + cddl = spdx { + shortName = "CDDL-1.0"; + fullName = "Common Development and Distribution License 1.0"; }; - cpl10 = { - shortName = "CPL 1.0"; - fullName = "Common Public License version 1.0"; - url = http://www.eclipse.org/legal/cpl-v10.html; + cecill-c = spdx { + shortName = "CECILL-C"; + fullName = "CeCILL-C Free Software License Agreement"; }; - epl10 = { - shortName = "EPL 1.0"; - fullName = "Eclipse Public License version 1.0"; - url = http://www.eclipse.org/legal/epl-v10.html; + cpl10 = spdx { + shortName = "CPL-1.0"; + fullName = "Common Public License 1.0"; + }; + + epl10 = spdx { + shortName = "EPL-1.0"; + fullName = "Eclipse Public License 1.0"; }; free = "free"; - gpl2 = { - shortName = "GPLv2"; - fullName = "GNU General Public License version 2"; - url = http://www.gnu.org/licenses/old-licenses/gpl-2.0.html; + gpl2 = spdx { + shortName = "GPL-2.0"; + fullName = "GNU General Public License v2.0 only"; }; gpl2Oss = { - shortName = "GPLv2+OSS"; + shortName = "GPL-2.0-with-OSS"; fullName = "GNU General Public License version 2 only (with OSI approved licenses linking exception)"; url = http://www.mysql.com/about/legal/licensing/foss-exception; }; - gpl2Plus = { - shortName = "GPLv2+"; - fullName = "GNU General Public License version 2 or later"; - url = http://www.gnu.org/licenses/old-licenses/gpl-2.0.html; + gpl2Plus = spdx { + shortName = "GPL-2.0+"; + fullName = "GNU General Public License v2.0 or later"; }; - gpl3 = { - shortName = "GPLv3"; - fullName = "GNU General Public License version 3 only"; - url = http://www.fsf.org/licensing/licenses/gpl.html; + gpl3 = spdx { + shortName = "GPL-3.0"; + fullName = "GNU General Public License v3.0 only"; }; - gpl3Plus = { - shortName = "GPLv3+"; - fullName = "GNU General Public License version 3 or later"; - url = http://www.fsf.org/licensing/licenses/gpl.html; + gpl3Plus = spdx { + shortName = "GPL-3.0+"; + fullName = "GNU General Public License v3.0 or later"; }; gpl3ClasspathPlus = { - shortName = "GPLv3+classpath+"; - fullName = "GNU General Public License version 3 or later (with Classpath exception)"; + shortName = "GPL-3.0+-with-classpath-exception"; + fullName = "GNU General Public License v3.0 or later (with 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"; - fullName = "Internet Systems Consortium License"; - url = http://www.opensource.org/licenses/ISC; + fullName = "ISC License"; }; - ipa = { - shortName = "IPA 1.0"; - fullName = "IPA Font License v1.0"; - url = http://ipafont.ipa.go.jp/ipafont/; + lgpl2 = spdx { + shortName = "LGPL-2.0"; + fullName = "GNU Library General Public License v2 only"; }; - ipl10 = { - shortName = "IPL 1.0"; - fullName = "IBM Public License Version 1.0"; - url = http://www.ibm.com/developerworks/opensource/library/os-i18n2/os-ipl.html; + lgpl2Plus = spdx { + shortName = "LGPL-2.0+"; + fullName = "GNU Library General Public License v2 or later"; }; - ijg = { - shortName = "IJG"; - fullName = "Independent JPEG Group License"; - url = https://fedoraproject.org/wiki/Licensing/IJG; + lgpl21 = spdx { + shortName = "LGPL-2.1"; + fullName = "GNU Library General Public License v2.1 only"; + }; + + 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 = { @@ -156,76 +178,47 @@ 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 = { - 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"; url = http://opensource.franz.com/preamble.html; }; - lgpl3 = { - 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 = { + mit = spdx { shortName = "MIT"; - fullName = "MIT/X11 license"; - url = http://www.opensource.org/licenses/mit-license.php; + fullName = "MIT License"; }; - mpl11 = { - shortName = "MPL1.1"; - fullName = "Mozilla Public License version 1.1"; - url = http://www.mozilla.org/MPL/MPL-1.1.html; + mpl11 = spdx { + shortName = "MPL-1.1"; + fullName = "Mozilla Public License 1.1"; }; - mpl20 = { - shortName = "MPL2.0"; - fullName = "Mozilla Public License version 2.0"; - url = https://www.mozilla.org/MPL/2.0; + mpl20 = spdx { + shortName = "MPL-2.0"; + fullName = "Mozilla Public License 2.0"; }; - ofl = { - shortName = "OFL"; - fullName = "SIL Open Font License"; - url = "http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL_web"; + msrla = { + shortName = "MSR-LA"; + fullName = "Microsoft Research License Agreement"; + url = "http://research.microsoft.com/en-us/projects/pex/msr-la.txt"; }; - openssl = { - shortName = "openssl"; - fullName = "OpenSSL license"; - url = http://www.openssl.org/source/license.html; + ofl = spdx { + shortName = "OFL-1.1"; + fullName = "SIL Open Font License 1.1"; + }; + + 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 = { @@ -233,10 +226,9 @@ fullname = "Public Domain"; }; - psfl = { - shortName = "PSFL"; - fullName = "Python Software Foundation License"; - url = http://docs.python.org/license.html; + sleepycat = spdx { + shortName = "Sleepycat"; + fullName = "Sleepycat License"; }; tcltk = { @@ -257,45 +249,20 @@ url = https://fedoraproject.org/wiki/Licensing:Wadalab?rd=Licensing/Wadalab; }; - zlib = { - shortName = "zlib"; - fullName = "zlib license"; - url = http://www.gzip.org/zlib/zlib_license.html; + zlib = spdx { + shortName = "Zlib"; + fullName = "zlib License"; }; - zpt20 = { - shortName = "ZPT2.0"; + zpt20 = spdx { # FIXME: why zpt* instead of zpl* + shortName = "ZPL-2.0"; fullName = "Zope Public License 2.0"; - url = "http://old.zope.org/Resources/License/ZPL-2.0"; }; - zpt21 = { - shortName = "ZPT2.1"; + zpt21 = spdx { + shortName = "ZPL-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"; - }; } + diff --git a/pkgs/applications/misc/xfontsel/default.nix b/pkgs/applications/misc/xfontsel/default.nix index 215ea75105f..9bf23885c17 100644 --- a/pkgs/applications/misc/xfontsel/default.nix +++ b/pkgs/applications/misc/xfontsel/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { meta = { homepage = http://www.x.org/; description = "Allows testing the fonts available in an X server"; - licesnse = "free"; + license = "free"; maintainers = with stdenv.lib.maintainers; [viric]; platforms = with stdenv.lib.platforms; linux; }; diff --git a/pkgs/applications/misc/xlsfonts/default.nix b/pkgs/applications/misc/xlsfonts/default.nix index 71d0a39296e..d142af486b5 100644 --- a/pkgs/applications/misc/xlsfonts/default.nix +++ b/pkgs/applications/misc/xlsfonts/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { meta = { homepage = http://www.x.org/; description = "Lists the fonts available in the X server"; - licesnse = "free"; + license = "free"; maintainers = with stdenv.lib.maintainers; [viric]; platforms = with stdenv.lib.platforms; linux; }; diff --git a/pkgs/development/libraries/libtiff/default.nix b/pkgs/development/libraries/libtiff/default.nix index 656c91de615..7ed9794011c 100644 --- a/pkgs/development/libraries/libtiff/default.nix +++ b/pkgs/development/libraries/libtiff/default.nix @@ -40,10 +40,10 @@ stdenv.mkDerivation rec { doCheck = true; - meta = { + meta = with stdenv.lib; { description = "Library and utilities for working with the TIFF image file format"; homepage = http://www.remotesensing.org/libtiff/; - license = "bsd"; - platforms = stdenv.lib.platforms.unix; + license = licenses.libtiff; + platforms = platforms.unix; }; }