1lib:
2let
3 ls = lib.licenses;
4in
5licenseString:
6builtins.getAttr licenseString (
7 (
8 with builtins;
9 lib.trivial.pipe (attrValues ls) [
10 (filter (l: l ? spdxId))
11 (map (l: lib.attrsets.nameValuePair l.spdxId l))
12 listToAttrs
13 ]
14 )
15 // {
16 "Bitstream-Vera AND MIT" = with ls; [
17 bitstreamVera
18 mit
19 ];
20 "LicenseRef-Monofur" = ls.free; # upstream `src/unpatched-fonts/Monofur/LICENSE.txt`
21 "LicenseRef-UbuntuFont" = ls.ufl;
22 "LicenseRef-VicFieger" = ls.free; # upstream `src/unpatched-fonts/HeavyData/Vic Fieger License.txt`
23 "MIT OR OFL-1.1-no-RFN" = ls.mit;
24 "OFL-1.1-RFN" = ls.ofl;
25 "OFL-1.1-no-RFN or LGPL-2.1-only" = ls.ofl;
26 "OFL-1.1-no-RFN" = ls.ofl;
27 }
28)