mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-06 17:51:40 -05:00
4 lines
384 B
Text
4 lines
384 B
Text
# replace poetry.masonry.api with poetry.core.masonry.api if it's the build backend
|
|
(.["build-system"]["build-backend"] |= (select(. == "poetry.masonry.api") |= "poetry.core.masonry.api")) |
|
|
# replace build-system.requires with poetry-core if it's poetry
|
|
(.["build-system"]["requires"] |= map(if test("^\\s*poetry\\s*(>=|<=|==|!=|~=)\\s*([0-9]|\\.)*") then "poetry-core" else . end))
|