lib.licenses: introduce redistributable attribute

Allows for distinction of licenses that are unfree overall but do grant the
right to redistribute. Defaults to the freeness of the license.

Note: Many unfree but are redistributable licenses aren't marked as such.
I expect that to be fixed in a distributed manner over time.

Closes https://github.com/NixOS/nixpkgs/pull/97789
This commit is contained in:
Atemu 2021-07-20 21:20:59 +02:00
parent 48797d7114
commit 16fb392853

View file

@ -13,9 +13,11 @@ lib.mapAttrs (lname: lset: let
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 [
applyDefaults
applySpdx
applyRedistributable
];
in mkLicense lset) ({
/* License identifiers from spdx.org where possible.