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

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

68 lines
1.6 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, python3
, fetchFromGitHub
}:
2022-07-14 00:04:20 +00:00
python3.pkgs.buildPythonApplication rec {
2022-07-14 00:04:20 +00:00
pname = "iredis";
version = "1.14.1";
pyproject = true;
2022-07-14 00:04:20 +00:00
src = fetchFromGitHub {
owner = "laixintao";
repo = "iredis";
rev = "refs/tags/v${version}";
hash = "sha256-ojS2wtxggZPp73n9SjPRAzBlnF1ScK/pNVGvAYKmQ5Y=";
2022-07-14 00:04:20 +00:00
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail 'wcwidth = "0.1.9"' 'wcwidth = "*"'
'';
nativeBuildInputs = with python3.pkgs; [
2023-01-03 04:20:00 +00:00
poetry-core
];
propagatedBuildInputs = with python3.pkgs; [
2022-07-14 00:04:20 +00:00
pygments
click
configobj
mistune
2022-07-14 00:04:20 +00:00
packaging
pendulum
prompt-toolkit
redis
wcwidth
];
nativeCheckInputs = with python3.pkgs; [
2022-07-14 00:04:20 +00:00
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"
# Only execute unittests, because cli tests require a running Redis
"tests/unittests/"
] ++ lib.optionals stdenv.isDarwin [
# Flaky test
"--deselect=tests/unittests/test_utils.py::test_timer"
2022-07-14 00:04:20 +00:00
];
pythonImportsCheck = [ "iredis" ];
meta = with lib; {
description = "A Terminal Client for Redis with AutoCompletion and Syntax Highlighting";
changelog = "https://github.com/laixintao/iredis/raw/${src.rev}/CHANGELOG.md";
2022-07-14 00:04:20 +00:00
homepage = "https://iredis.io/";
license = licenses.bsd3;
maintainers = with maintainers; [ marsam ];
mainProgram = "iredis";
2022-07-14 00:04:20 +00:00
};
}