rose-pine-nix/.github/checkSources.nix

13 lines
531 B
Nix
Raw Normal View History

let
sources = (builtins.fromJSON (builtins.readFile ../.sources/sources.json)).pins;
isGithubSource = source: source.repository.type or "" == "GitHub";
isInOrg = source: source.repository.owner or "" == "catppuccin";
# all github sources should be from the org
isGoodSource = source: isGithubSource source -> isInOrg source;
# find the ones that aren't
badSources = builtins.filter (source: !(isGoodSource source)) (builtins.attrValues sources);
in
2024-05-21 14:53:46 -07:00
if ((builtins.length badSources) == 0) then "OK" else throw "BAD"