Files
nixpkgs/pkgs/by-name/ir/iredis/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

77 lines
1.8 KiB
Nix

{
lib,
stdenv,
python3,
fetchFromGitHub,
}:
python3.pkgs.buildPythonApplication rec {
pname = "iredis";
version = "1.15.2";
pyproject = true;
src = fetchFromGitHub {
owner = "laixintao";
repo = "iredis";
tag = "v${version}";
hash = "sha256-g/gQb9QOyfa7kyHCUZf/kLZRO5IE8389BUCYz8Sqr8o=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail 'packaging = "^23.0"' 'packaging = "*"' \
--replace-fail 'wcwidth = "0.1.9"' 'wcwidth = "*"' \
--replace-fail 'redis = "^5.0.0"' 'redis = "*"'
'';
nativeBuildInputs = with python3.pkgs; [
poetry-core
];
propagatedBuildInputs = with python3.pkgs; [
click
configobj
mistune
packaging
prompt-toolkit
pygments
python-dateutil
redis
wcwidth
];
nativeCheckInputs = with python3.pkgs; [
freezegun
pexpect
pytestCheckHook
];
enabledTestPaths = [
# Only execute unittests, because cli tests require a running Redis
"tests/unittests/"
];
disabledTestPaths = [
# Fails on sandbox
"tests/unittests/test_client.py"
"tests/unittests/test_render_functions.py::test_render_unixtime_config_raw"
"tests/unittests/test_render_functions.py::test_render_time"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# Flaky tests
"tests/unittests/test_entry.py::test_command_shell_options_higher_priority"
"tests/unittests/test_utils.py::test_timer"
];
pythonImportsCheck = [ "iredis" ];
meta = {
description = "Terminal Client for Redis with AutoCompletion and Syntax Highlighting";
changelog = "https://github.com/laixintao/iredis/blob/${src.tag}/CHANGELOG.md";
homepage = "https://iredis.xbin.io/";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ phanirithvij ];
mainProgram = "iredis";
};
}