forked from Fediversity/Fediversity
17 lines
375 B
Nix
17 lines
375 B
Nix
let
|
|
inherit (builtins)
|
|
elemAt
|
|
mapAttrs
|
|
match
|
|
readDir
|
|
readFile
|
|
;
|
|
removeTrailingWhitespace = s: elemAt (match "(.*[^[:space:]])[[:space:]]*" s) 0;
|
|
collectKeys =
|
|
dir: mapAttrs (name: _: removeTrailingWhitespace (readFile (dir + "/${name}"))) (readDir dir);
|
|
in
|
|
{
|
|
contributors = collectKeys ./contributors;
|
|
systems = collectKeys ./systems;
|
|
}
|