mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-04 16:51:40 -05:00
21 lines
537 B
Bash
21 lines
537 B
Bash
![]() |
remove-@kind@-dependencies-hook() {
|
||
|
if ! test -f pyproject.toml; then
|
||
|
return
|
||
|
fi
|
||
|
|
||
|
echo "Removing @kind@ dependencies"
|
||
|
|
||
|
# Tell poetry not to resolve special dependencies. Any version is fine!
|
||
|
@yj@ -tj < pyproject.toml | \
|
||
|
@pythonInterpreter@ \
|
||
|
@pyprojectPatchScript@ \
|
||
|
--fields-to-remove @fields@ > pyproject.json
|
||
|
@yj@ -jt < pyproject.json > pyproject.toml
|
||
|
|
||
|
rm pyproject.json
|
||
|
|
||
|
echo "Finished removing @kind@ dependencies"
|
||
|
}
|
||
|
|
||
|
postPatchHooks+=(remove-@kind@-dependencies-hook)
|