mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
lib.licenses: added The commons clause license
This commit is contained in:
parent
11075319f2
commit
ebdf6a1d1e
@ -1,25 +1,31 @@
|
|||||||
{ lib }:
|
{ lib }:
|
||||||
|
|
||||||
lib.mapAttrs (lname: lset: let
|
lib.mapAttrs
|
||||||
|
(lname: lset:
|
||||||
|
let
|
||||||
defaultLicense = {
|
defaultLicense = {
|
||||||
shortName = lname;
|
shortName = lname;
|
||||||
free = true; # Most of our licenses are Free, explicitly declare unfree additions as such!
|
free = true; # Most of our licenses are Free, explicitly declare unfree additions as such!
|
||||||
deprecated = false;
|
deprecated = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
mkLicense = licenseDeclaration: let
|
mkLicense = licenseDeclaration:
|
||||||
|
let
|
||||||
applyDefaults = license: defaultLicense // license;
|
applyDefaults = license: defaultLicense // license;
|
||||||
applySpdx = license:
|
applySpdx = license:
|
||||||
if license ? spdxId
|
if license ? spdxId
|
||||||
then license // { url = "https://spdx.org/licenses/${license.spdxId}.html"; }
|
then license // { url = "https://spdx.org/licenses/${license.spdxId}.html"; }
|
||||||
else license;
|
else license;
|
||||||
applyRedistributable = license: { redistributable = license.free; } // license;
|
applyRedistributable = license: { redistributable = license.free; } // license;
|
||||||
in lib.pipe licenseDeclaration [
|
in
|
||||||
|
lib.pipe licenseDeclaration [
|
||||||
applyDefaults
|
applyDefaults
|
||||||
applySpdx
|
applySpdx
|
||||||
applyRedistributable
|
applyRedistributable
|
||||||
];
|
];
|
||||||
in mkLicense lset) ({
|
in
|
||||||
|
mkLicense lset)
|
||||||
|
({
|
||||||
/* License identifiers from spdx.org where possible.
|
/* 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.
|
||||||
@ -386,7 +392,10 @@ in mkLicense lset) ({
|
|||||||
spdxId = "CECILL-C";
|
spdxId = "CECILL-C";
|
||||||
fullName = "CeCILL-C Free Software License Agreement";
|
fullName = "CeCILL-C Free Software License Agreement";
|
||||||
};
|
};
|
||||||
|
commons-clause = {
|
||||||
|
fullName = "Commons Clause License";
|
||||||
|
free = false;
|
||||||
|
};
|
||||||
cpal10 = {
|
cpal10 = {
|
||||||
spdxId = "CPAL-1.0";
|
spdxId = "CPAL-1.0";
|
||||||
fullName = "Common Public Attribution License 1.0";
|
fullName = "Common Public Attribution License 1.0";
|
||||||
@ -1249,7 +1258,7 @@ in mkLicense lset) ({
|
|||||||
spdxId = "XSkat";
|
spdxId = "XSkat";
|
||||||
fullName = "XSkat License";
|
fullName = "XSkat License";
|
||||||
};
|
};
|
||||||
} // {
|
} // {
|
||||||
# TODO: remove legacy aliases
|
# TODO: remove legacy aliases
|
||||||
agpl3 = {
|
agpl3 = {
|
||||||
spdxId = "AGPL-3.0";
|
spdxId = "AGPL-3.0";
|
||||||
@ -1281,4 +1290,4 @@ in mkLicense lset) ({
|
|||||||
fullName = "GNU Lesser General Public License v3.0";
|
fullName = "GNU Lesser General Public License v3.0";
|
||||||
deprecated = true;
|
deprecated = true;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user