mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
lib.licenses: added The commons clause license
This commit is contained in:
parent
11075319f2
commit
ebdf6a1d1e
1 changed files with 1291 additions and 1282 deletions
|
@ -1,25 +1,31 @@
|
|||
{ lib }:
|
||||
|
||||
lib.mapAttrs (lname: lset: let
|
||||
lib.mapAttrs
|
||||
(lname: lset:
|
||||
let
|
||||
defaultLicense = {
|
||||
shortName = lname;
|
||||
free = true; # Most of our licenses are Free, explicitly declare unfree additions as such!
|
||||
deprecated = false;
|
||||
};
|
||||
|
||||
mkLicense = licenseDeclaration: let
|
||||
mkLicense = licenseDeclaration:
|
||||
let
|
||||
applyDefaults = license: defaultLicense // license;
|
||||
applySpdx = license:
|
||||
if license ? spdxId
|
||||
then license // { url = "https://spdx.org/licenses/${license.spdxId}.html"; }
|
||||
else license;
|
||||
applyRedistributable = license: { redistributable = license.free; } // license;
|
||||
in lib.pipe licenseDeclaration [
|
||||
in
|
||||
lib.pipe licenseDeclaration [
|
||||
applyDefaults
|
||||
applySpdx
|
||||
applyRedistributable
|
||||
];
|
||||
in mkLicense lset) ({
|
||||
in
|
||||
mkLicense lset)
|
||||
({
|
||||
/* 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.
|
||||
|
@ -386,7 +392,10 @@ in mkLicense lset) ({
|
|||
spdxId = "CECILL-C";
|
||||
fullName = "CeCILL-C Free Software License Agreement";
|
||||
};
|
||||
|
||||
commons-clause = {
|
||||
fullName = "Commons Clause License";
|
||||
free = false;
|
||||
};
|
||||
cpal10 = {
|
||||
spdxId = "CPAL-1.0";
|
||||
fullName = "Common Public Attribution License 1.0";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue