1{ 2 stdenv, 3 lib, 4 buildPythonPackage, 5 fetchFromGitHub, 6 poetry-core, 7 prompt-toolkit, 8 pytestCheckHook, 9 pythonOlder, 10 pythonRelaxDepsHook, 11}: 12 13buildPythonPackage rec { 14 pname = "questionary"; 15 version = "2.0.1"; 16 format = "pyproject"; 17 18 disabled = pythonOlder "3.8"; 19 20 src = fetchFromGitHub { 21 owner = "tmbo"; 22 repo = pname; 23 rev = "refs/tags/${version}"; 24 hash = "sha256-JY0kXomgiGtOrsXfRf0756dTPVgud91teh+jW+kFNdk="; 25 }; 26 27 nativeBuildInputs = [ 28 poetry-core 29 pythonRelaxDepsHook 30 ]; 31 32 pythonRelaxDeps = [ "prompt_toolkit" ]; 33 34 propagatedBuildInputs = [ prompt-toolkit ]; 35 36 nativeCheckInputs = [ pytestCheckHook ]; 37 38 preCheck = lib.optionalString stdenv.isDarwin '' 39 ulimit -n 1024 40 ''; 41 42 disabledTests = [ 43 # RuntimeError: no running event loop 44 "test_blank_line_fix" 45 ]; 46 47 pythonImportsCheck = [ "questionary" ]; 48 49 meta = with lib; { 50 description = "Python library to build command line user prompts"; 51 homepage = "https://github.com/tmbo/questionary"; 52 changelog = "https://github.com/tmbo/questionary/blob/${src.rev}/docs/pages/changelog.rst"; 53 license = with licenses; [ mit ]; 54 maintainers = with maintainers; [ fab ]; 55 }; 56}