mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 17:14:33 +00:00
15 lines
400 B
Plaintext
15 lines
400 B
Plaintext
def truncate(xs; n):
|
|
if xs | length > n then xs[:n] + ["..."]
|
|
else xs
|
|
end;
|
|
|
|
def itemize_packages(xs):
|
|
truncate(xs; 3000) | map("- \(. )") | join("\n");
|
|
|
|
def section(title; xs):
|
|
"## " + title + " (" + (xs | length | tostring) + ")\n" + itemize_packages(xs);
|
|
|
|
section("Added"; .attrdiff.added) + "\n\n" +
|
|
section("Removed"; .attrdiff.removed) + "\n\n" +
|
|
section("Changed"; .attrdiff.changed)
|