2023-01-03 00:15:55 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
2019-09-13 14:42:08 -07:00
|
|
|
, backports_csv
|
2018-12-23 18:09:45 +02:00
|
|
|
, configobj
|
2019-09-13 14:42:08 -07:00
|
|
|
, mock
|
2023-01-03 00:15:55 +01:00
|
|
|
, pytestCheckHook
|
|
|
|
, pygments
|
2018-08-06 15:48:22 -07:00
|
|
|
, tabulate
|
2019-09-13 14:42:08 -07:00
|
|
|
, terminaltables
|
2018-08-06 15:48:22 -07:00
|
|
|
, wcwidth
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2023-01-03 00:15:55 +01:00
|
|
|
pname = "cli-helpers";
|
2022-10-13 08:50:55 +00:00
|
|
|
version = "2.3.0";
|
2023-01-03 00:15:55 +01:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2018-08-06 15:48:22 -07:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2023-01-03 00:15:55 +01:00
|
|
|
pname = "cli_helpers";
|
|
|
|
inherit version;
|
|
|
|
hash = "sha256-5xdNADorWP0+Mac/u8RdWqUT3mLL1C1Df3i5ZYvV+Wc=";
|
2018-08-06 15:48:22 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2018-12-23 18:09:45 +02:00
|
|
|
configobj
|
2018-08-06 15:48:22 -07:00
|
|
|
tabulate
|
2023-01-03 00:15:55 +01:00
|
|
|
] ++ tabulate.optional-dependencies.widechars;
|
2019-09-13 14:42:08 -07:00
|
|
|
|
2023-01-03 00:15:55 +01:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
styles = [ pygments ];
|
|
|
|
};
|
2018-08-06 15:48:22 -07:00
|
|
|
|
2023-01-03 00:15:55 +01:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
mock
|
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
2018-08-06 15:48:22 -07: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
|
|
|
|
'';
|
2020-03-31 21:11:51 -04:00
|
|
|
homepage = "https://cli-helpers.readthedocs.io/en/stable/";
|
2018-08-06 15:48:22 -07:00
|
|
|
license = licenses.bsd3 ;
|
|
|
|
maintainers = [ maintainers.kalbasit ];
|
|
|
|
};
|
|
|
|
}
|