Skip to content

Commit

Permalink
poetry: 1.0.3 -> 1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
adisbladis committed Mar 27, 2020
1 parent 2037514 commit e8d490f
Show file tree
Hide file tree
Showing 4 changed files with 298 additions and 157 deletions.
32 changes: 0 additions & 32 deletions pkgs/development/tools/poetry/default.nix
Expand Up @@ -17,38 +17,6 @@ poetry2nix.mkPoetryApplication {
done
'';

# Poetry is a bit special in that it can't use itself as the `build-system` property in pyproject.toml.
# That's why we need to hackily install outputs completely manually.
#
# For projects using poetry normally overriding the installPhase is not required.
installPhase = ''
runHook preInstall
mkdir -p $out/lib/${python.libPrefix}/site-packages
cp -r poetry $out/lib/${python.libPrefix}/site-packages
mkdir -p $out/bin
cat > $out/bin/poetry <<EOF
#!${python.interpreter}
import sys
if __name__ == '__main__':
sys.path.append("$out/lib/${python.libPrefix}/site-packages")
from poetry.console import main
main()
EOF
chmod +x $out/bin/poetry
mkdir -p "$out/share/bash-completion/completions"
"$out/bin/poetry" completions bash > "$out/share/bash-completion/completions/poetry"
mkdir -p "$out/share/zsh/vendor-completions"
"$out/bin/poetry" completions zsh > "$out/share/zsh/vendor-completions/_poetry"
mkdir -p "$out/share/fish/vendor_completions.d"
"$out/bin/poetry" completions fish > "$out/share/fish/vendor_completions.d/poetry.fish"
runHook postInstall
'';

# Propagating dependencies leads to issues downstream
# We've already patched poetry to prefer "vendored" dependencies
postFixup = ''
Expand Down

0 comments on commit e8d490f

Please sign in to comment.