1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 click,
6 pytestCheckHook,
7 pytest-click,
8}:
9
10buildPythonPackage rec {
11 pname = "click-shell";
12 version = "2.1";
13 format = "setuptools";
14
15 # PyPi release is missing tests
16 src = fetchFromGitHub {
17 owner = "clarkperkins";
18 repo = pname;
19 tag = version;
20 hash = "sha256-4QpQzg0yFuOFymGiTI+A8o6LyX78iTJMqr0ernYbilI=";
21 };
22
23 propagatedBuildInputs = [ click ];
24
25 nativeCheckInputs = [
26 pytest-click
27 pytestCheckHook
28 ];
29
30 pythonImportsCheck = [ "click_shell" ];
31
32 preCheck = "export HOME=$(mktemp -d)";
33
34 meta = with lib; {
35 description = "Extension to click that easily turns your click app into a shell utility";
36 longDescription = ''
37 This is an extension to click that easily turns your click app into a
38 shell utility. It is built on top of the built in python cmd module,
39 with modifications to make it work with click. It adds a 'shell' mode
40 with command completion to any click app.
41 '';
42 homepage = "https://github.com/clarkperkins/click-shell";
43 license = licenses.bsd3;
44 maintainers = with maintainers; [ binsky ];
45 };
46}