Skip to content

Commit

Permalink
poetry: 1.0.5 -> 1.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
adisbladis committed Jun 9, 2020
1 parent 25b9f3b commit 423f854
Show file tree
Hide file tree
Showing 9 changed files with 494 additions and 229 deletions.
33 changes: 0 additions & 33 deletions pkgs/development/tools/poetry/default.nix

This file was deleted.

6 changes: 0 additions & 6 deletions pkgs/development/tools/poetry/src.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{ lib, poetry2nix, python, fetchFromGitHub }:


poetry2nix.mkPoetryApplication {

inherit python;

projectDir = ./.;

src = fetchFromGitHub (lib.importJSON ./src.json);

# "Vendor" dependencies (for build-system support)
postPatch = ''
for path in ''${PYTHONPATH//:/ }; do echo $path; done | uniq | while read path; do
echo "sys.path.insert(0, \"$path\")" >> poetry/__init__.py
done
'';

postInstall = ''
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"
'';

# Propagating dependencies leads to issues downstream
# We've already patched poetry to prefer "vendored" dependencies
postFixup = ''
rm $out/nix-support/propagated-build-inputs
'';

# Fails because of impurities (network, git etc etc)
doCheck = false;

meta = with lib; {
inherit (python.meta) platforms;
maintainers = with maintainers; [ adisbladis jakewaksbaum ];
};
}

0 comments on commit 423f854

Please sign in to comment.