nixos-configs/apps/gen-docs/getPackageMeta.nix
matt1432 20e5b7dac4
All checks were successful
Discord / discord commits (push) Has been skipped
feat(gen-docs): write nix code outside script
2025-01-20 20:37:52 -05:00

13 lines
342 B
Nix

x: let
inherit (builtins) currentSystem mapAttrs removeAttrs replaceStrings;
trimNewlines = s: replaceStrings ["\n"] [" "] s;
packages = removeAttrs x.${currentSystem} ["default"];
in {
attrs =
mapAttrs (_: v: {
desc = trimNewlines (v.meta.description or "");
homepage = v.meta.homepage or "";
})
packages;
}