Update licenses.nix

This commit is contained in:
Soussi Mohamed Nour 2024-03-21 14:54:21 +01:00 committed by GitHub
parent eedaca8ef1
commit 89ea04dc70
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1303 additions and 1292 deletions

View File

@ -1,31 +1,25 @@
{ 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.
@ -392,15 +386,17 @@ lib.mapAttrs
spdxId = "CECILL-C";
fullName = "CeCILL-C Free Software License Agreement";
};
cpal10 = {
spdxId = "CPAL-1.0";
fullName = "Common Public Attribution License 1.0";
};
commons-clause = {
fullName = "Commons Clause License";
url = "https://commonsclause.com/";
free = false;
};
cpal10 = {
spdxId = "CPAL-1.0";
fullName = "Common Public Attribution License 1.0";
};
cpl10 = {
spdxId = "CPL-1.0";
@ -609,6 +605,11 @@ lib.mapAttrs
url = "https://fedoraproject.org/wiki/Licensing/GPL_Classpath_Exception";
};
giftware = {
spdxId = "Giftware";
fullName = "Giftware License";
};
hpnd = {
spdxId = "HPND";
fullName = "Historic Permission Notice and Disclaimer";
@ -619,6 +620,11 @@ lib.mapAttrs
spdxId = "HPND-sell-variant";
};
hpndUc = {
spdxId = "HPND-UC";
fullName = "Historical Permission Notice and Disclaimer - University of California variant";
};
# Intel's license, seems free
iasl = {
spdxId = "Intel-ACPI";
@ -904,6 +910,11 @@ lib.mapAttrs
url = "https://raw.githubusercontent.com/netdata/netdata/master/web/gui/v2/LICENSE.md";
};
nistSoftware = {
spdxId = "NIST-Software";
fullName = "NIST Software License";
};
nlpl = {
spdxId = "NLPL";
fullName = "No Limit Public License";
@ -1259,7 +1270,7 @@ lib.mapAttrs
spdxId = "XSkat";
fullName = "XSkat License";
};
} // {
} // {
# TODO: remove legacy aliases
agpl3 = {
spdxId = "AGPL-3.0";
@ -1291,4 +1302,4 @@ lib.mapAttrs
fullName = "GNU Lesser General Public License v3.0";
deprecated = true;
};
})
})