Files
nixpkgs/pkgs/development/python-modules/cyclopts/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

74 lines
1.3 KiB
Nix

{
lib,
attrs,
buildPythonPackage,
docstring-parser,
fetchFromGitHub,
hatchling,
hatch-vcs,
pydantic,
pytest-mock,
pytestCheckHook,
pyyaml,
rich-rst,
rich,
trio,
}:
buildPythonPackage rec {
pname = "cyclopts";
version = "4.2.5";
pyproject = true;
src = fetchFromGitHub {
owner = "BrianPugh";
repo = "cyclopts";
tag = "v${version}";
hash = "sha256-5OGQLAHDh3wkGxiYPXt6Txc4naSmuyDWojZA9ZgZwMo=";
};
build-system = [
hatchling
hatch-vcs
];
dependencies = [
attrs
docstring-parser
rich
rich-rst
];
optional-dependencies = {
trio = [ trio ];
yaml = [ pyyaml ];
};
nativeCheckInputs = [
pydantic
pytest-mock
pytestCheckHook
]
++ lib.concatAttrValues optional-dependencies;
pythonImportsCheck = [ "cyclopts" ];
disabledTests = [
# Test requires bash
"test_positional_not_treated_as_command"
];
disabledTestPaths = [
# Tests requires sphinx
"tests/test_sphinx_ext.py"
];
meta = {
description = "Module to create CLIs based on Python type hints";
homepage = "https://github.com/BrianPugh/cyclopts";
changelog = "https://github.com/BrianPugh/cyclopts/releases/tag/${src.tag}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ fab ];
};
}