1{
2 stdenv,
3 lib,
4 buildPythonPackage,
5 fetchFromGitHub,
6 poetry-core,
7 prompt-toolkit,
8 pytestCheckHook,
9}:
10
11buildPythonPackage rec {
12 pname = "questionary";
13 version = "2.1.1";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "tmbo";
18 repo = "questionary";
19 tag = version;
20 hash = "sha256-r7F5y6KD6zonQGtO/9OuCTMTWdkCdd9aqTgKg6eWp08=";
21 };
22
23 pythonRelaxDeps = [ "prompt_toolkit" ];
24
25 build-system = [ poetry-core ];
26
27 dependencies = [ prompt-toolkit ];
28
29 nativeCheckInputs = [ pytestCheckHook ];
30
31 preCheck = lib.optionalString stdenv.hostPlatform.isDarwin ''
32 ulimit -n 1024
33 '';
34
35 disabledTests = [
36 # RuntimeError: no running event loop
37 "test_blank_line_fix"
38
39 # TypeError: Attrs.__new__() missing 1 required positional argument: 'dim'
40 # https://github.com/tmbo/questionary/issues/461
41 "test_print_with_style"
42 ];
43
44 pythonImportsCheck = [ "questionary" ];
45
46 meta = {
47 description = "Python library to build command line user prompts";
48 homepage = "https://github.com/tmbo/questionary";
49 changelog = "https://github.com/tmbo/questionary/blob/${src.rev}/docs/pages/changelog.rst";
50 license = lib.licenses.mit;
51 maintainers = with lib.maintainers; [ fab ];
52 };
53}