1{
2 lib,
3 buildPythonPackage,
4 click,
5 fetchFromGitHub,
6 hatchling,
7 hatch-vcs,
8 pytestCheckHook,
9 pythonOlder,
10}:
11
12buildPythonPackage rec {
13 pname = "click-option-group";
14 version = "0.5.7";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "click-contrib";
21 repo = "click-option-group";
22 tag = "v${version}";
23 hash = "sha256-MiTOAgIZZEvU6aLdUpQvLTd7dJpYXU1gJz+ea8C/95Y=";
24 };
25
26 build-system = [
27 hatchling
28 hatch-vcs
29 ];
30
31 dependencies = [ click ];
32
33 nativeCheckInputs = [ pytestCheckHook ];
34
35 pythonImportsCheck = [ "click_option_group" ];
36
37 meta = with lib; {
38 description = "Option groups missing in Click";
39 longDescription = ''
40 Option groups are convenient mechanism for logical structuring
41 CLI, also it allows you to set the specific behavior and set the
42 relationship among grouped options (mutually exclusive options
43 for example). Moreover, argparse stdlib package contains this
44 functionality out of the box.
45 '';
46 homepage = "https://github.com/click-contrib/click-option-group/releases/tag/${src.tag}";
47 license = licenses.bsd3;
48 maintainers = with maintainers; [ hexa ];
49 };
50}