2022-05-18 14:49:53 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3
|
|
|
|
}:
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
let
|
2023-04-12 12:48:02 +00:00
|
|
|
py = python3.override {
|
|
|
|
packageOverrides = final: prev: {
|
|
|
|
rich = prev.rich.overridePythonAttrs (old: rec {
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "12.4.0";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Textualize";
|
|
|
|
repo = "rich";
|
2023-04-12 12:48:02 +00:00
|
|
|
rev = "refs/tags/v12.4.0";
|
2023-03-04 12:14:45 +00:00
|
|
|
hash = "sha256-ryJTusUNpvNF2031ICJWK8ScxHIh+LrXYg7nd0ph4aQ=";
|
|
|
|
};
|
2023-04-12 12:48:02 +00:00
|
|
|
propagatedBuildInputs = with py.pkgs; [
|
|
|
|
commonmark
|
|
|
|
pygments
|
|
|
|
];
|
|
|
|
doCheck = false;
|
2023-03-04 12:14:45 +00:00
|
|
|
});
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
textual = prev.textual.overridePythonAttrs (old: rec {
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "0.1.18";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Textualize";
|
|
|
|
repo = "textual";
|
2023-04-12 12:48:02 +00:00
|
|
|
rev = "refs/tags/v0.1.18";
|
2023-03-04 12:14:45 +00:00
|
|
|
hash = "sha256-XVmbt8r5HL8r64ISdJozmM+9HuyvqbpdejWICzFnfiw=";
|
|
|
|
};
|
2023-04-12 12:48:02 +00:00
|
|
|
doCheck = false;
|
2023-03-04 12:14:45 +00:00
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2022-04-27 09:35:20 +00:00
|
|
|
pname = "rich-cli";
|
2022-05-18 14:49:53 +00:00
|
|
|
version = "1.8.0";
|
|
|
|
format = "pyproject";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Textualize";
|
|
|
|
repo = pname;
|
2023-04-12 12:48:02 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-mV5b/J9wX9niiYtlmAUouaAm9mY2zTtDmex7FNWcezQ=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'rich = "^12.4.0"' 'rich = "*"' \
|
|
|
|
--replace 'textual = "^0.1.18"' 'textual = "*"'
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = with py.pkgs; [
|
2022-05-18 14:49:53 +00:00
|
|
|
poetry-core
|
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
propagatedBuildInputs = with py.pkgs; [
|
2022-04-27 09:35:20 +00:00
|
|
|
rich
|
|
|
|
click
|
|
|
|
requests
|
|
|
|
textual
|
|
|
|
rich-rst
|
|
|
|
];
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"rich_cli"
|
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Command Line Interface to Rich";
|
2022-05-18 14:49:53 +00:00
|
|
|
homepage = "https://github.com/Textualize/rich-cli";
|
2023-04-12 12:48:02 +00:00
|
|
|
changelog = "https://github.com/Textualize/rich-cli/releases/tag/v${version}";
|
2022-04-27 09:35:20 +00:00
|
|
|
license = licenses.mit;
|
2023-01-20 10:41:00 +00:00
|
|
|
maintainers = with maintainers; [ joelkoen ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "rich";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
}
|