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