From 1faec393f1ddf1e1f434c07649b23622e0af69b4 Mon Sep 17 00:00:00 2001 From: "Wael M. Nasreddine" Date: Mon, 6 Aug 2018 15:48:22 -0700 Subject: [PATCH] pythonPackages.cli-helpers: init at 1.0.2 --- .../python-modules/cli-helpers/default.nix | 59 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 61 insertions(+) create mode 100644 pkgs/development/python-modules/cli-helpers/default.nix diff --git a/pkgs/development/python-modules/cli-helpers/default.nix b/pkgs/development/python-modules/cli-helpers/default.nix new file mode 100644 index 000000000000..69b811a94f4f --- /dev/null +++ b/pkgs/development/python-modules/cli-helpers/default.nix @@ -0,0 +1,59 @@ +{ lib +, buildPythonPackage +, fetchPypi +, terminaltables +, tabulate +, backports_csv +, wcwidth +, pytest +, isPy27 +}: + +buildPythonPackage rec { + pname = "cli_helpers"; + version = "1.0.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "1z5rqm8pznj6bvivm2al8rsxm82rai8hc9bqrgh3ksnbzg2kfy7p"; + }; + + propagatedBuildInputs = [ + terminaltables + tabulate + wcwidth + ] ++ (lib.optionals isPy27 [ backports_csv ]); + + checkInputs = [ pytest ]; + + checkPhase = '' + py.test + ''; + + 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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 13cf481a16f4..f18bf46eb884 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1104,6 +1104,8 @@ in { cheroot = callPackage ../development/python-modules/cheroot {}; + cli-helpers = callPackage ../development/python-modules/cli-helpers {}; + cmarkgfm = callPackage ../development/python-modules/cmarkgfm { }; circus = callPackage ../development/python-modules/circus {};