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
launchpad/nixpkgs/master
Atemu 3 years ago
parent 48797d7114
commit 16fb392853
  1. 2
      lib/licenses.nix

@ -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.

Loading…
Cancel
Save