2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
prompt-toolkit,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2021-03-09 03:18:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "questionary";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "2.0.1";
|
2021-03-09 03:18:52 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-12-30 13:39:12 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tmbo";
|
|
|
|
repo = pname;
|
2023-11-16 04:20:00 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-JY0kXomgiGtOrsXfRf0756dTPVgud91teh+jW+kFNdk=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
nativeBuildInputs = [
|
2021-12-30 13:39:12 +00:00
|
|
|
poetry-core
|
2024-01-13 08:15:51 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonRelaxDeps = [ "prompt_toolkit" ];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ prompt-toolkit ];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
preCheck = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
2023-03-15 16:39:30 +00:00
|
|
|
ulimit -n 1024
|
|
|
|
'';
|
|
|
|
|
2021-12-30 13:39:12 +00:00
|
|
|
disabledTests = [
|
2023-03-15 16:39:30 +00:00
|
|
|
# RuntimeError: no running event loop
|
|
|
|
"test_blank_line_fix"
|
2021-12-30 13:39:12 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "questionary" ];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library to build command line user prompts";
|
2021-07-24 12:14:16 +00:00
|
|
|
homepage = "https://github.com/tmbo/questionary";
|
2023-11-16 04:20:00 +00:00
|
|
|
changelog = "https://github.com/tmbo/questionary/blob/${src.rev}/docs/pages/changelog.rst";
|
2021-03-09 03:18:52 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|