nixpkgs/pkgs/by-name/ri/rich-cli/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

65 lines
1.5 KiB
Nix

{ lib
, fetchFromGitHub
, fetchpatch
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "rich-cli";
version = "1.8.0";
pyproject = true;
src = fetchFromGitHub {
owner = "Textualize";
repo = "rich-cli";
rev = "refs/tags/v${version}";
hash = "sha256-mV5b/J9wX9niiYtlmAUouaAm9mY2zTtDmex7FNWcezQ=";
};
patches = [
# Update dependencies, https://github.com/Textualize/rich-cli/pull/94
(fetchpatch {
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=";
})
];
pythonRelaxDeps = [
"textual"
];
build-system = with python3.pkgs; [
poetry-core
];
nativeBuildInputs = with python3.pkgs; [
];
dependencies = with python3.pkgs; [
click
requests
rich
rich-rst
textual
];
pythonImportsCheck = [
"rich_cli"
];
meta = with lib; {
description = "Command Line Interface to Rich";
homepage = "https://github.com/Textualize/rich-cli";
changelog = "https://github.com/Textualize/rich-cli/releases/tag/v${version}";
license = licenses.mit;
maintainers = [ ];
mainProgram = "rich";
};
}