poetry2nix/overrides/sort-build-systems.jq
Victor Engmark ae35a2e48c
feat: Sort build systems alphabetically within objects
After sorting by the `from` and `until` versions.

Helps with #1320.
2023-09-26 13:40:33 +13:00

14 lines
371 B
Text

# Sort each entry in the top-level dictionary
.[] |= sort_by(
if type == "string"
then
# Sort string overrides alphabetically
.
else
# Sort entries with an `until` field above entries with a `from` field
.from,
.until,
# Sort build systems with the same `from` and `until` values
.buildSystem
end
)