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 disabledTests = [
38 # https://github.com/click-contrib/click-option-group/issues/65
39 "test_missing_group_decl_first_api"
40 ];
41
42 meta = with lib; {
43 description = "Option groups missing in Click";
44 longDescription = ''
45 Option groups are convenient mechanism for logical structuring
46 CLI, also it allows you to set the specific behavior and set the
47 relationship among grouped options (mutually exclusive options
48 for example). Moreover, argparse stdlib package contains this
49 functionality out of the box.
50 '';
51 homepage = "https://github.com/click-contrib/click-option-group/releases/tag/${src.tag}";
52 license = licenses.bsd3;
53 maintainers = with maintainers; [ hexa ];
54 };
55}