lib.licenses: only define OR and AND once

This commit is contained in:
Eman Resu
2026-04-28 13:03:20 -04:00
parent a21427011a
commit 22fcb80812

View File

@@ -21,11 +21,12 @@ rec {
- [license] license expression to check
*/
evaluateProperty =
predicate: permissive: license:
predicate: permissive:
let
OR = if permissive then lib.any else lib.all;
AND = if permissive then lib.all else lib.any;
in
license:
if license.licenseType == "simple" then
predicate license
else if license.licenseType == "compound" then