1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonOlder,
6 configobj,
7 mock,
8 pytestCheckHook,
9 pygments,
10 tabulate,
11}:
12
13buildPythonPackage rec {
14 pname = "cli-helpers";
15 version = "2.7.0";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.6";
19
20 src = fetchPypi {
21 pname = "cli_helpers";
22 inherit version;
23 hash = "sha256-YtEXENvrwvxGAAPeEhVogyXYY2hZBW1oizhBm9QEi8A=";
24 };
25
26 propagatedBuildInputs = [
27 configobj
28 tabulate
29 ]
30 ++ tabulate.optional-dependencies.widechars;
31
32 optional-dependencies = {
33 styles = [ pygments ];
34 };
35
36 nativeCheckInputs = [
37 pytestCheckHook
38 mock
39 ]
40 ++ lib.flatten (builtins.attrValues optional-dependencies);
41
42 meta = with lib; {
43 description = "Python helpers for common CLI tasks";
44 longDescription = ''
45 CLI Helpers is a Python package that makes it easy to perform common
46 tasks when building command-line apps. It's a helper library for
47 command-line interfaces.
48
49 Libraries like Click and Python Prompt Toolkit are amazing tools that
50 help you create quality apps. CLI Helpers complements these libraries by
51 wrapping up common tasks in simple interfaces.
52
53 CLI Helpers is not focused on your app's design pattern or framework --
54 you can use it on its own or in combination with other libraries. It's
55 lightweight and easy to extend.
56
57 What's included in CLI Helpers?
58
59 - Prettyprinting of tabular data with custom pre-processing
60 - [in progress] config file reading/writing
61
62 Read the documentation at http://cli-helpers.rtfd.io
63 '';
64 homepage = "https://cli-helpers.readthedocs.io/en/stable/";
65 license = licenses.bsd3;
66 maintainers = [ maintainers.kalbasit ];
67 };
68}