Skip to content

Commit

Permalink
Merge pull request #99 from Rhys-T/ci-license-list
Browse files Browse the repository at this point in the history
ci.nix: make isBuildable work when `p.meta.license` is a list
  • Loading branch information
Mic92 committed Sep 22, 2024
2 parents 3517387 + 67153f7 commit 66c2e57
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ci.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ with builtins;
let
isReserved = n: n == "lib" || n == "overlays" || n == "modules";
isDerivation = p: isAttrs p && p ? type && p.type == "derivation";
isBuildable = p: !(p.meta.broken or false) && p.meta.license.free or true;
isBuildable = p: let
licenseFromMeta = p.meta.license or [];
licenseList = if builtins.isList licenseFromMeta then licenseFromMeta else [licenseFromMeta];
in !(p.meta.broken or false) && builtins.all (license: license.free or true) licenseList;
isCacheable = p: !(p.preferLocalBuild or false);
shouldRecurseForDerivations = p: isAttrs p && p.recurseForDerivations or false;

Expand Down

0 comments on commit 66c2e57

Please sign in to comment.