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