mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-05 09:11:39 -05:00
20 lines
537 B
Bash
20 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)
|