2022-05-04 14:23:18 +00:00
|
|
|
{ lib
|
2022-05-08 03:19:30 +00:00
|
|
|
, fetchFromGitHub
|
2022-05-04 14:23:18 +00:00
|
|
|
, python3
|
|
|
|
}:
|
2022-03-01 06:48:55 +00:00
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "rich-cli";
|
2022-05-08 03:19:30 +00:00
|
|
|
version = "1.8.0";
|
2022-05-04 14:23:18 +00:00
|
|
|
format = "pyproject";
|
2022-03-01 06:48:55 +00:00
|
|
|
|
2022-05-08 03:19:30 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Textualize";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-mV5b/J9wX9niiYtlmAUouaAm9mY2zTtDmex7FNWcezQ=";
|
2022-03-01 06:48:55 +00:00
|
|
|
};
|
|
|
|
|
2022-05-04 14:23:18 +00:00
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
|
|
|
poetry-core
|
|
|
|
];
|
2022-03-01 06:48:55 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
rich
|
|
|
|
click
|
|
|
|
requests
|
|
|
|
textual
|
|
|
|
rich-rst
|
|
|
|
];
|
|
|
|
|
2022-05-04 14:23:18 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2023-01-03 14:48:28 +00:00
|
|
|
--replace 'rich = "^12.4.0"' 'rich = "*"' \
|
|
|
|
--replace 'textual = "^0.1.18"' 'textual = "*"'
|
2022-05-04 14:23:18 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"rich_cli"
|
|
|
|
];
|
2022-03-01 06:48:55 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Command Line Interface to Rich";
|
2022-05-04 14:23:18 +00:00
|
|
|
homepage = "https://github.com/Textualize/rich-cli";
|
2022-03-01 06:48:55 +00:00
|
|
|
license = licenses.mit;
|
2023-01-15 04:14:19 +00:00
|
|
|
maintainers = with maintainers; [ joelkoen ];
|
2022-03-01 06:48:55 +00:00
|
|
|
};
|
|
|
|
}
|