2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
click,
|
|
|
|
pytestCheckHook,
|
|
|
|
pytest-click,
|
2022-10-30 15:09:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "click-shell";
|
|
|
|
version = "2.1";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
# PyPi release is missing tests
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "clarkperkins";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-4QpQzg0yFuOFymGiTI+A8o6LyX78iTJMqr0ernYbilI=";
|
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ click ];
|
2022-10-30 15:09:59 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-10-30 15:09:59 +00:00
|
|
|
pytest-click
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "click_shell" ];
|
2022-10-30 15:09:59 +00:00
|
|
|
|
|
|
|
preCheck = "export HOME=$(mktemp -d)";
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "An extension to click that easily turns your click app into a shell utility";
|
|
|
|
longDescription = ''
|
|
|
|
This is an extension to click that easily turns your click app into a
|
|
|
|
shell utility. It is built on top of the built in python cmd module,
|
|
|
|
with modifications to make it work with click. It adds a 'shell' mode
|
|
|
|
with command completion to any click app.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/clarkperkins/click-shell";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ binsky ];
|
|
|
|
};
|
|
|
|
}
|