2022-01-13 20:06:32 +00:00
|
|
|
{ lib
|
2022-09-30 11:47:45 +00:00
|
|
|
, backports-cached-property
|
2022-01-13 20:06:32 +00:00
|
|
|
, buildPythonPackage
|
2020-04-24 23:36:52 +00:00
|
|
|
, cachecontrol
|
2020-06-15 15:56:04 +00:00
|
|
|
, cachy
|
|
|
|
, cleo
|
2022-01-13 20:06:32 +00:00
|
|
|
, crashtest
|
|
|
|
, dataclasses
|
2022-09-30 11:47:45 +00:00
|
|
|
, deepdiff
|
|
|
|
, dulwich
|
2022-01-13 20:06:32 +00:00
|
|
|
, fetchFromGitHub
|
2022-09-30 11:47:45 +00:00
|
|
|
, flatdict
|
2020-06-15 15:56:04 +00:00
|
|
|
, html5lib
|
|
|
|
, httpretty
|
2020-04-24 23:36:52 +00:00
|
|
|
, importlib-metadata
|
2022-09-30 11:47:45 +00:00
|
|
|
, installShellFiles
|
2020-04-24 23:36:52 +00:00
|
|
|
, intreehooks
|
2022-09-30 11:47:45 +00:00
|
|
|
, jsonschema
|
2020-06-15 15:56:04 +00:00
|
|
|
, keyring
|
2020-04-24 23:36:52 +00:00
|
|
|
, lockfile
|
2022-01-26 04:04:25 +00:00
|
|
|
, packaging
|
2020-06-15 15:56:04 +00:00
|
|
|
, pexpect
|
|
|
|
, pkginfo
|
2022-09-30 11:47:45 +00:00
|
|
|
, platformdirs
|
2020-10-07 09:15:18 +00:00
|
|
|
, poetry-core
|
2022-09-30 11:47:45 +00:00
|
|
|
, poetry-plugin-export
|
2020-06-15 15:56:04 +00:00
|
|
|
, pytest-mock
|
2022-09-30 11:47:45 +00:00
|
|
|
, pytest-xdist
|
2022-01-13 20:06:32 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonAtLeast
|
|
|
|
, pythonOlder
|
2020-06-15 15:56:04 +00:00
|
|
|
, requests
|
|
|
|
, requests-toolbelt
|
|
|
|
, shellingham
|
2022-09-30 11:47:45 +00:00
|
|
|
, stdenv
|
2020-06-15 15:56:04 +00:00
|
|
|
, tomlkit
|
2022-09-30 11:47:45 +00:00
|
|
|
, urllib3
|
2020-10-07 09:15:18 +00:00
|
|
|
, virtualenv
|
2022-09-30 11:47:45 +00:00
|
|
|
, xattr
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
buildPythonPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "poetry";
|
2022-09-30 11:47:45 +00:00
|
|
|
version = "1.2.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
format = "pyproject";
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "python-poetry";
|
|
|
|
repo = pname;
|
2022-09-30 11:47:45 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-+Nsg7oPh9tAHEKt1R9C+nY9UPy+9vbf/+A6vQWgTi+4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2022-09-30 11:47:45 +00:00
|
|
|
--replace 'crashtest = "^0.3.0"' 'crashtest = "*"'
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
nativeBuildInputs = [
|
2022-09-30 11:47:45 +00:00
|
|
|
installShellFiles
|
2022-01-13 20:06:32 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2020-06-15 15:56:04 +00:00
|
|
|
cachecontrol
|
|
|
|
cachy
|
2020-04-24 23:36:52 +00:00
|
|
|
cleo
|
2022-01-13 20:06:32 +00:00
|
|
|
crashtest
|
2022-09-30 11:47:45 +00:00
|
|
|
dulwich
|
2020-06-15 15:56:04 +00:00
|
|
|
html5lib
|
2022-09-30 11:47:45 +00:00
|
|
|
jsonschema
|
2020-06-15 15:56:04 +00:00
|
|
|
keyring
|
2022-01-26 04:04:25 +00:00
|
|
|
packaging
|
2020-06-15 15:56:04 +00:00
|
|
|
pexpect
|
2020-04-24 23:36:52 +00:00
|
|
|
pkginfo
|
2022-09-30 11:47:45 +00:00
|
|
|
platformdirs
|
2020-10-07 09:15:18 +00:00
|
|
|
poetry-core
|
2022-09-30 11:47:45 +00:00
|
|
|
poetry-plugin-export
|
2020-06-15 15:56:04 +00:00
|
|
|
requests
|
|
|
|
requests-toolbelt
|
2020-04-24 23:36:52 +00:00
|
|
|
shellingham
|
|
|
|
tomlkit
|
2020-10-07 09:15:18 +00:00
|
|
|
virtualenv
|
2022-09-30 11:47:45 +00:00
|
|
|
] ++ lib.optionals (stdenv.isDarwin) [
|
|
|
|
xattr
|
|
|
|
] ++ lib.optionals (pythonOlder "3.10") [
|
2022-01-13 20:06:32 +00:00
|
|
|
importlib-metadata
|
2022-09-30 11:47:45 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
backports-cached-property
|
|
|
|
] ++ cachecontrol.optional-dependencies.filecache;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2022-09-30 11:47:45 +00:00
|
|
|
installShellCompletion --cmd poetry \
|
|
|
|
--bash <($out/bin/poetry completions bash) \
|
|
|
|
--fish <($out/bin/poetry completions fish) \
|
|
|
|
--zsh <($out/bin/poetry completions zsh) \
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
checkInputs = [
|
2022-09-30 11:47:45 +00:00
|
|
|
deepdiff
|
|
|
|
flatdict
|
2022-01-13 20:06:32 +00:00
|
|
|
pytestCheckHook
|
|
|
|
httpretty
|
|
|
|
pytest-mock
|
2022-09-30 11:47:45 +00:00
|
|
|
pytest-xdist
|
2022-01-13 20:06:32 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
disabledTests = [
|
|
|
|
# touches network
|
|
|
|
"git"
|
|
|
|
"solver"
|
|
|
|
"load"
|
|
|
|
"vcs"
|
|
|
|
"prereleases_if_they_are_compatible"
|
2020-10-07 09:15:18 +00:00
|
|
|
"test_executor"
|
2020-06-15 15:56:04 +00:00
|
|
|
# requires git history to work correctly
|
|
|
|
"default_with_excluded_data"
|
2020-09-25 04:45:31 +00:00
|
|
|
# toml ordering has changed
|
|
|
|
"lock"
|
2020-10-07 09:15:18 +00:00
|
|
|
# fs permission errors
|
|
|
|
"test_builder_should_execute_build_scripts"
|
2022-01-13 20:06:32 +00:00
|
|
|
] ++ lib.optionals (pythonAtLeast "3.10") [
|
|
|
|
# RuntimeError: 'auto_spec' might be a typo; use unsafe=True if this is intended
|
|
|
|
"test_info_setup_complex_pep517_error"
|
2020-06-15 15:56:04 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
# Allow for package to use pep420's native namespaces
|
|
|
|
pythonNamespaces = [
|
|
|
|
"poetry"
|
|
|
|
];
|
2021-09-26 12:46:18 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://python-poetry.org/";
|
|
|
|
description = "Python dependency management and packaging made easy";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jakewaksbaum ];
|
|
|
|
};
|
|
|
|
}
|