2023-01-20 10:41:00 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, configobj
|
|
|
|
, mock
|
2023-01-20 10:41:00 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pygments
|
2020-04-24 23:36:52 +00:00
|
|
|
, tabulate
|
|
|
|
, terminaltables
|
|
|
|
, wcwidth
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2023-01-20 10:41:00 +00:00
|
|
|
pname = "cli-helpers";
|
2022-10-21 18:38:19 +00:00
|
|
|
version = "2.3.0";
|
2023-01-20 10:41:00 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2023-01-20 10:41:00 +00:00
|
|
|
pname = "cli_helpers";
|
|
|
|
inherit version;
|
|
|
|
hash = "sha256-5xdNADorWP0+Mac/u8RdWqUT3mLL1C1Df3i5ZYvV+Wc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
configobj
|
|
|
|
tabulate
|
2023-01-20 10:41:00 +00:00
|
|
|
] ++ tabulate.optional-dependencies.widechars;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
styles = [ pygments ];
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-01-20 10:41:00 +00:00
|
|
|
pytestCheckHook
|
|
|
|
mock
|
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python helpers for common CLI tasks";
|
|
|
|
longDescription = ''
|
|
|
|
CLI Helpers is a Python package that makes it easy to perform common
|
|
|
|
tasks when building command-line apps. It's a helper library for
|
|
|
|
command-line interfaces.
|
|
|
|
|
|
|
|
Libraries like Click and Python Prompt Toolkit are amazing tools that
|
|
|
|
help you create quality apps. CLI Helpers complements these libraries by
|
|
|
|
wrapping up common tasks in simple interfaces.
|
|
|
|
|
|
|
|
CLI Helpers is not focused on your app's design pattern or framework --
|
|
|
|
you can use it on its own or in combination with other libraries. It's
|
|
|
|
lightweight and easy to extend.
|
|
|
|
|
|
|
|
What's included in CLI Helpers?
|
|
|
|
|
|
|
|
- Prettyprinting of tabular data with custom pre-processing
|
|
|
|
- [in progress] config file reading/writing
|
|
|
|
|
|
|
|
Read the documentation at http://cli-helpers.rtfd.io
|
|
|
|
'';
|
|
|
|
homepage = "https://cli-helpers.readthedocs.io/en/stable/";
|
|
|
|
license = licenses.bsd3 ;
|
|
|
|
maintainers = [ maintainers.kalbasit ];
|
|
|
|
};
|
|
|
|
}
|