1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pytestCheckHook,
6 click,
7 setuptools-scm,
8 pythonOlder,
9 typing-extensions,
10}:
11
12buildPythonPackage rec {
13 pname = "cloup";
14 version = "3.0.5";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-ySsmHHu34TAEkw8/tLPtrY3i0fEplNzdvgW8IZkEQ8U=";
22 };
23
24 nativeBuildInputs = [ setuptools-scm ];
25
26 propagatedBuildInputs = [ click ] ++ lib.optionals (pythonOlder "3.8") [ typing-extensions ];
27
28 nativeCheckInputs = [ pytestCheckHook ];
29
30 pythonImportsCheck = [ "cloup" ];
31
32 meta = with lib; {
33 homepage = "https://github.com/janLuke/cloup";
34 description = "Click extended with option groups, constraints, aliases, help themes";
35 changelog = "https://github.com/janluke/cloup/releases/tag/v${version}";
36 longDescription = ''
37 Enriches Click with option groups, constraints, command aliases, help sections for subcommands, themes for --help and other stuff.
38 '';
39 license = licenses.bsd3;
40 maintainers = with maintainers; [ friedelino ];
41 };
42}