rich-cli: add patches to support later rich/textual releases
This commit is contained in:
parent
dc88b85084
commit
a4f916072f
@ -1,68 +1,53 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
, fetchpatch
|
||||||
, python3
|
, python3
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
|
||||||
py = python3.override {
|
|
||||||
packageOverrides = final: prev: {
|
|
||||||
rich = prev.rich.overridePythonAttrs (old: rec {
|
|
||||||
version = "12.4.0";
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "Textualize";
|
|
||||||
repo = "rich";
|
|
||||||
rev = "refs/tags/v12.4.0";
|
|
||||||
hash = "sha256-ryJTusUNpvNF2031ICJWK8ScxHIh+LrXYg7nd0ph4aQ=";
|
|
||||||
};
|
|
||||||
propagatedBuildInputs = with py.pkgs; [
|
|
||||||
commonmark
|
|
||||||
pygments
|
|
||||||
];
|
|
||||||
doCheck = false;
|
|
||||||
});
|
|
||||||
|
|
||||||
textual = prev.textual.overridePythonAttrs (old: rec {
|
|
||||||
version = "0.1.18";
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "Textualize";
|
|
||||||
repo = "textual";
|
|
||||||
rev = "refs/tags/v0.1.18";
|
|
||||||
hash = "sha256-XVmbt8r5HL8r64ISdJozmM+9HuyvqbpdejWICzFnfiw=";
|
|
||||||
};
|
|
||||||
doCheck = false;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
|
|
||||||
python3.pkgs.buildPythonApplication rec {
|
python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "rich-cli";
|
pname = "rich-cli";
|
||||||
version = "1.8.0";
|
version = "1.8.0";
|
||||||
format = "pyproject";
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Textualize";
|
owner = "Textualize";
|
||||||
repo = pname;
|
repo = "rich-cli";
|
||||||
rev = "refs/tags/v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
hash = "sha256-mV5b/J9wX9niiYtlmAUouaAm9mY2zTtDmex7FNWcezQ=";
|
hash = "sha256-mV5b/J9wX9niiYtlmAUouaAm9mY2zTtDmex7FNWcezQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
patches = [
|
||||||
substituteInPlace pyproject.toml \
|
# Update dependencies, https://github.com/Textualize/rich-cli/pull/94
|
||||||
--replace 'rich = "^12.4.0"' 'rich = "*"' \
|
(fetchpatch {
|
||||||
--replace 'textual = "^0.1.18"' 'textual = "*"'
|
name = "update-dependencies.patch";
|
||||||
'';
|
url = "https://github.com/Textualize/rich-cli/pull/94/commits/1e9a11af7c1c78a5a44a207b1e0dce4c4b3c39f0.patch";
|
||||||
|
hash = "sha256-cU+s/LK2GDVWXLZob0n5J6sLjflCr8w10hRLgeWN5Vg=";
|
||||||
|
})
|
||||||
|
(fetchpatch {
|
||||||
|
name = "markdown.patch";
|
||||||
|
url = "https://github.com/Textualize/rich-cli/pull/94/commits/0a8e77d724ace88ce88ee9d68a46b1dc8464fe0b.patch";
|
||||||
|
hash = "sha256-KXvRG36Qj5kCj1RiAJsNkoJY7t41zUfJFgHeCtc0O4w=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = with py.pkgs; [
|
pythonRelaxDeps = [
|
||||||
|
"textual"
|
||||||
|
];
|
||||||
|
|
||||||
|
build-system = with python3.pkgs; [
|
||||||
poetry-core
|
poetry-core
|
||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = with py.pkgs; [
|
nativeBuildInputs = with python3.pkgs; [
|
||||||
rich
|
pythonRelaxDepsHook
|
||||||
|
];
|
||||||
|
|
||||||
|
dependencies = with python3.pkgs; [
|
||||||
click
|
click
|
||||||
requests
|
requests
|
||||||
textual
|
rich
|
||||||
rich-rst
|
rich-rst
|
||||||
|
textual
|
||||||
];
|
];
|
||||||
|
|
||||||
pythonImportsCheck = [
|
pythonImportsCheck = [
|
||||||
|
Loading…
Reference in New Issue
Block a user