mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-05 09:11:39 -05:00

String entries apply to _all_ versions, so it makes sense for them to be first in the build systems lists.
16 lines
430 B
Text
16 lines
430 B
Text
# Sort each entry in the top-level dictionary
|
|
.[] |= sort_by(
|
|
# Put all strings before objects
|
|
type == "object",
|
|
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
|
|
)
|