nixpkgs/pkgs/tools/admin/iredis/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

63 lines
1.5 KiB
Nix
Raw Normal View History

2022-07-14 02:04:20 +02:00
{ lib, python3Packages }:
with python3Packages;
buildPythonApplication rec {
pname = "iredis";
2023-01-03 05:20:00 +01:00
version = "1.13.0";
format = "pyproject";
2022-07-14 02:04:20 +02:00
src = fetchPypi {
inherit pname version;
2023-01-03 05:20:00 +01:00
sha256 = "d1e4e7936d0be456f70a39abeb1c97d931f66ccd60e891f4fd796ffb06dfeaf9";
2022-07-14 02:04:20 +02:00
};
postPatch = ''
2023-01-03 05:20:00 +01:00
substituteInPlace pyproject.toml \
--replace 'click = "^7.0"' 'click = "*"' \
--replace 'wcwidth = "0.1.9"' 'wcwidth = "*"'
2022-07-14 02:04:20 +02:00
'';
2023-01-03 05:20:00 +01:00
nativeBuildInputs = [
poetry-core
];
2022-07-14 02:04:20 +02:00
propagatedBuildInputs = [
pygments
click
configobj
importlib-resources
mistune
2022-07-14 02:04:20 +02:00
packaging
pendulum
prompt-toolkit
redis
wcwidth
];
checkInputs = [
pytestCheckHook
pexpect
];
pytestFlagsArray = [
# Fails on sandbox
"--ignore=tests/unittests/test_client.py"
"--deselect=tests/unittests/test_render_functions.py::test_render_unixtime_config_raw"
"--deselect=tests/unittests/test_render_functions.py::test_render_time"
2023-01-03 05:20:00 +01:00
"--deselect=tests/unittests/test_entry.py::test_command_shell_options_higher_priority"
2022-07-14 02:04:20 +02:00
# Only execute unittests, because cli tests require a running Redis
"tests/unittests/"
];
pythonImportsCheck = [ "iredis" ];
meta = with lib; {
description = "A Terminal Client for Redis with AutoCompletion and Syntax Highlighting";
changelog = "https://github.com/laixintao/iredis/raw/v${version}/CHANGELOG.md";
homepage = "https://iredis.io/";
license = licenses.bsd3;
maintainers = with maintainers; [ marsam ];
};
}