1{
2 lib,
3 attrs,
4 buildPythonPackage,
5 docstring-parser,
6 fetchFromGitHub,
7 importlib-metadata,
8 poetry-core,
9 poetry-dynamic-versioning,
10 pydantic,
11 pytest-mock,
12 pytestCheckHook,
13 pythonOlder,
14 pyyaml,
15 rich,
16 rich-rst,
17 typing-extensions,
18}:
19
20buildPythonPackage rec {
21 pname = "cyclopts";
22 version = "2.9.4";
23 pyproject = true;
24
25 disabled = pythonOlder "3.8";
26
27 src = fetchFromGitHub {
28 owner = "BrianPugh";
29 repo = "cyclopts";
30 rev = "refs/tags/v${version}";
31 hash = "sha256-s+MHy5L6Lof2Hd5gsEbKP5bmwMdbZCgHjOzR81lCoHk=";
32 };
33
34 build-system = [
35 poetry-core
36 poetry-dynamic-versioning
37 ];
38
39 dependencies = [
40 attrs
41 docstring-parser
42 importlib-metadata
43 rich
44 rich-rst
45 typing-extensions
46 ];
47
48 nativeCheckInputs = [
49 pydantic
50 pytest-mock
51 pytestCheckHook
52 pyyaml
53 ];
54
55 pythonImportsCheck = [ "cyclopts" ];
56
57 meta = with lib; {
58 description = "Module to create CLIs based on Python type hints";
59 homepage = "https://github.com/BrianPugh/cyclopts";
60 changelog = "https://github.com/BrianPugh/cyclopts/releases/tag/v${version}";
61 license = licenses.asl20;
62 maintainers = with maintainers; [ fab ];
63 };
64}