about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2024-06-07 08:55:50 +0200
committerGitHub <noreply@github.com>2024-06-07 08:55:50 +0200
commitdebb9f3b6813632417e195cd8819993de4ec9b9e (patch)
tree96bc875097c2d652f2f23aaf5912c6f8a886faa2 /pkgs/development
parent34ecd00b0e2219fa90850ed4520b250a08cd58a2 (diff)
parentcede15570ada8cf83053ebe39d896c33d6365e5f (diff)
Merge pull request #317574 from fabaff/cyclopts
python312Packages.cyclopts: init at 2.6.2
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/cyclopts/default.nix62
1 files changed, 62 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/cyclopts/default.nix b/pkgs/development/python-modules/cyclopts/default.nix
new file mode 100644
index 0000000000000..0e89c528057bd
--- /dev/null
+++ b/pkgs/development/python-modules/cyclopts/default.nix
@@ -0,0 +1,62 @@
+{
+  lib,
+  attrs,
+  buildPythonPackage,
+  docstring-parser,
+  fetchFromGitHub,
+  importlib-metadata,
+  poetry-core,
+  poetry-dynamic-versioning,
+  pydantic,
+  pytest-mock,
+  pytestCheckHook,
+  pythonOlder,
+  rich,
+  rich-rst,
+  typing-extensions,
+}:
+
+buildPythonPackage rec {
+  pname = "cyclopts";
+  version = "2.6.2";
+  pyproject = true;
+
+  disabled = pythonOlder "3.8";
+
+  src = fetchFromGitHub {
+    owner = "BrianPugh";
+    repo = "cyclopts";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-GWUD9Qu2EKrT7nwlmSpJ31LWSvv6mASxsXGznumusdw=";
+  };
+
+  build-system = [
+    poetry-core
+    poetry-dynamic-versioning
+  ];
+
+  dependencies = [
+    attrs
+    docstring-parser
+    importlib-metadata
+    rich
+    rich-rst
+    typing-extensions
+  ];
+
+  nativeCheckInputs = [
+    pydantic
+    pytest-mock
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [ "cyclopts" ];
+
+  meta = with lib; {
+    description = "Module to create CLIs based on Python type hints";
+    homepage = "https://github.com/BrianPugh/cyclopts";
+    changelog = "https://github.com/BrianPugh/cyclopts/releases/tag/v${version}";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ fab ];
+  };
+}