summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2021-06-03 23:41:07 +0200
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2021-06-03 23:15:29 +0000
commit47f12a400265131705582c4f76ec64260eabfbd2 (patch)
treef9c5298842a89946b5879089f9f90970141aa698
parentMerge pull request #125353 from petabyteboy/feature/gitlab-13-12-2-backport (diff)
downloadnixpkgs-47f12a400265131705582c4f76ec64260eabfbd2.tar.gz
python3Packages.click-option-group: init at 0.5.3
(cherry picked from commit c06b1086c0962a5909432c5b9590fc510926802a)
-rw-r--r--pkgs/development/python-modules/click-option-group/default.nix47
-rw-r--r--pkgs/top-level/python-packages.nix2
2 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/click-option-group/default.nix b/pkgs/development/python-modules/click-option-group/default.nix
new file mode 100644
index 000000000000..cf39ba808452
--- /dev/null
+++ b/pkgs/development/python-modules/click-option-group/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, buildPythonPackage
+, pythonOlder
+, fetchFromGitHub
+, click
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+ pname = "click-option-group";
+ version = "0.5.3";
+ format = "setuptools";
+ disabled = pythonOlder "3.6";
+
+ src = fetchFromGitHub {
+ owner = "click-contrib";
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "1w0692s8fabncpggpwl2d4dfqjjlmcia271rrb8hcz0r6nvw98ak";
+ };
+
+ propagatedBuildInputs = [
+ click
+ ];
+
+ checkInputs = [
+ pytestCheckHook
+ ];
+
+ pythonImportsCheck = [
+ "click_option_group"
+ ];
+
+ meta = with lib; {
+ description = "Option groups missing in Click";
+ longDescription = ''
+ Option groups are convenient mechanism for logical structuring
+ CLI, also it allows you to set the specific behavior and set the
+ relationship among grouped options (mutually exclusive options
+ for example). Moreover, argparse stdlib package contains this
+ functionality out of the box.
+ '';
+ homepage = "https://github.com/click-contrib/click-option-group";
+ license = licenses.bsd3;
+ maintainers = with maintainers; [ hexa ];
+ };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index e562c64b5ffe..20a970ec6b47 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -1411,6 +1411,8 @@ in {
click-log = callPackage ../development/python-modules/click-log { };
+ click-option-group = callPackage ../development/python-modules/click-option-group { };
+
click-plugins = callPackage ../development/python-modules/click-plugins { };
click-spinner = callPackage ../development/python-modules/click-spinner { };