20 , poetry-plugin-export
39 buildPythonPackage rec {
44 disabled = pythonOlder "3.8";
46 src = fetchFromGitHub {
47 owner = "python-poetry";
49 rev = "refs/tags/${version}";
50 hash = "sha256-pk57Jxf4hkMKLn1pOa9BtHLwLJ6qmXc55TqQN5Vr2k8=";
89 ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [
91 ] ++ lib.optionals (pythonOlder "3.11") [
93 ] ++ lib.optionals (pythonOlder "3.10") [
95 ] ++ cachecontrol.optional-dependencies.filecache;
98 installShellCompletion --cmd poetry \
99 --bash <($out/bin/poetry completions bash) \
100 --fish <($out/bin/poetry completions fish) \
101 --zsh <($out/bin/poetry completions zsh) \
104 nativeCheckInputs = [
110 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
116 '' + lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) ''
117 # https://github.com/python/cpython/issues/74570#issuecomment-1093748531
121 postCheck = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) ''
126 "test_builder_should_execute_build_scripts"
127 "test_env_system_packages_are_relative_to_lib"
128 "test_executor_known_hashes"
129 "test_install_warning_corrupt_root"
136 # Allow for package to use pep420's native namespaces
141 # Unset ambient PYTHONPATH in the wrapper, so Poetry only ever runs with its own,
142 # isolated set of dependencies. This works because the correct PYTHONPATH is set
143 # in the Python script, which runs after the wrapper.
144 makeWrapperArgs = ["--unset PYTHONPATH"];
147 changelog = "https://github.com/python-poetry/poetry/blob/${src.rev}/CHANGELOG.md";
148 homepage = "https://python-poetry.org/";
149 description = "Python dependency management and packaging made easy";
150 license = licenses.mit;
151 maintainers = with maintainers; [ jakewaksbaum dotlambda ];
152 mainProgram = "poetry";